API Tokens and Token Roles

The Librato API requires authentication with every request. Authentication is accomplished with a user and token pair. User is the email address you used to create your Librato account.

To find your API tokens, log in to your Librato account, click on the Integrations icon and then API Tokens. This will show you the list of API tokens you have available. Clicking on the token name shows you the token details and allows you to edit it.

account_api-tokens

If you accidentally publicized your secret token, you can set it to “Inactive” or delete it by clicking on the token name and then on the trash can at the bottom left of the window that opens up.

NOTE THAT THIS IS A DESTRUCTIVE ACTION!!!

Any existing integrations using your old token will cease to work as soon as you delete the API token.

Generate a New API Token

To generate a new API token click on the “Generate New API Token” button. You can further enhance security by limiting the token to a specific role.

token_roles

Your choices are:

  • Full Access: Full access to all resources, including user actions such as creating more API tokens.
  • Record Only: For agents and collectors to record metrics and measurements. May also view existing metric-related data.
  • View Only: Is a read only token.

API Token Role Permissions

The table below lists all the API Endpoints, and the API Token roles that are permitted to access them.

Path Method Full Access Record Only View Only
/v1/alerts GET  
  POST    
/v1/alerts/:id GET  
  PUT    
  DELETE    
/v1/alerts/:id/services POST    
/v1/alerts/:id/services/:service_id DELETE    
/v1/annotations GET
/v1/annotations/:name GET
  POST  
  PUT    
  DELETE    
/v1/annotations/:name/:id GET
  PUT    
  DELETE    
/v1/annotations/:name/:id/links POST    
/v1/annotations/:name/:id/links/:rel DELETE    
/v1/api_tokens GET    
  POST    
/v1/api_tokens/:id GET    
  PUT    
  DELETE    
/v1/measurements GET
  POST  
/v1/metrics GET
  DELETE    
/v1/metrics/:name GET
  PUT    
  DELETE    
/v1/services GET    
  POST    
/v1/services/:id GET    
  PUT    
  DELETE    
/v1/spaces GET  
  POST    
/v1/spaces/:id GET  
  PUT    
  DELETE    
/v1/spaces/:id/charts GET  
  POST    
/v1/spaces/:id/charts/:id GET  
  PUT    
  DELETE