| FRAMES | NO FRAMES | Description | Parameters | Examples | Response |
| URL | http://<attachments-url>/add |
|---|---|
| Parent Resource | Attachments |
| Parameter | Details |
|---|---|
| f | Description: The response format. The default response format is html. Values: html | json |
| user | Required Description: The username of the client. |
| storageType | Description: Determines whether the attachment is
a linked file (1), an embedded file (2), or a linked URL (3).
The default storage type is 2 (embedded file).Values: 1 | 2 | 3 |
| filePath | Required (for linked attachments) Description: File path or URL that is to be linked. This can be either a local file path (e.g. C:\Documents\MyFile.pdf), a shared folder (e.g. \\server\WorkflowDocs\MyFile.pdf), or a URL (e.g. http://www.arcgis.com/). |
Example 1: URL for adding a linked file attachment to job ID 5 in the "Workflow" service on sampleserver.
http://sampleserver/arcgis/rest/services/Workflow/WMServer/jobs/5/attachments/add?user=cjones&storageType=1&filePath=C:\Documents\Job_Guidelines.pdfExample 2: URL for uploading a file as an embedded attachment to job ID 5 in the "Workflow" service on sampleserver.
http://sampleserver/arcgis/rest/services/Workflow/WMServer/jobs/5/attachments/add?user=cjones&storageType=2Example 3: URL for adding a linked URL attachment to job ID 5 in the "Workflow" service on sampleserver.
http://sampleserver/arcgis/rest/services/Workflow/WMServer/jobs/5/attachments/add?user=cjones&storageType=3&filePath=http%3A%2F%2Fwww.arcgis.com
{
"attachmentId": <attachmentId>
}
{
"attachmentId": 21
}