Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
dev:web_api:v3:write_requests [2015/03/17 17:53] – [Saved Search Requests] dstillmandev: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
Line 61: Line 61:
 $ curl $URL > items.json $ curl $URL > items.json
 $ vi items.json  # edit the item data $ vi items.json  # edit the item data
-$ curl -d @items.json -v -H "Expect:" $URL+$ curl -d @items.json -v $URL
 </code> </code>
  
-In this example, a JSON array of items is being saved to a text file, modified in a text editor, and then POSTed back to the same URL. (The ''-H %%"%%Expect:%%"%%'' is a requirement for cURL-based uploads, in order to disable sending of the unsupported ''Expect'' header.)+In this example, a JSON array of items is being saved to a text file, modified in a text editor, and then POSTed back to the same URL.
  
 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.
Line 349: Line 349:
  
 ^ Common responses ^^ ^ Common responses ^^
-| ''200 OK'' | The searches were created. |+| ''200 OK'' | The request completed without a general error. See the response JSON for status of individual writes. |
 | ''409 Conflict'' | The target library is locked. | | ''409 Conflict'' | The target library is locked. |
 | ''412 Precondition Failed'' | The provided Zotero-Write-Token has already been submitted. | | ''412 Precondition Failed'' | The provided Zotero-Write-Token has already been submitted. |
dev/web_api/v3/write_requests.txt · Last modified: 2021/06/02 16:30 by dstillman