Utilising the Carbonio Files API

Have a Question?

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/.

A Query is used to return a Node and its characteristics, which can be a file or a folder saved on Carbonio Files, given two parameters:
  • 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).
You may list a folder’s children as an array of Nodes using the Folder object’s children property.
A Mutation is a file or folder write operation. Common activities include:
  • The terms createFolder, flagNode, trashNode, restoreNode, moveNode, copyNode, and deleteNode are self-explanatory.
The updateNode function is used to rename a node, alter its description, and modify other information Files. Downloads and uploads

There are a few methods for uploading (POST) and downloading (GET) files; for the latter, the requests to the Carbonio server must be on the path:

The complete reference documentation may be found at https://docs.zextras.com/apidoc/files_blob/.