Space S3 Documents REST API
Â
Get Space S3 Documents
GET http://localhost:8080/rest/spaces3documents/1.0/utility/list/documents
Query Parameters:
spaceKey (String) or spaceId (Number) - (Required)
documentId (Number) - Optional
search (String) - Optional
Response: [Status: 200]
$ curl -u"user:password" -XGET http://localhost:8080/rest/spaces3documents/1.0/utility/list \
/documents/?spaceKey=SWTEST
Â
Attach / Link existing Amazon S3 File to Space via REST API.
Parameters:
spaceKey (String) - Required
bucketConfigId (Number) - Required
pageId (Number) - Required
documentKey (String) - Required
Response: [Status: 200]
% curl -u admin -XPOST "http://localhost:8090/rest/spaces3documents/1.0/utility/attach/document" \
-H "Content-Type: application/json" --data '{"bucketConfigId": 4, "spaceKey": "DT", \
"pageId": 4816905, "documentKey": "s3://ilaesolution/documents/DT/pom.xml"}'
{"status":19,"message":"Amazon S3 File has been attached to Space. File ID #19"}
%
Â
Upload new Amazon S3 File via REST API.
Parameters:
bucketId (Number) - Required
pageId (Number) - Required
file (Blob) - Required
updateDocument (Boolean) - Optional
Response: [Status: 200]
% curl -u admin -XPOST "http://localhost:8090/rest/spaces3documents/1.0/utility/upload/document" \
-H "X-Atlassian-Token: no-check" -F bucketId=4 -F pageId=4816905 -F file=@/tmp/pom.xml
{"status":0,"message":"Space S3 File Upload Successful. (documents/DT/pom.xml)"}
%
To overwrite: -F updateDocument=true
Â
Detach Amazon S3 Document on Jira
DELETE http://localhost:8080/rest/spaces3documents/1.0/utility/detach/document
Query Parameters:
spaceKey (String) or spaceId (Number) - (Required)
documentId (Number) - Optional