Reorder the objects of a multi-object, ordered Dynatrace settings schema with the Settings API by sending the new order of object IDs.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/settings/v1/objects:reorder |
You use this operation to set the order of settings objects for a schema that is multi-object and ordered. The request body sets the schemaId, the scope, and the new order of object IDs, and the required optimistic-locking-version query parameter detects whether any of the objects changed in the meantime.
To execute this request, you need a platform token or OAuth access token with settings:objects:write scope. To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| optimistic-locking-version | string | The version of the objects for optimistic locking. You can use it to detect simultaneous modifications by different users. It's generated upon retrieval of the list of objects (GET requests). The reorder will be allowed only if there wasn't any change between the retrieval and the update. | query | Required |
| body | Reorder | The JSON body of the request. Contains the reorder operations to be executed. | body | Required |
ReorderRequest object| Element | Type | Description | Required |
|---|---|---|---|
| schemaId | string | The schema to which the objects belong. | Required |
| scope | string | The scope to which the objects belong. | Required |
| sections | Reorder | Defines the reorder operations. Each section defines a contiguous range of objects in the source list that should be reordered. The sections must not overlap. Moving an object from one section to another isn't possible. | Required |
ReorderSection object| Element | Type | Description | Required |
|---|---|---|---|
| firstObjectId | string | The objectId of the first object of the source list that should be included in this section. | Required |
| lastObjectId | string | The objectId of the last object of the source list that should be included in this section. | Required |
| order | Reorder | The new order of objects spanning all objects between firstObject and lastObject inclusive. | Required |
ReorderObject object| Element | Type | Description | Required |
|---|---|---|---|
| objectId | string | The objectId of the settings object. | Required |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"schemaId": "builtin:schema","scope": "environment","sections": [{"firstObjectId": "string","lastObjectId": "string","order": [{"objectId": "string"}]}]}
| Code | Type | Description |
|---|---|---|
| 200 | Reorder | Success. |
| 400 | - | - |
| 403 | - | - |
| 404 | - | - |
| 409 | - | - |
| 429 | - | - |
| 503 | - | - |
| 4XX | - | - |
| 5XX | - | - |
ReorderResponse object| Element | Type | Description |
|---|---|---|
| version | string | The version of the settings objects list for optimistic locking. |
| items | object[] | A list of settings objects after reordering. Only contains the objects that were part of the request. |
{"version": "string","items": [{"objectId": "string","version": "string"}]}