Skip to content

dstanizzo/Dynatrace-API-Grail.Storage.Management-Postman-Collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dynatrace-API-Grail.Storage.Management-Postman-Collection

Postman Collection for The Dynatrace Bucket Management API for Grail with all the explanation and support to use the new Oauth2 client. I've added variables for security and to make them easy to use with multiple Dynatrace Accounts by utilizing Postman Environments.

How to

1. Create an Oauth2 Client in Dynatrace

  • Open the User menu and select Account settings (in latest Dynatrace, Account Management).

  • On the top navigation bar, go to Identity & access management > OAuth clients.

  • Select Create client.

  • Provide an email of the user who owns the client.

  • Provide a description for the new client.

  • Select the required token scopes. These are the scopes that the client will be able to grant. Tokens generated by the client might have different scope sets.

    • Grants permission to read records from the events-table storage:events:read
    • Grants permission to read timeseries from the metrics-table storage:metrics:read
    • Grants permission to read records from the logs-table storage:logs:read
    • Grants permission to read records from the entities-table storage:entities:read
    • Grants permission to read records from the bizevents-table storage:bizevents:read
    • Grants permission to read records from all system tables storage:system:read
    • Grants permission to read records from Grail buckets. Required additionally to a table permission. storage:buckets:read
    • Grants permission to read bucket definitions from Grail storage:bucket-definitions:read
    • Grants permission to write bucket definitions to Grail storage:bucket-definitions:write
    • Grants permission to delete bucket definitions from Grail storage:bucket-definitions:delete
    • Grants permission to delete all records from a bucket (not delete the bucket itself) in Grail. storage:bucket-definitions:truncate
  • Select Create client.

  • Copy the generated information to the clipboard. Store it in a password manager for future use.

    Follow this Video for Reference

2. Create an Environment for your Collection in Postman

Environment

  • Select Environments.
  • Click the + sign.
  • Name your Environment.
  • The environment needs that you define these variables:
    • DT_CLIENT_ID Provided when you create the Oauth2 client in step 1.
    • DT_CLIENT_SECRET Provided when you create the Oauth2 client in step 1.
    • DT_ACCOUNT_URN Provided when you create the Oauth2 client in step 1.
    • DT_UUID Same value of DT_ACCOUNT_URN but stripping the urn:account:
    • DT_SCOPE A list of required scopes separated by a whitespace.
    • DT_TOKEN_URL ⚠️ PLEASE DON'T CHANGE THIS VALUE ⚠️ The URL https://sso.dynatrace.com/sso/oauth2/token where you need to obtain your Bearer token after create the Oauth2 client.
    • DT_TOKEN_NAME The name for your token.
    • DT_TOKEN In this variable you will store your assigned dynamic token.
    • DT_HOST ⚠️ PLEASE DON'T CHANGE THIS VALUE ⚠️ The URL api.dynatrace.com of the Dynatrace API for Account Management.
    • DT_SaaS_HOST Your Environment ID url for the Latest Dynatrace {your-environment-id}.apps.dynatrace.com
  • Leave this Environment Selected.

3. Import Dynatrace Grail Storage Management API Collection

Import Collection

  • Download the Dynatrace Grail Storage Management JSON from the repository.
  • Select Collections.
  • Click on Import and choose the previously downloaded JSON.
  • Your Dynatrace Grail Storage Management API v1 Collection has been added to your collection.

4. Get your Bearer Token

Get Ready

  • ⚠️ DON'T FORGET TO HAVE SELECTED THE ENVIRONMENT CREATED IN STEP 2 ⚠️
  • Select your recently imported Dynatrace Grail Storage Management API v1 Collection.
  • Click on the Authorization tab.
  • Click on Get New Access Token.
  • Wait until the token has been collected.
  • Click on Use Token.
  • ⚠️ BE SURE TO SELECT ALL YOUR TOKEN ⚠️ And then select Set as variable.
  • Choose the DT_TOKEN variable to store your new Bearer Token.

5. Ready, Set, Go

Get Ready

  • ⚠️ DON'T FORGET TO HAVE SELECTED THE ENVIRONMENT CREATED IN STEP 2 ⚠️
  • Select Collections.
  • Then Select the Request you want to use and check the parameters.
  • Click on Send.
  • And if everything goes well you get your Response.

About

Postman Collection for the Dynatrace Bucket Management API for Grail.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published