Document toolboxDocument toolbox

Simple dRofus Read/Write API in Postman

1. Set up Environment Variables

In your Postman workspace, configure the following environment variables to manage authentication, provided by Balazs:

  • client_id

  • client_secret

image-20241010-115419.png

2. Collection Variables Setup

  • BASE_URL: <https://api-no.drofus.com/api> (for Nordics)

  • DB: (database name)

  • PR: (if other than 01)

  • SCOPE: dr-std (required)

  • ACCESS_TOKEN: <https://ids-db2.drofus.com/connect/token> (OAuth token endpoint)

  • Other application-specific variables: Any additional variables needed for your specific API interactions.

image-20241010-115447.png

3. Authentication Setup in Collection

Configure the authentication method for API requests as follows:

  • Auth type: OAuth2

  • Grant type: Client Credentials

  • Access Token URL: {{ACCESS_TOKEN}}

  • Client ID: {{client_id}}

  • Client Secret: {{client_secret}}

  • Scope: {{SCOPE}}

  • Client Authentication: Send as Basic Auth header

4. Set Up API Requests

With authentication and variables configured, you can now set up API requests. Refer to API docs (Swagger) https://drofus.atlassian.net/wiki/x/dYWnU

Example requests could be:

  • GET a list of Items named "Chair"

  • PATCH an Item with a Note