Dynatrace Platform Subscription API - manage cost allocation
The Dynatrace Cost Allocation feature incorporates two fields for cost centers and products. You can use either or both fields. These fields reflect your company's cost allocation structure, enabling you to develop two distinct perspectives: one based on your cost centers (for example, departments) and another based on your products or services (for example, Applicationname or ApplicationID). Of course, you can customize the use of these fields to fit your company's organizational framework.
Use Dynatrace Platform Subscription API to manage your products and cost centers at scale.
GET cost centers
Lists all the defined cost centers.
The request produces an application/json
payload.
GET |
|
Authentication
To execute this request, you need the Allow read access for usage and consumption resources (account-uac-read
) scope assigned to your token. To learn how to obtain and use it, see OAuth clients.
Parameters
The ID of the required account.
You can find the UUID on the Account Management > Identity & access management > OAuth clients page, during creation of an OAuth client.
The number of the requested page. Can be increased as long as hasNextPage is true in the response.
Defines the requested number of entries for the next page.
Response
Response codes
Success. The response contains a page of allowed cost-allocation values for the costcenter field.
The request was unacceptable, often due to missing a required parameter
No valid session provided
Access denied
Something went wrong on Account Management's end
Response body objects
The PaginatedFieldValueDto
object
Indicates if there is another page to load.
The FieldValueDto
object
The key of this value.
Response body JSON model
{"records": [{"key": "string"}],"hasNextPage": true}
POST cost centers
Add the provided value to the cost center field.
The request produces an application/json
payload.
POST |
|
Authentication
To execute this request, you need the Allow read access for usage and consumption resources (account-uac-read
) scope assigned to your token. To learn how to obtain and use it, see OAuth clients.
Parameters
The ID of the required account.
You can find the UUID on the Account Management > Identity & access management > OAuth clients page, during creation of an OAuth client.
Request body objects
The FieldValuesRequestDto
object
The FieldValueDto
object
The key of this value.
Request body JSON model
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"values": [{"key": "string"}]}
Response
Response codes
The response doesn't have a body. The values were added to the field.
The existing and provided values combined should not contain duplicate keys.
No valid session provided
Access denied
Something went wrong on Account Management's end
PUT cost centers
Replace the current values to the cost center field.
The request produces an application/json
payload.
PUT |
|
Authentication
To execute this request, you need the Allow read access for usage and consumption resources (account-uac-read
) scope assigned to your token. To learn how to obtain and use it, see OAuth clients.
Parameters
The ID of the required account.
You can find the UUID on the Account Management > Identity & access management > OAuth clients page, during creation of an OAuth client.
Request body objects
The FieldValuesRequestDto
object
The FieldValueDto
object
The key of this value.
Request body JSON model
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"values": [{"key": "string"}]}
Response
Response codes
The response doesn't have a body. The values of the field were replaced.
The provided values should not contain duplicate keys.
No valid session provided
Access denied
Something went wrong on Account Management's end
DELETE cost centers
Delete a value by key on the cost center field.
The request produces an application/json
payload.
DELETE |
|
Authentication
To execute this request, you need the Allow read access for usage and consumption resources (account-uac-read
) scope assigned to your token. To learn how to obtain and use it, see OAuth clients.
Parameters
The ID of the required account.
You can find the UUID on the Account Management > Identity & access management > OAuth clients page, during creation of an OAuth client.
The key for the field value.
Response
Response codes
The given value on the costcenter field was deleted.
The request was unacceptable, often due to missing a required parameter
No valid session provided
Access denied
Something went wrong on Account Management's end
GET products
Lists all the defined products.
The request produces an application/json
payload.
GET |
|
Authentication
To execute this request, you need the Allow read access for usage and consumption resources (account-uac-read
) scope assigned to your token. To learn how to obtain and use it, see OAuth clients.
Parameters
The ID of the required account.
You can find the UUID on the Account Management > Identity & access management > OAuth clients page, during creation of an OAuth client.
The number of the requested page. Can be increased as long as hasNextPage is true in the response.
Defines the requested number of entries for the next page.
Response
Response codes
Success. The response contains a page of allowed cost-allocation values for the product field.
The request was unacceptable, often due to missing a required parameter
No valid session provided
Access denied
Something went wrong on Account Management's end
Response body objects
The PaginatedFieldValueDto
object
Indicates if there is another page to load.
The FieldValueDto
object
The key of this value.
Response body JSON model
{"records": [{"key": "string"}],"hasNextPage": true}
POST products
Add the provided value to the product field.
The request produces an application/json
payload.
POST |
|
Authentication
To execute this request, you need the Allow read access for usage and consumption resources (account-uac-read
) scope assigned to your token. To learn how to obtain and use it, see OAuth clients.
Parameters
The ID of the required account.
You can find the UUID on the Account Management > Identity & access management > OAuth clients page, during creation of an OAuth client.
Request body objects
The FieldValuesRequestDto
object
The FieldValueDto
object
The key of this value.
Request body JSON model
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"values": [{"key": "string"}]}
Response
Response codes
The response doesn't have a body. The values were added to the field.
The existing and provided values combined should not contain duplicate keys.
No valid session provided
Access denied
Something went wrong on Account Management's end
PUT products
Replace the current values to the product field.
The request produces an application/json
payload.
PUT |
|
Authentication
To execute this request, you need the Allow read access for usage and consumption resources (account-uac-read
) scope assigned to your token. To learn how to obtain and use it, see OAuth clients.
Parameters
The ID of the required account.
You can find the UUID on the Account Management > Identity & access management > OAuth clients page, during creation of an OAuth client.
Request body objects
The FieldValuesRequestDto
object
The FieldValueDto
object
The key of this value.
Request body JSON model
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"values": [{"key": "string"}]}
Response
Response codes
The response doesn't have a body. The values of the field were replaced.
The provided values should not contain duplicate keys.
No valid session provided
Access denied
Something went wrong on Account Management's end
DELETE products
Delete a value by key on the cost center field.
The request produces an application/json
payload.
DELETE |
|
Authentication
To execute this request, you need the Allow read access for usage and consumption resources (account-uac-read
) scope assigned to your token. To learn how to obtain and use it, see OAuth clients.
Parameters
The ID of the required account.
You can find the UUID on the Account Management > Identity & access management > OAuth clients page, during creation of an OAuth client.
The key for the field value.
Response
Response codes
The given value on the product field was deleted.
The request was unacceptable, often due to missing a required parameter
No valid session provided
Access denied
Something went wrong on Account Management's end