> ## Documentation Index
> Fetch the complete documentation index at: https://axiom.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://axiom.co/docs/feedback

```json
{
  "path": "/restapi/endpoints/getDatasets",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# List all datasets

> Get list of datasets



## OpenAPI

````yaml v2 get /datasets
openapi: 3.0.0
info:
  description: A public and stable API for interacting with axiom services
  title: Axiom
  termsOfService: http://axiom.co/terms
  contact:
    name: Axiom support team
    url: https://axiom.co
    email: hello@axiom.co
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 2.0.0
servers:
  - url: https://api.axiom.co/v2/
security:
  - bearerAuth: []
paths:
  /datasets:
    get:
      tags:
        - Datasets
      summary: Get list of datasets
      description: Get list of datasets
      operationId: getDatasets
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Dataset'
                example:
                  - created: '2020-01-01T00:00:00Z'
                    description: This is an example dataset
                    id: example-dataset
                    name: example-dataset
                    who: John Doe
                  - created: '2020-02-01T00:00:00Z'
                    description: This is an example dataset
                    id: example-dataset-2
                    name: example-dataset-2
                    who: Foo Bar
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - Auth: []
components:
  schemas:
    Dataset:
      type: object
      required:
        - id
        - name
        - description
        - created
        - who
        - kind
      properties:
        canWrite:
          description: Whether this dataset has write access
          type: boolean
        created:
          description: The RFC3339-formatted time when the dataset was created.
          type: string
          format: date-time
        description:
          description: Dataset description
          type: string
        edgeDeployment:
          description: Edge deployment of the dataset
          type: string
          x-omitempty: true
        id:
          description: Dataset ID
          type: string
        kind:
          description: The kind of the dataset
          type: string
          default: axiom:events:v1
          enum:
            - otel:metrics:v1
            - otel:traces:v1
            - otel:logs:v1
            - axiom:events:v1
          example: axiom:events:v1
        mapFields:
          type: array
          items:
            type: string
        name:
          description: Unique dataset name
          type: string
        retentionDays:
          description: Number of days to retain data in the dataset
          type: integer
          x-omitempty: false
        sharedByOrg:
          description: ID of the org that shared this resource, if it's shared
          type: string
        useRetentionPeriod:
          description: Whether to use the retention period
          type: boolean
          x-omitempty: false
        who:
          description: Name of the dataset creator
          type: string
      example:
        created: '2022-07-20T02:35:14.137Z'
        description: string
        id: string
        kind: axiom:events:v1
        name: string
        who: string
  responses:
    ForbiddenError:
      description: Forbidden
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
              message:
                type: string
            example:
              code: 403
              message: Forbidden
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authenticate using an API token or personal access token (PAT). Include
        the token as a Bearer token: `Authorization: Bearer <token>`. For more
        information, see [Tokens](/reference/tokens).
    Auth:
      description: >-
        Authenticate using an API token or personal access token (PAT). Include
        the token as a Bearer token: `Authorization: Bearer <token>`. For more
        information, see [Tokens](/reference/tokens).
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth
          tokenUrl: https://www.googleapis.com/oauth2/v4/token
          scopes: {}

````