Getting started
The DevRev API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
If you’re new to DevRev APIs, you’ve come to the right place. Our APIs serve as the foundation for integrating your apps, building automations, and creating custom snap-ins. You can also refer to our Postman collection.
You can use the DevRev API in test a demo organization which doesn’t affect your live data or interact with your real customers.
To create a new organization in DevRev:
- Click on your profile picture on the top left corner.
- Go to the Orgs section and click on +.
- Fill in the details and click Create.
Now you can find your newly created org in Orgs.
Login into your demo org and obtain the PAT token. Now you can use this PAT token to make test API calls and try building something new.
In this tutorial, you will be able to retrive your account information by using the dev-users
API. Let’s get started with DevRev APIs.
Prerequisites
First, create a DevRev account or log in.
Every call to a DevRev API must include a PAT. After you create your account, generate a personal access token and store it in a safe place.
In this guide, you’ll make a call to the dev-users.self
API which gets the authenticated user’s information. You will retrieve the user object created for your account on DevRev. This user object contains information such as a unique identifier, full name, display name, and profile picture.
Every object in DevRev is uniquely identified by an id
known as DevRev Object Notation (DON). DON id
can be found in the API response.
The value SELF
can be passed in as id
to reference the logged-in user.
The display-id
shown in the UI for work item objects such as issues and tickets can be used interchangeably with the id
to enhance usability. In the image below, ISS-69
serves as an example of a display-id
for issues.
Next, you’ll want to set up your development environment to connect and interact with the DevRev API.
Send your first API request
To do this, make a GET request to the DevRev server (“https://api.devrev.ai/dev-users.self”) and include the PAT created in the authorization header of the request.
This guide shows you how to get user information with a GET request using two popular languages as well as cURL:
Making a GET request
If everything works, the command line displays the following response for a user named “John Smith Doe”:
The response contains "id": "don:identity:dvrv-us-1:devo/20:devu/40",
. The id
identifies the devo
ID (Dev organization ID) as devo/<devo-id>
and the devu
ID (Dev user ID) as devu/<devu-id>
.
In the present response, devo/<devo-id>
is 20, and devu/<devu-id>
is 40, respectively.
In general, you can find devo, devu, revo, revu IDs in the id
or external_ref
fields of the API response.
Facing an error while authenticating the APIs? Refer to our errors guide to learn more about our error codes.
Next steps
You’re all set to explore our platform. You are ready to browse through our APIs and build your first integration with DevRev.