Difference between revisions of "Create Job Attachment"
From MyMobileWorkers API
(→Summary) |
(→Example curl request) |
||
| Line 34: | Line 34: | ||
== Example curl request == | == Example curl request == | ||
| − | curl -F api_key=YOUR KEY -F job_number=AJOBNUMBER -F file=@/Users/lee_orritt/Pictures/lees_icon_lib/images/client/file.pdf "http:// | + | curl -F api_key=YOUR KEY -F job_number=AJOBNUMBER -F file=@/Users/lee_orritt/Pictures/lees_icon_lib/images/client/file.pdf "http://api.mymobileworkers.com:8080/api/1/jobs/job/attachments/attachment" |
== Responses == | == Responses == | ||
Revision as of 12:51, 14 November 2016
Contents |
Summary
| Create Job Attachment | ||
|---|---|---|
| URL | http://base_url/api_path/version/jobs/job/attachments/attachment | |
| Type | POST | |
| Params: | api_key | required |
| file | required | |
| job_number | required | |
| comment | required | |
| Response | JSON | |
The create job attachments method accepts an file to add as an attachement, the job_number of the job that the attachment references. an an optional comment.
If validate_only is set the jobs will only be validated and not actually inserted. This can be used to check an entire dataset for errors before submitting.
Example curl request
curl -F api_key=YOUR KEY -F job_number=AJOBNUMBER -F file=@/Users/lee_orritt/Pictures/lees_icon_lib/images/client/file.pdf "http://api.mymobileworkers.com:8080/api/1/jobs/job/attachments/attachment"
Responses
Example JSON
{"file":"tick.png","comment":"Transferred from API","created_at":"2013-05-20T14:42:37+00:00","job_status":"NEW"}