---
title: "Download Online Archive Query Logs"
method: GET
path: "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/onlineArchives/queryLogs.gz"
tags: ["Online Archive"]
---

# Download Online Archive Query Logs

`GET /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/onlineArchives/queryLogs.gz`

## Request

- Base URL: `https://cloud.mongodb.com`
- URL: `https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/onlineArchives/queryLogs.gz`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `https://cloud.mongodb.com/api/oauth/token`
  - HTTP digest
- TypeScript: <https://skmtc.dev/mongodb/apis/atlas-admin-api/docs/api/atlas/v2/groups/:groupId/clusters/:clusterName/onlineArchives/queryLogs.gz/get.ts> (a function with typed inputs; its response is checked against the schema)

Downloads query logs for the specified online archive. The API does not support direct calls with the json response schema. You must request a gzip response schema using an accept header of the format: `Accept: application/vnd.atlas.YYYY-MM-DD+gzip`.

## Path parameters

- `groupId` string, required
- `clusterName` string, required

## Query parameters

- `envelope` boolean
- `startDate` integer
- `endDate` integer
- `archiveOnly` boolean

## Response `200`

OK

## Other responses

- `400`: Bad Request.
- `401`: Unauthorized.
- `403`: Forbidden.
- `404`: Not Found.
- `429`: Too Many Requests.
- `500`: Internal Server Error.

---

[API](https://skmtc.dev/mongodb/apis/atlas-admin-api.md) - [All operations](https://skmtc.dev/mongodb/apis/atlas-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mongodb/apis/atlas-admin-api/revisions/e37e8ef8429f?raw)
