Difference between revisions of "Create Job Attachment"

From MyMobileWorkers API
Jump to: navigation, search
(Created page with "== Summary == {| border="1" class="wikitable" ! Create Job Attachment ! colspan="2" | |- ! URL | colspan="2" | http://base_url/api_path/version/jobs/job/attachments/attachm...")
 
(→‎Example curl request)
Line 34: Line 34:
  
 
== Example curl request ==
 
== Example curl request ==
−
curl -F api_key=rtskey -F job_number=JD45579_45892 -F file=@/Users/lee_orritt/Pictures/lees_icon_lib/images/client/tick.png "http://10.1.0.75:8080/api/1/jobs/job/attachments/attachment"
+
curl -F api_key=rtskey -F job_number=JD45579_45892 -F file=@/Users/lee_orritt/Pictures/lees_icon_lib/images/client/tick.png "http://live.mymobileworkers.com:8080/api/1/jobs/job/attachments/attachment"
  
 
== Responses ==
 
== Responses ==

Revision as of 14:53, 20 May 2013

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 optional
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. ant an optional comment.

If validate_only is set the jobs will only be validated but not actually inserted. This can be used to check an entire dataset for errors before submitting.

Example curl request

curl -F api_key=rtskey -F job_number=JD45579_45892 -F file=@/Users/lee_orritt/Pictures/lees_icon_lib/images/client/tick.png "http://live.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"}
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox