API (Application programming interfaces) is an interface for interacting with a web server, with the most common use case being data retrieval. (Just like a person can by loading pages and submitting forms.)
Document360 RESTful API’s will allow you to integrate your documentation with your software, allowing you to easily on-board new users, manage your articles and more – Document360 API Reference
Check out this video for a quick overview on how you can use the API’s in Document360.
What Problem do APIs Solve?
APIs are built as an attempt to free the data from the clutches of these web interfaces and be able to perform actions without requiring a login to the website. Basically, an API specifies how software components should interact.
Companies these days all seem to promise that they have an “easy to use API” and that their customers can use this API to fetch and process the data. They are often unusable by anyone outside the software department; sometimes because of a lack of programming knowledge.
The user makes a “request” to a web server, that web server accesses a database (with the customer data) and returns it to the requester in a “response”. (This same request/response cycle is used when you access web pages in your browser.)
So, you can typically perform the same actions that you would normally do via the web browser pages.
Getting Started with API’s in Document360
For these API usage examples, we will use a Postman collection to showcase the functionality.
All of our APIs currently supports the following HTTP verbs:
Used for retrieving resources.
Used for creating resources.
Used for replacing resources or collections.
Used for deleting resources.
The tokens are bound to a specific project and will only allow operating on elements within the project scope.
You are required to supply the token with every request in order to gain access to your data, otherwise, the call will fail, and an appropriate error message will be shown.
Generating API Token
Navigate to API Token in Settings page (Project > Settings > API Token ).
You can generate multiple tokens each with a different name and HTTP method access. To generate a new token simply provide a friendly name and select required HTTP methods, a confirmation pop-up will show, and a token will be generated in the table below.
Copy your token using the copy button or triple click on the token itself to select it.
Image #1 API Token
Once you have the token, you can then use the various API’s and supply the parameters as requested in the API reference docs.
URL Naming convention
- The base API endpoint is https://apihub.document360.io/v1/, followed by the type of resource in a plural form (Projectversions,Teams,Articles,Categories) ,
For example https://apihub.document360.io/v1/projects
Read more in API Documentation Core Concepts-Requests
A typical example, could be an admin would like to add user’s using an API, rather than manually entering each user’s name & Email one at a time.
- Put the Base API Endpoint, API Token in the Headers and formulate the Body according to the parameters required to mention in the API docs.
Note: You would need to retrieve the ID of the inviting user using another API (Get Users)
Image #2: Create User
- Once the Send Button is pressed, this should then automatically create a user for you without you having to login to the portal and add users manually.
Search in a Project (Keyword)
A typical example could be searching for keywords in your knowledge base without having to actually open the website and search.
Note: You would need to get the Project version id using another API (Get ProjectVersions)
Image #3 Search
Thus, API’s eliminates the need for users to actually have to login and perform tasks.
We suggest spending time with API Docs first, to get a better understanding of how it can help you.
Check out Document360 today to generate the token and access the API’s.