Anyone who is experienced with API development, primarily developers, who wishes to communicate with Carbonio Files using its SOAP API should refer to this section. Therefore, it is believed that everyone reading this section is familiar with the fundamentals of SOAP API calls.
Token of Authentication
An authentication token is necessary for each API call and may be obtained by using the AuthRequest SOAP command:
The token is included in the AuthResponse that this call returns.
Every REST request must include the token as a cookie, which means it must be transmitted to the server through the Cookie header:
Request Structure for API
Requests to the Carbonio Files API are sent as HTTP POST requests to the Carbonio server on the following path as GraphQL queries with the Cookie header specified in the preceding section:
The request body is a JSON-encoded object that includes a GraphQL query, the operation name, the variables used and some restrictions on them. A few sample queries are provided below. The reference documentation for the Carbonio Files GraphQL API can be found at https://docs.zextras.com/apidoc/files_meta/. Information on the elements is provided in the following section.
Queries
- The node’s distinctive identification is node_id.
- version is a file’s current version.
- Query techniques include some of the following:
- The root folders (LOCAL_ROOT and TRASH_ROOT) are returned by getRootsList.
- From its node_id, getNode gives a node.
- You may search for a node using keywords and a number of filters (shared by/with me, etc.) with findNodes.
- You may list a folder’s children as an array of Nodes by using the children property of the Folder object.
Mutations
- It goes without saying that createFolder, flagNodes, trashNodes, restoreNodes, moveNodes, copyNodes, and deleteNodes
- A node’s name, description, and other information can be changed using the updateNode function.