---
title: "Update archive order"
method: PUT
path: "/api/v2/logs/config/archive-order"
tags: ["Logs Archives"]
---

# Update archive order

`PUT /api/v2/logs/config/archive-order`

Update the order of your archives. Since logs are processed sequentially, reordering an archive may change
the structure and content of the data processed by other archives.

**Note**: Using the `PUT` method updates your archive's order by replacing the current order
with the new one.

## Request body

- LogsArchiveOrder — A ordered list of archive IDs.
  - `data` LogsArchiveOrderDefinition — The definition of an archive order.
    - `attributes` LogsArchiveOrderAttributes, required — The attributes associated with the archive order.
      - `archive_ids` string[], required — An ordered array of `<ARCHIVE_ID>` strings, the order of archive IDs in the array define the overall archives order for Datadog.
    - `type` 'archive_order', required — Type of the archive order definition.

## Response `200`

OK

- LogsArchiveOrder — A ordered list of archive IDs.
  - `data` LogsArchiveOrderDefinition — The definition of an archive order.
    - `attributes` LogsArchiveOrderAttributes, required — The attributes associated with the archive order.
      - `archive_ids` string[], required — An ordered array of `<ARCHIVE_ID>` strings, the order of archive IDs in the array define the overall archives order for Datadog.
    - `type` 'archive_order', required — Type of the archive order definition.

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `422` — Unprocessable Entity
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
