S3 and Code Utilities REST API

 

Get Project S3 Documents

GET http://localhost:8080/rest/projects3documents/1.0/utility/list/documents

Query Parameters:

  • projectKey (String) or projectId (Number) - (Required)

  • documentId (Number) - Optional

  • search (String) - Optional

Response: [Status: 200]

$ curl -u"user:password" -XGET http://localhost:8080/rest/projects3documents/1.0/utility/list \ /documents/?projectKey=SWTEST

 

POST http://localhost:8080/rest/amazonawssvcint/1.0/utility/attach/document

Parameters:

  • projectKey (String) - (Required)

  • bucketConfigId (Number) - (Required)

  • documentKey (String) - (Required)

Response: [Status: 200]

% curl -u admin -XPOST "http://localhost:8080/rest/amazonawssvcint/1.0/utility/attach/document" \ -H "Content-Type: application/json" --data '{"bucketConfigId": 4, "projectKey": "DT", \ "documentKey": "s3://ilaesolution/documents/DT/pom.xml"}' {"status":19,"message":"Amazon S3 File has been attached to Project. File ID #19"} %

 

Upload new Amazon S3 File via REST API.

POST http://localhost:8080/rest/amazonawssvcint/1.0/utility/upload/document

Parameters:

  • projectKey (String) - (Required)

  • bucketConfigId (Number) - (Required)

  • file (Blob) - (Required)

  • updateDocument (Boolean) - Optional

Response: [Status: 200]

% curl -u admin -XPOST "http://localhost:8080/rest/amazonawssvcint/1.0/utility/upload/document" \ -H "X-Atlassian-Token: no-check" -F bucketId=4 -F projectKey=DT -F file=@/tmp/pom.xml {"status":0,"message":"Project S3 File Upload Successful. (documents/DT/pom.xml)"} %

To overwrite: -F updateDocument=true

 

Detach Amazon S3 Document on Jira

DELETE http://localhost:8080/rest/projects3documents/1.0/utility/detach/document

Query Parameters:

  • projectKey (String) or projectId (Number) - (Required)

  • documentId (Number) - Optional

 

IAM User Utilities REST API