This section is for anyone who is experienced with API programming (typically developers) who wishes to communicate with Carbonio Files via its SOAP API. As a result, it is expected that everyone reading this section is familiar with SOAP API calls.
Token of Authentication
Every API request necessitates the use of an authentication token, which may be obtained by using the AuthRequest SOAP command:
This method produces an AuthResponse with the following token:
The token must be used as a cookie on every REST request, which means it must be given to the server through the Cookie header:
API Requests Organisation
Requests to the Carbonio Files API are made as GraphQL queries with the Cookie header specified in the previous section, and are sent as HTTP POST requests to the Carbonio server at the following path:
The body of the request is a JSON-encoded object that contains the operation name, the variables involved, and certain restrictions on them, as well as a GraphQL query. A few examples of queries are given below; information on the components are provided in the next section, and reference documentation for the Carbonio Files GraphQL API is available at https://docs.zextras.com/apidoc/files_meta/.
- node_id is the node’s unique identification.
- version refers to a file’s version.
- The following ways are possible for a Query:
- The root folders (LOCAL_ROOT and TRASH_ROOT) are returned by getRootsList.
- getNode delivers a node based on the node_id.
- findNodes allows you to locate a node by using keywords and other criteria (shared by/with me, for example).
- The terms createFolder, flagNode, trashNode, restoreNode, moveNode, copyNode, and deleteNode are self-explanatory.