Add curl examples for API calls to list/lookup foder and update folder actions
This commit is contained in:
parent
f66ee8ea42
commit
6387ba058a
@ -40,4 +40,41 @@ curl -v -H "Content-Type: application/xml" -X GET -u ${1}:${2} http://localhost:
|
|||||||
|
|
||||||
# 4. Upload a document into a given folder or the root folder
|
# 4. Upload a document into a given folder or the root folder
|
||||||
#curl --data-binary "@cat.gif" -H "Content-Type: application/octet-stream" -X POST -u ${1}:${2} http://localhost:3000/projects/12/dmsf/upload.xml?filename=cat.gif
|
#curl --data-binary "@cat.gif" -H "Content-Type: application/octet-stream" -X POST -u ${1}:${2} http://localhost:3000/projects/12/dmsf/upload.xml?filename=cat.gif
|
||||||
#curl -v -H "Content-Type: application/xml" -X POST --data "@file.xml" -u ${1}:${2} http://localhost:3000/projects/12/dmsf/commit.xml
|
#curl -v -H "Content-Type: application/xml" -X POST --data "@file.xml" -u ${1}:${2} http://localhost:3000/projects/12/dmsf/commit.xml
|
||||||
|
|
||||||
|
# 5. list folder contents & check folder existence (by folder title)
|
||||||
|
# curl -v -H "Content-Type: application/json" -X GET -H "X-Redmine-API-Key: USERS_API_KEY" http://localhost:3000/projects/1/dmsf.json?folder_title=Updated%20title
|
||||||
|
# 6. list folder contents & check folder existence (by folder id)
|
||||||
|
# curl -v -H "Content-Type: application/json" -X GET -H "X-Redmine-API-Key: USERS_API_KE" http://localhost:3000/projects/1/dmsf.json?folder_id=3
|
||||||
|
# both returns 404 not found, or json with following structure:
|
||||||
|
# {
|
||||||
|
# "dmsf":{
|
||||||
|
# "dmsf_folders":[
|
||||||
|
#
|
||||||
|
# ],
|
||||||
|
# "total_count":0,
|
||||||
|
# "dmsf_files":[
|
||||||
|
#
|
||||||
|
# ],
|
||||||
|
# "dmsf_links":[
|
||||||
|
#
|
||||||
|
# ],
|
||||||
|
# "found_folder":{
|
||||||
|
# "id":3,
|
||||||
|
# "title":"Updated title"
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
#}
|
||||||
|
|
||||||
|
# 7. update folder
|
||||||
|
# curl -v -H "Content-Type: application/json" -X POST --data "@update-folder-payload.json" -H "X-Redmine-API-Key: USERS_API_KEY" http://localhost:3000//projects/#{project_id}/dmsf/save.json
|
||||||
|
|
||||||
|
|
||||||
|
# update-folder-payload.json
|
||||||
|
# {
|
||||||
|
# "dmsf_folder": {
|
||||||
|
# "title": title,
|
||||||
|
# "description": description
|
||||||
|
# },
|
||||||
|
# "folder_id": id -- id of folder to be updated
|
||||||
|
# }
|
||||||
Loading…
x
Reference in New Issue
Block a user