Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

Attach / Link existing Amazon S3

...

File to Project via REST API.

POST http://localhost:8080/rest/projects3documentsamazonawssvcint/1.0/utility/attach/documentsdocument

Required Schema FieldsParameters:

  • projectKey (String) - (Required)

  • bucketConfigId (Number) - Jira Project Key(Required)

  • documentKey (String) - AWS S3 Document Path(Required)

Response: [Status: 200]

Code Block
$% curl -u"user:password" admin -XPOST \
"http://localhost:8080/rest/projects3documentsamazonawssvcint/1.0/utility/attach/documentsdocument" \
   -H "Content-Type: application/json" --data "{\'{"bucketConfigId": 4, "projectKey\":\ "SWTEST\DT", \
   "documentKey\": \ \"test2/README\"}""s3://ilaesolution/documents/DT/pom.xml"}'
{"status":1719,"message":"Amazon S3 File has been attached to Project. File ID #19"[Info] }
%

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]

Code Block
% 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 DocumentFile hasUpload been attached.Successful. (documents/DT/pom.xml)"}
$%

To overwrite: -F updateDocument=true

Detach Amazon S3 Document on Jira

...