Developers

Developers

REST API reference → Projectrak REST API documentation

 

How to authenticate in Projectrak REST Api?

To authenticate the Projectrak REST API, generate an API key ID and API key. Customers must provide this information to access Projectrak data in your app.

 

Step 1. Go to the Project Navigator

Go to the Jira apps menu and click on the Projectrak access.

PTK Access.svg

 

Step 2. Go to API Integrations 

In the header of the Project Navigator there is a three dots icon. After clicking on it a menu appears. One option of this menu is “API integrations”.

 

Step 3. Create API key

After accessing to API integrations page, click on the blue button that appears on the center of the screen to create a new API key.

Fill the name and save the API key.

 

Step 4. Create your credentials

Copy or save temporarily the API key ID and API key to use them within the integration.

 

Using Projectrak API

Integrate your app with Projectrak using this API documentation: https://profields-cloud.deiser.com/swagger-ui.html

 

Login into Projectrak

The first service you will need to integrate your app with Projectrak is api-keys/jwt to create a new JWT (JSON web token):

https://profields-cloud.deiser.com/api-keys/jwt

Request example
> curl -X POST \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d "{\"name\": \"<API_KEY_ID>\",\"password\": \"<API_KEY>\"}" \ https://profields-cloud.deiser.com/api-keys/jwt

This will provide you with a JWT that you must incorporate in all calls. This JWT has an expiration date, if receive an error 401 in your calls, please create a new JWT again.

This JWT has an expiration date, if receive an error 401 in your calls, please create a new JWT again.

Response example
{     "jwt": "MzAwMDY5ZTgyMmFmIiwiYmFzZVVSTCI6Imh0dHBzOi8vcWE...",     "baseUrl": "https://documentation-deiser.atlassian.net",     "clientKey": "fabf8b45-e66c-3fa5-832b-684631f2d003",     "accountId": "60f02aedf85746438494e822af",     "created": "2022-02-17T10:22:15.121+0000",     "expired": "2022-02-18T02:22:15.121+0000" <--- EXPIRATION DATE }

 

Use the JWT in a request

To use the JWT in any request you need to use Bearer Authentication.

Request example
> curl -X GET \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer <JWT>" \ https://profields-cloud.deiser.com/fields