Update a fieldset in Dynatrace with the Grail Fieldsets API by replacing its definition, using the UID and optimistic locking version.
| PUT | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/storage/fieldsets/v1/fieldsets/{fieldsetUid} |
You must supply the fieldsetUid path parameter and the optimistic-locking-version query parameter to apply the update to the correct base version. The request body can include buckets, description, enabled, fields, scope, and tables, and the operation returns 200 when the fieldset is successfully updated.
To execute this request, you need a platform token or OAuth access token with storage:fieldset-definitions:write scope. To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| fieldsetUid | string | UID of the fieldset | path | Required |
| optimistic-locking-version | integer | optimistic-locking-version defines the base version that this update applies to. You can get the current version of a fieldset by checking the version field in the JSON Response of GET fieldsets or GET fieldset ATTENTION: this version and the version value in the JSON body must match. | query | Required |
| body | Update | - | body | Required |
UpdateFieldsetRequest object| Element | Type | Description | Required |
|---|---|---|---|
| buckets | string[] | List of the buckets on which fieldset is applicable. | Optional |
| description | string | Description of the fieldset. | Optional |
| enabled | boolean | Description of the fieldset. | Optional |
| fields | string[] | List of the fields. | Required |
| scope | string | Scope of the fieldset. The element can hold these values
| Required |
| tables | string[] | List of the tables on which fieldset is applicable. | Optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"description": "Sensitive field set on table","enabled": true,"scope": "TABLE","fields": ["email","userid"],"tables": ["spans","logs"]}
| Code | Type | Description |
|---|---|---|
| 200 | - | fieldset successfully updated. |
| 400 | Error | Bad Request: the server cannot process the request due to a supposed client error. |
| 404 | Error | Not found: the server cannot find the requested fieldset. |
| 5XX | Error | Server error. |
ErrorEnvelope object| Element | Type | Description |
|---|---|---|
| error | Error | The response for error state |
ErrorResponse objectThe response for error state
| Element | Type | Description |
|---|---|---|
| code | integer | Error code, which normally matches the HTTP error code. |
| details | Error | Detailed information about the error. |
| message | string | A short, clear error message without details |
ErrorResponseDetails objectDetailed information about the error.
| Element | Type | Description |
|---|---|---|
| constraintViolations | Error | Information about an input parameter that violated some validation rule of the service API. |
| errorMessage | string | Complete error message. |
| missingPermissions | string[] | List of missing IAM permissions necessary to successfully execute the request. |
| missingScopes | string[] | List of missing IAM scopes necessary to successfully execute the request. |
ErrorResponseDetailsConstraintViolations objectInformation about an input parameter that violated some validation rule of the service API.
| Element | Type | Description |
|---|---|---|
| message | string | Message describing the error. |
| parameterDescriptor | string | Describes the violating parameter. |
{"error": {"message": "Constraint Violations","details": {"constraintViolations": [{"message": "size must be between 0 and 512","parameterDescriptor": "description"}]},"code": 400}}