Content resources API - PUT configuration

Updates the configuration of content providers in your Dynatrace environment.

The request consumes an application/json payload.

Early Adopter

This request is an Early Adopter release and may be changed in non-compatible way.

PUT
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/contentResources
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/contentResources

Authentication

To execute this request, you need the Write configuration (WriteConfig) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.

Parameters

Parameter Type Description In Required
body ContentResources

JSON body of the request containing definition of the content resource.

body optional

The ContentResources object

Content resource settings

Element Type Description Required
resourceProviders ResourceProvider[]

The resource provider settings

optional
resourceUrlCleanupRules ResourceUrlCleanupRule[]

The resource url cleanup rules

optional
resourceTypes ResourceType[]

The resource type settings

optional

The ResourceType object

Settings for detecting file extensions for resources

Element Type Description Required
regularExpression string

The regular expression of the resource that will be detected for

required
primaryResourceType string

The primary resource type

The primaryResourceType element can hold these values.
required
secondaryResourceType string

The secondary resource type used to override the default resource type

optional

The ResourceUrlCleanupRule object

Resource url cleanup rules are used to aggregate resource urls

Element Type Description Required
resourceName string

The resource name

required
regularExpression string

The regular expression

required
replaceWith string

Replace with, masks the resource name

required

The ResourceProvider object

Settings for detecting third party content provider

Element Type Description Required
resourceName string

The resource name

required
resourceType string

The resource type

The resourceType element can hold these values.
required
brandIconUrl string

The url for provider's brand icon

required
domainNamePatterns string[]

The domain name pattern list

required

Possible values

Possible values for the primaryResourceType element in the ResourceType object:

  • CSS
  • IMAGE
  • OTHER
  • SCRIPT

Possible values for the resourceType element in the ResourceProvider object:

  • CDN_RESOURCES
  • FIRST_PARTY_RESOURCES
  • THIRD_PARTY_RESOURCES

Response codes

Code Description
204 The submitted configuration has been updated.
400 Failed. The input is invalid

Response format

A successful request doesn't return any content.

Validate payload

We recommend that you validate the payload before submitting it with an actual request. A response code of 204 indicates a valid payload.

The request consumes an application/json payload.

Early Adopter

This request is an Early Adopter release and may be changed in non-compatible way.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/contentResources/validator
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/contentResources/validator

Authentication

To execute this request, you need the Write configuration (WriteConfig) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.

Response codes

Code Description
204 Validated. The submitted configuration is valid. Response does not have a body.
400 Failed. The input is invalid