Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
dev:web_api:v3:write_requests [2018/12/28 02:52] – [JSON Object Data] Removing the Expect header in cURL no longer seems to be required dstillman | dev:web_api:v3:write_requests [2019/03/11 18:00] – [Multi-Object Requests] dstillman | ||
---|---|---|---|
Line 58: | Line 58: | ||
< | < | ||
- | $ URL=" | + | $ URL=" |
- | $ curl $URL > items.json | + | $ API_KEY="P9NiFoyLeZu2bZNvvuQPDWsd" |
+ | $ curl -H " | ||
$ vi items.json | $ vi items.json | ||
- | $ curl -d @items.json -v $URL | + | $ curl -H " |
</ | </ | ||
Line 67: | Line 68: | ||
This approach allows a complicated task such as batch editing to be performed using only cURL and a text editor. Any objects modified in the text file will be updated on the server, while unmodified objects will be left unchanged. | This approach allows a complicated task such as batch editing to be performed using only cURL and a text editor. Any objects modified in the text file will be updated on the server, while unmodified objects will be left unchanged. | ||
+ | |||
+ | A similar process can be used with PUT for individual objects: | ||
+ | |||
+ | < | ||
+ | $ URL=" | ||
+ | $ API_KEY=" | ||
+ | $ curl -H " | ||
+ | $ vi items.json | ||
+ | $ curl -H " | ||
+ | </ | ||
Note that when uploading full JSON, only the '' | Note that when uploading full JSON, only the '' | ||
Line 410: | Line 421: | ||
< | < | ||
- | "success": { | + | "successful": { |
- | " | + | " |
- | " | + | " |
}, | }, | ||
" | " | ||
Line 431: | Line 442: | ||
}</ | }</ | ||
- | The keys of the '' | + | The keys of the '' |
^ Common responses ^^ | ^ Common responses ^^ |