INTERNAL: This API is offered to DPDHL internal developers only
Confluence is a documentation platform that can be integrated with other tools. As part of Atlassian tool family, it provides the ability to create scripts and develop integration or build functionalities that simplify complex tasks and automate routine activities.
API users would typically perform the following operations:
• Authenticate via personal access tokens
• Get content and space properties
• Manipulate with data entities via CRUD operations (GET, PUT, POST, and DELETE)
• Perform advance searches
URL: confluence.dhl.com
Scope
Confluence provides REST API that you can interact with using http requests, curl, or third party libraries. This page will enable you the access to ITS Instance of Confluence via published end-points.
Using the API
The easiest way to get started with the API is to get information about yourself, as a Confluence user. For this, head over to your browser or command line window and continue with the following section.
Example Use Cases
Get user information
This example get information about the particular user.
Curl Example: curl -D- --X GET -H "Content-Type: application/json" -H "Authorization: Bearer <token>" https://apihub-int.dhl.com/confluence/v1/user?username=<LDAP>
Advanced search
Using advanced search to look for object with particular properties, for example objects created by a particular user.
Curl Example: curl -D- --X GET -H "Content-Type: application/json" -H "Authorization: Bearer <token>" https://apihub-int.dhl.com/confluence/v1/search?cql=creator=<LDAP>
Fetch spaces
The following command gets list of spaces. Additional parameters may be used to limit the search (as described in REST API reference).
Curl Example: curl -D- --X GET -H "Content-Type: application/json" -H "Authorization: Bearer <token>" https://apihub-int.dhl.com/confluence/v1/space
These examples are just the first steps to get familiar with Confluence API.
Get Access
For REST API you need to authenticate to the Confluence server. Thus you need to generate a personal access token to authenticate to Confluence. For the automated-process type of calling (e.g. tool-tool) you should use a system account and generate the access token for the service account.
1. Log in to Confluence and click on Settings under your profile icon.
2. Go to Personal Access Tokens and click Create Token.
3. Enter the descriptive name, expiration, and click Create.
4. On the next screen make sure to copy the token and store it. This token will be used in the command line to access Confluence API
Authentication
Use token as "Authorization: Bearer <token>" to use this API.
Environments
Environment: https://apihub-int.dhl.com
Description: Production environment
Rate Limits
120pm
Additional Information
DPDHL internal team has developed several end-points that are extending the Confluence APIs. You can find the Swagger description of these end-points here:
https://devtools.dhl.com/api/service/swagger-ui.html#/Confluence_endpoints
N/A
1.0.0
- Initial launch