ResourceSpace offers numerous ready-to-go integrations with the other systems you rely on, like Google Workspace, Canva, Adobe Suite, Microsoft Office, social media platforms and more. However, for everything else, we implement a full REST API.
What is a REST API?
A REST API, or Representational State Transfer Application Programming Interface, is a set of rules and conventions for building and interacting with web services. It allows different software systems to communicate over the internet using standard HTTP methods such as GET, POST, PUT, and DELETE.
REST APIs are designed to be stateless, meaning each request from a client to the server must contain all the information needed to understand and process the request. This statelessness makes REST APIs highly scalable and efficient, as the server does not need to store any session information about the client.
REST APIs in DAM systems
In the context of Digital Asset Management (DAM) systems like ResourceSpace, a REST API is crucial for enabling seamless integration with other software applications. This interoperability ensures that digital assets such as images, videos, and documents can be easily accessed, managed, and distributed across various platforms, enhancing workflow efficiency and collaboration.
Moreover, REST APIs are typically designed to be easy to use and understand, often employing JSON or XML for data interchange. This simplicity makes it easier for developers to implement and maintain integrations, reducing the time and cost associated with custom development. In a DAM system, a well-designed REST API can provide endpoints for uploading, retrieving, updating, and deleting digital assets, as well as for managing metadata, user permissions, and other administrative functions.
What can you do with the ResourceSpace REST API?
The ResourceSpace REST API allows access to the DAM system’s internal functions, including asset uploading and downloading, transcode, edit and search. What’s more, our API test tool can even write code for you and allows you to try out commands directly in the ResourceSpace interface before deploying it in your development environment.
Getting started with the ResourceSpace API
The ResourceSpace API is enabled by default, although you can disable it by changing the enable_remote_apis config option in config.php.
All API requests must be signed using a private key specific to each user, and this can be performed via GET or POST. To make an API call, simply access the /api/ URL of your ResourceSpace installation with the following parameters:
|
user |
The alphanumeric ID of the user to access the system as, for example "admin". Use the function urlencode (or similar) on any usernames that contain special characters such as @ or use the encode value within the string. |
| function | The function you wish to perform. See the API function reference for more details. |
| param1, param2, param3... | The parameters to pass to each function. These are specific to each function and are documented in the function reference. It's important that the values are properly percent-encoded. Parameters can be passed by name. This allows requests to miss optional parameters if default is OK. Use the function urlencode (or similar) on any parameter that contain special characters such as @ | ) or use the encode value within the string. |
| sign | The signature. In order to ensure API requests are not 'tampered with' during transmission we require the caller to build a signature string. This is generated by taking the API key (Session or user) then appending the query URL, and finally producing a sha256 hexadecimal hash of that string. |
| authmode |
The authentication mode. This must be the last parameter passed and can be set to one of the following:
From v10.2, native authmode requires a valid CSRF token to be POSTed for state changing operations. If failing to provide one, ResourceSpace will return an appropriate error message. The CSRF token should be provided using the configurable identifier. |