Client SDKs

Using cURL

This page is scheduled for review and update. Check back soon for updated content!

In this example we are using the UNIX curl command line tool to demonstrate how to invoke remote operations.

In a Windows environment, Nuxeo recommends to use cygwin shell to avoid all formatting request issue using default shell like Powershell

  1. Here is how to create a new File document type on the Nuxeo demo instance, right under the default domain (you can copy, paste and test):

    curl -X POST -H "Content-Type: application/json" -u Administrator:Administrator -d '{ "entity-type": "document", "name":"newDoc", "type": "File","properties": { "dc:title": "Specifications", "dc:description": "Created via a so cool and simple REST API", "common:icon": "/icons/file.gif", "common:icon-expanded": null, "common:size": null}}'
  2. You can get the new resource doing a standard GET (actually the JSON object was already returned in previous response):

    curl -X GET -u Administrator:Administrator
  3. Now, "lock" this document we have just created by calling an Automation operation from command API on the document resource.

    curl -X POST -H "Content-Type: application/json+nxrequest"   -u Administrator:Administrator -d '{"params":{}}'

    Pay attention to the Content-Type that is specific when using the @op adapter.

    You can check the result of your request on the web app ([email protected]_domains, credentials:  Administrator/Administrator).

  4. You can also directly call an automation operation or chain, from the "Command endpoint". Here we return all the worskpaces of the instance:

    curl -H 'Content-Type:application/json+nxrequest' -X POST -d '{"params":{"query":"SELECT * FROM Document WHERE ecm:primaryType=\"Workspace\""},"context":{}}'   -u Administrator:Administrator

a month ago Manon Lumeau S3 direct upload: specify the minimum right the IAM role must have
3 years ago Benoit Delbosc 17 | ix the Lock url by adding a missing "/
5 years ago Laurent Doguin 16
5 years ago Solen Guitter 15
5 years ago Vladimir Pasquier 14
6 years ago Solen Guitter 13
7 years ago Arnaud Kervern 11
7 years ago Arnaud Kervern 12 | Migrated to Confluence 4.0
8 years ago Bogdan Stefanescu 10 | example is not working when using '*' - server side exception
9 years ago Stéfane Fermigier 9
9 years ago Stéfane Fermigier 8
9 years ago Stéfane Fermigier 6
9 years ago Stéfane Fermigier 7
9 years ago Stéfane Fermigier 5
9 years ago Bogdan Stefanescu 4
9 years ago Bogdan Stefanescu 3
9 years ago Bogdan Stefanescu 2
9 years ago Bogdan Stefanescu 1
History: Created by Bogdan Stefanescu

We'd love to hear your thoughts!

All fields required