Module page to collect tips for using the Web API REST Examples.
Collection of Tips for using the Web API Examples.
The cURL option -d @filename assumes the data that shall be used to PATCH the given resources is in the given file. If you prefer a one-liner the escaped content of the file must follow directly the -d option:
curl -n -X PATCH -H "Content-Type: application/json" \
https://www.smartics.eu/confluence/rest/projectdoc/1/document.json?id-list=70189553 \
-d '{"property":[{"name":"Customer Support URL","value":"<a href=\"https://example.atlassian.net/servicedesk/customer/portal/1\">Customer Support</a>","controls":"","position":"after","ref":"Short Name"}, "name":"Service Contact","value":"<a href=\"mailto:support@example.com\">support@example.com</a>","controls":"","position":"after","ref":"Iteration"}]}'
Using cURL it is necessary that the strings of the Query-part of an URL are correctly urlencoded.
e.g. ?where=$<Dokumenttyp>=[it-service] is not a valid query string
So the string following the equal sign must be urlencoded e.g using the linux-urlencode command:
myuser@home ~ # urlencode "$<Dokumenttyp>=[it-service]"
%24%3CDokumenttyp%3E%3D%5Bit-service%5D
This results to the following complete query string:
?where=%24%3CDokumenttyp%3E%3D%5Bit-service%5D
Name |
Short Description |
Doctype |
|
Delete properties for a set of documents specified by their IDs. |
section |
|
Specify a query to fetch document IDs. Pass this list of IDs to other service calls (e.g. to patch properties or sections). |
section |
|
Add properties for a set of documents specified by their IDs. |
section |