/
Space S3 Documents REST API

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

Related content

Amazon S3 Files for Confluence
Amazon S3 Files for Confluence
More like this
Migrate Space S3 Documents with Bucket Configuration
Migrate Space S3 Documents with Bucket Configuration
More like this
Amazon S3 Project Files
Amazon S3 Project Files
More like this
Workflow to Invoke Amazon Lambda function
Workflow to Invoke Amazon Lambda function
Read with this
S3 and Code Utilities REST API
S3 and Code Utilities REST API
More like this
Space Fields REST API
Space Fields REST API
More like this