Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
titleExample
Transclusion
documentDocuments Service / PATCH
idsfetch-document-IDs-with-curl

Code Block
languagetext
titlecURL Call
curl -n -X PATCH  -H "Content-Type: application/json" \
    https://example.com/confluence/rest/projectdoc/1/document?id-list=12845218,12845219,12845221 \
    -d @insertProperties.json
Using curl -n assumes you are using a .netrc file to authenticate. Please see REST Login to Confluence with cURL for more options.
projectdoc-box-tiptransclusion-macro
documentTips for the Web API Examples
ids.netrc File

Code Block
languagejs
titleinsertProperties.json
 {
    "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"
      }
    ]
}

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"}]}'
projectdoc-boxtransclusion-tipmacro
documentTips for the Web API Examples
idsAlternative to curls -d option for files
Code Block

Section
titleSubordinate Sections
Display Table
doctypesection
render-no-hits-as-blanktrue
selectName, Short Description
restrict-to-immediate-childrentrue
sort-bySort Key, Name

...