Gamma API
ProjectsAttachments

Presign a comment attachment upload

POST
/api/projects/{projectId}/issues/{issueId}/comments/{commentId}/attachments/upload-url

The first of two steps: PUT the file to the URL, then register it. At most 25 MB, or 50 MB for a PDF on the record as a whole. Refused when a comment does not take this file now.

Who may call it: Anyone on the project whose permission profile allows issue.create. API keys: yes, given issue.create for this project.

Authorization

cookiegamma.session_token<token>

The session cookie a sign-in sets. Over HTTPS its name carries the __Secure- prefix. Browsers send it on their own; other clients keep it from the sign-in response.

Path Parameters

projectId*string

The project's id.

issueId*string
commentId*string

Request Body

application/json
  1. body
fileName*string
Match^[^/\\]+$
Length1 <= length <= 255
contentType*string
Length1 <= length <= 200
sizeBytes*integer
Range0 < value <= 9007199254740991
ownerField?|

The owner's field the file goes on; absent or null for the record as a whole.

Response Body

OK.

application/json
  1. response
url*string

PUT the file's bytes here, before expiresAt.

Formaturi
fileKey*string

Where it goes; send it back to register the upload.

expiresAt*string
Formatdate-time
Example Request
curl -X POST 'http://localhost:3000/api/projects/string/issues/string/comments/string/attachments/upload-url' \  -H 'Content-Type: application/json' \  -d '{  "fileName": "string",  "contentType": "string",  "sizeBytes": 1}'
Example Response
{  "url": "http://example.com",  "fileKey": "string",  "expiresAt": "2019-08-24T14:15:22Z"}