API system services
LIBSAFE has an API to exchange information with other systems or ad-hoc developments by the user. This functionality makes it possible to automate the flow of data between systems without user intervention. Each system user has a profile with different permission levels and it allows accessing to certain requested data. The API validates the availability of the data according to the user’s profile through a unique token, previously assigned by the platform, and, depending on the user owner of the token and the level of permissions, then it provides de requested data.
There are a wide variety of end-points or query methods for obtaining related information with preserved objects such as: the objects’ list, the files within an object, the list of retrieval jobs of the objects or with higher detail level, such as the metadata of one object. All of these is possible to be obtained in such a structured format as JSON (JavaScript Object Notation). This format allows converting information from strings into structured objects or representations. The API is available in versions depending on access methods. On new releases the number of methods to provide more data has increased. Currently, the API has two versions (v2 and v3) this last being an extension of the previous and adds more end-points.
LIBSAFE’s web interface visualizes the access token and the technical documentation link of the API. This information is displayed in the user profile window where the token is found and the access to documentation implemented in apidoc format.
From the API documentation (apidoc) it is possible to use the token to make simple requests and to visualize all the details to make the request from the query environment. From each apidoc section, the interface shows all necessary parameters such as filters or conditions to include in the request, as well as the possible response structures with the corresponding http codes in the REST standard.
The apidoc documentation is available in two languages (Spanish and English), that are automatically configured based on the user’s language profile defined in LIBSAFE.
How to use the API
In order to consume the resources offered by the API, it is only necessary to know the token that identifies the user and to know the URL’s of the end-points of the API.
It is possible to obtain the user token through user profile in LIBSAFE, this data must be used from the main apidoc window, indicating to the system which is the user test profile and the associated permissions; by clicking in the Authorize button a dialogue box appears to indicate the token and after inserting it, it is possible to consume API resources; it is possible to define the token using one of each section of apidoc in the lock icon located in the right position of the main end-point; this lock icon redirects to the same window.
The URLs of the end-points can be accessed from the summary of each service presented in the apidoc technical documentation. This path is defined according to the LIBSAFE URL since the API is a subdomain of the LIBSAFE URL; so if the LIBSAFE URL is https://libsafe.com the API, depending on the version to be used, can be https://libsafe.com/api/v3 + end-point to be consumed.
The end-point to consume is indicated in the name of each one, e.g. to get the list of audit jobs, the end-point to use is /auditjobs and the full URL will be:
https://libsafe.com/api/v3/auditjobs
By clicking over apidoc section it is possible to execute some end-point and get immediate results; this mechanism is very useful to confirm the availability of the API, the response data format and the own HTTP request data as well as the technical data of the REST API. By executing this process the expected result contains: used URL, HTTP code or JSON response of the request.
By clicking “Try it out” (important to indicate the token previously) y defining request parameters values (optional and depending of required needs or available)
Finally clicking on “Execute” button
it is possible to obtain all consumed content from the end-point.
In order to be useful for developing external applications that can consume LIBSAFE’s API resources, with the result parameter: Request URL in which the entire URL of the end-point is indicated, together with the HTTP verb (get, post, put or delete), the parameters and the authorization token, all of this configured in a cURL request, the content found in the Response body section is obtained.
Last updated