FileUpload
Use this resource to add file attachments to process activities or work items.
Method summary
HTTP Method | Path | Description |
---|---|---|
POST | /scr/api/FileUpload | Adds file attachments to process activities or work items. |
POST /scr/api/FileUpload
- Description
- Use this method to add file attachments to process activities or work items.
- Resource information
-
Requirements Description Response format JSON Requires authentication Yes. The user must have author access to the process that the file is attached to. Supports OAuth 2 client credentials Yes using a User Service ID containing Artifact Authoring Category Rate limited Not yet
- Parameters
- The entries for locationField, ancestorIdField, parentIdField, and fileData must be passed in standard multipart and multiform data format.
- Response
-
- Example output
-
{ "size":"3.0", "parentId":"", "uploadUserId":"7f0002", "fileItemId":"123b", "name":"testFileUpload", "ancestorId":"", "uploadDate":"1441217698308", "status":"SUCCESS", "isPublic":"false", "location":"instance", "uploadUserName":"admin", "version":"20160630", "type":"1", "id":"5f501e134978a" }
- Response properties
-
- uploadUserId
- The ID of the user who uploaded the file.
- location
- The location that the file was uploaded to.
- status
- The string value that indicates the result of the upload attempt. The possible values include:
- SUCCESS
- The operation was successful.
- FAILED
- The upload failed.
- FAILED_DELETED
- The upload failed. Verify the file does not contain a virus, and try again.
- SIZE
- The upload failed because the file was larger than 50 MB.
- SPACE
- The upload failed because the account did not have enough space available.
- type
- The type of file or document with the associated numeric value.
Type value Description 1 Generic document. Used if the file doesn't fall under one of the other values. 2 Microsoft Excel file 3 Image 4 PDF document 5 Microsoft PowerPoint document 6 Microsoft Project document 7 Microsoft Visio document 8 Microsoft Word document 9 Text file - version
- The version of the API that was used to create the response.
- size
- The size of the uploaded file in bytes.
- id
- The ID of the uploaded profile. Use this ID with the
FileDownload
service to download the file. - parentId
- The ID of the parent item that the uploaded file is attached to.
- name
- The name of the uploaded file.
- ancestorId
- The ID of the ancestor that the uploaded file belongs to.
- uploadDate
- The date the file was uploaded. The value is expressed in milliseconds since epoch, which is 1 January 1970 at midnight Coordinated Universal Time (UTC).
- uploadUserName
- The name of the user who uploaded the file.
- Response messages
-
HTTP code Reason 200 The request was completed successfully.
401 The user isn't authorized to make the request.
405 The specified method is not allowed. Select POST method.