* Article is under review *
Introduction
We have implemented a REST API as a method for (advanced) users to access and modify their LYNX data without needing the LYNX client. This is useful for:
- Users who want to retrieve a lot of data straight from the database instead of relying on exports from the reporting module.
- Users who want to build different applications to view their data dynamically. For example, a dashboard on a website, where they can feed the data directly from LYNX to their application.
The link to the REST API: https://lynx.a-dato.com/api/
All the available endpoints for the different objects can be found in the swagger documentation.
Please note: the REST API is a new development and is still in progress, therefore it is subject to change. We will keep this documentation up to date as things change. If you find any issues or have any ideas for improvement, please contact our support via emailing support@a-dato.zendesk.com.
What is REST API
API stands for application programming interface. It is a way for devices/applications to interact together and shares data. In this case, allowing a user to retrieve data from our system/database.
REST stands for representational state transfer. It is an architectural style for API which uses HTTP requests to interact with the data. This allows the data to be useable on the web.
Downside for using a REST API is the users using it are required to have some technical knowledge and be able to work with JSON and GET/PUT/DELETE API requests. Our documentation is meant to guide users with some background in the previously mentioned items.
Authentication
You can view all the available endpoints in the Swagger documentation that can be found here: https://lynx.a-dato.com/api/index.html.
However, to be able to try out the endpoints in the Swagger documentation, you are required to login in the Swagger documentation, or another client via the following steps:
- Login into Lynx.
- Go to the user icon on the top right corner and choose "My Profile".
- Under the "API Key" tab
- Choose the expiring duration for the API Key.
- Generate the key and copy the API key.
- Click on the "Authorize" button.
- Paste the API Key to login
Please note: The generated API Key is not stored anywhere, so we recommend that you store it somewhere.
- If you lose the API key, you can generate another one, which will over-ride the old one.
- If you no longer need the API key, you can use the "Revoke API Key" to disable access using that key.
Please note: To access the REST API, you will need the REST API key for authorization.
- Using Swagger Docs: Simply click the "Authorize" button and enter your REST API key.
- Using Other Clients: Include your REST API key in the Authorization header of your HTTP request, like this:
Authorization: Bearer <REST API key>
Important: The REST API key is a JWT bearer token, so make sure to use the Bearer keyword before the token when including it in the Authorization header.
Available objects:
The common API call takes care of the following objects:
- Me: This contains the information of the current session and the logged in user
- Users: This is the user data for the current active space.
- Projects: This is the projects data for the current active space.
- Spaces: This is the list of spaces the current user has access to.
- Resources: This is the list of resources in the current active space.
- Resourceclasses: This is the list of skills in the current active space.
- Unitofmeasures: This is the list of Units of Measures in the current active space.
- Calendars: This is the list of calendars in the current active space.
- Budgetgroups: This is the list of budget groups in the current active space.
All the other objects are child objects of parent objects. You can check the Swagger documentation for the valid endpoints for each object and child object. At the end of the documentation, you can also see the schemas of each object which shows the structure of the objects.
What can be done?
Using the REST API, you can:
- Use GET request: retrieve data from your spaces.
- Use filters to filter your retrieved data.
- Use PUT request: modify or add new data from/to your spaces.
- Use PATCH request: modify data with specific fields in your current space.
- Use Delete request: delete data from your spaces.
Please check the links above for more details on each.
Comments
0 comments
Please sign in to leave a comment.