Try it free

Test parsing lookup data

  • Latest Dynatrace
  • Reference
  • Published Oct 13, 2026

Test parsing lookup data in Dynatrace with the Grail Resource Store API and preview the records produced by a DPL pattern without saving them.

POSTSaaShttps://{your-environment-id}.apps.dynatrace.com/v1/files/tabular/lookup:test-pattern

Overview

Test parsing lookup data

Test parsing lookup data without storing the result in the Grail Resource Store. The request body needs to be submitted as multipart/form-data with the following parts:

  • request: containing the request parameters (see below) in JSON format
  • content: containing the lookup data in text format

The uploaded data is parsed using the Dynatrace Pattern Language (DPL). For examples, see the Dynatrace Documentation.

Request parameters

  • parsePattern (required) - The DPL pattern to parse the uploaded data. Every pattern match produces a record. Example: LD:id ',' LD:value.

  • skippedRecords - The number of initial records to discard. Can be used to skip header rows. Default: 0

  • lookupField - The name of the lookup field whose value identifies a record in the lookup data. The uniqueness of the values is ensured by deduplicating records during
    upload, if necessary.

  • timezone - The timezone for parsing time and date fields. The list of valid input values matches that of the IANA Time Zone Database (TZDB). Example: UTC.

  • locale - The locale for parsing locale-specific day and month names. The input values take the ISO-639 Language code with an optional ISO-3166 country code appended to it with an underscore. Example: en_US.

  • autoFlatten - Set to true to extract nested fields to the root level when the specified DPL pattern results in a single record-type field. Default: true

Authentication

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

Parameters

ParameterTypeDescriptionInRequired
bodyResourceTestPatternRequestEnvelope

Multipart request containing JSON metadata and file content.

bodyOptional

Request body objects

The ResourceTestPatternRequestEnvelope object

Multipart request containing JSON metadata and file content.

ElementTypeDescriptionRequired
contentstring-Required
requestResourceTestPatternRequest

The JSON metadata for the test pattern request.

Required

The ResourceTestPatternRequest object

The JSON metadata for the test pattern request.

ElementTypeDescriptionRequired
autoFlattenboolean

Set to true to extract nested fields to the root level when the specified DPL pattern results in a single record-type field.

Optional
localestring

The locale for parsing locale-specific day and month names. The input values take the ISO-639 Language code with an optional ISO-3166 country code appended to it with an underscore.

Optional
lookupFieldstring

The name of the lookup field whose value identifies a record in the lookup data.The uniqueness of the values is ensured by deduplicating records during upload, if necessary.

Optional
parsePatternstring

The DPL pattern to parse the uploaded data. Every pattern match produces a record.

Required
skippedRecordsinteger

The number of initial records to discard. Can be used to skip header rows.

Optional
timezonestring

The timezone for parsing time and date fields. The list of valid input values matches that of the IANA Time Zone Database (TZDB).

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.

{
"content": "string",
"request": {
"autoFlatten": true,
"locale": "en_US",
"lookupField": "id",
"parsePattern": "LD:id ',' LD:value",
"skippedRecords": 0,
"timezone": "UTC"
}
}

Response

Response codes

CodeTypeDescription
200ResourceTestPatternResponse

The result of applying the pattern to the uploaded file. The schema for the records and types is the same as in the DQL Query API.

400ErrorEnvelope

Bad request for uploading the lookup data.

401ErrorEnvelope

Unauthorized.

403ErrorEnvelope

Access forbidden.

413ErrorEnvelope

The uploaded file or the JSON request were too large.

429ErrorEnvelope

Too many concurrent requests.

500ErrorEnvelope

Internal Server Error

4XXErrorEnvelope

Client Error

5XXErrorEnvelope

Server Error

Response body objects

The ResourceTestPatternResponse object

The result of applying the pattern to the uploaded file.

ElementTypeDescription
numberOfRecordsinteger

The total number of records in the uploaded file that match the provided pattern.

recordsobject[]

List of records that result from applying the pattern to the uploaded file. If there are more than 100 records, this list contains only the first 100.

typesobject[]

The data types for the result records.

The ErrorEnvelope object

ElementTypeDescription
errorExceptionalReturn-

The ExceptionalReturn object

ElementTypeDescription
codeinteger-
errorDetails(CustomValidationErrorInfo | InvalidAuditEventsErrorInfo | MediaTypeErrorInfo | ParameterErrorInfo | ProxyErrorInfo | QueryFrontendRawErrorInfo | RequestBodyErrorInfo)[]-
messagestring-

The CustomValidationErrorInfo object

The ErrorInfo object

ElementTypeDescription
messagestring-

The InvalidAuditEventsErrorInfo object

The MediaTypeErrorInfo object

The ParameterErrorInfo object

The ProxyErrorInfo object

The QueryFrontendRawErrorInfo object

The RequestBodyErrorInfo object

Response body JSON models

{
"numberOfRecords": 3,
"records": [
{
"code": "200",
"message": "OK"
},
{
"code": "400",
"message": "Bad Request"
},
{
"code": "500",
"message": "Internal Server Error"
}
],
"types": [
{
"indexRange": [
0,
2
],
"mappings": {
"code": {
"type": "long"
},
"message": {
"type": "string"
}
}
}
]
}
{
"error": {
"code": 400,
"message": "Testing pattern failed: Parse pattern must not be blank."
}
}
Related tags
Platform APIDynatrace Platform