Try it free

Create an external datastore definition

  • Latest Dynatrace
  • Reference
  • Published Oct 13, 2026

Create an external datastore definition in Dynatrace Grail with the External Datastores API; its name is unique and can't be changed after creation.

POSTSaaShttps://{your-environment-id}.apps.dynatrace.com/v1/external-datastore-definitions

Overview

Create a new external datastore definition.

The name field uniquely identifies the datastore and cannot be changed after creation.

Allowed JSON values

  • type the type of the external datastore. Currently the only allowed value is s3://.

  • name unique identifier of the external datastore.

    • must match the pattern ([a-z])([a-z0-9])([a-z0-9_-])+
    • maximum length is 100 characters
  • displayName optional human-readable label for the datastore (up to 200 characters).

  • bucketName the name of the S3 bucket (up to 1000 characters).

  • region the AWS region the S3 bucket resides in (up to 1000 characters).

  • connectionId optional reference to the connection settings object (up to 1000 characters).

  • connectionName optional reference to the connection settings object (up to 1000 characters).

Authentication

To execute this request, you need a platform token or OAuth access token with storage:external-datastore-definitions:write scope. To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
bodyCreateExternalDatastoreS3Dto-bodyRequired

Request body objects

The CreateExternalDatastoreS3Dto object

ElementTypeDescriptionRequired
bucketNamestring

The S3 bucket name.

Optional
connectionIdstring

References the connection settings object.

Optional
connectionNamestring

References the connection settings object.

Optional
displayNamestring

Descriptive name of the external datastore.

Optional
namestring

Unique Name of the external datastore. Cannot be changed after creation.

Optional
regionstring

The AWS region the S3 bucket resides in.

Optional

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.

{
"type": "s3://",
"name": "my-s3-store",
"displayName": "My S3 Store",
"bucketName": "my-s3-bucket",
"region": "us-east-2",
"connectionId": "my-connection-id",
"connectionName": "my-connection-name"
}

Response

Response codes

CodeTypeDescription
201ExternalDatastoreS3Dto

Successfully created external datastore definition.

400ErrorEnvelope

Invalid request.

401ErrorEnvelope

Unauthorized

403ErrorEnvelope

Missing permissions

409ErrorEnvelope

External datastore already exists.

4XXErrorEnvelope

Client Error

5XXErrorEnvelope

Server Error.

Response body objects

The ExternalDatastoreS3Dto object

ElementTypeDescription
bucketNamestring

The S3 bucket name.

connectionIdstring

References the connection settings object.

connectionNamestring

References the connection settings object.

displayNamestring

Descriptive name of the external datastore.

namestring

Unique Name of the external datastore. Cannot be changed after creation.

regionstring

The AWS region the S3 bucket resides in.

typestring

Type of the external datastore.

versioninteger

Used for optimistic locking.

The ErrorEnvelope object

ElementTypeDescription
errorErrorResponse

The response for error state

The ErrorResponse object

The response for error state

ElementTypeDescription
codeinteger

Error code, which normally matches the HTTP error code.

detailsErrorResponseDetails

Detailed information about the error.

messagestring

A short, clear error message without details

The ErrorResponseDetails object

Detailed information about the error.

ElementTypeDescription
constraintViolationsErrorResponseDetailsConstraintViolations[]

Information about an input parameter that violated some validation rule of the service API.

errorMessagestring

Complete error message.

missingPermissionsstring[]

List of missing IAM permissions necessary to successfully execute the request.

missingScopesstring[]

List of missing IAM scopes necessary to successfully execute the request.

The ErrorResponseDetailsConstraintViolations object

Information about an input parameter that violated some validation rule of the service API.

ElementTypeDescription
messagestring

Message describing the error.

parameterDescriptorstring

Describes the violating parameter.

Response body JSON models

{
"type": "s3://",
"name": "my-s3-store",
"displayName": "My S3 Store",
"bucketName": "my-s3-bucket",
"region": "us-east-2",
"connectionId": "my-connection-id",
"connectionName": "my-connection-name",
"version": 1
}
{
"error": {
"message": "Constraint Violations",
"details": {
"constraintViolations": [
{
"message": "must not be blank",
"parameterDescriptor": "name"
}
]
},
"code": 400
}
}
Related tags
Platform APIDynatrace Platform