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

# List datasets within namespace

> Retrieve datasets within a specific namespace for a user. Use 'self' for the current user.



## OpenAPI

````yaml /api-reference/openapi.yml get /schema/{user}/{namespace}/datasets
openapi: 3.0.3
info:
  title: DataLinks
  version: 2.2.3
servers:
  - url: https://api.datalinks.com/api/v1
    description: production server
security:
  - bearerAuth: []
  - openId:
      - implicit
paths:
  /schema/{user}/{namespace}/datasets:
    get:
      tags:
        - schema
        - datasets
      summary: List datasets within namespace
      description: >-
        Retrieve datasets within a specific namespace for a user. Use 'self' for
        the current user.
      operationId: listDatasetsWithinNamespace
      parameters:
        - name: user
          in: path
          description: Username or 'self' for the current user.
          required: true
          schema:
            type: string
          example: self
        - name: namespace
          in: path
          description: Namespace for the dataset.
          required: true
          schema:
            type: string
          example: cinematography
      responses:
        '200':
          $ref: '#/components/responses/ListOfDatasets'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: The user or namespace was not found.
components:
  responses:
    ListOfDatasets:
      description: Returns a list of datasets accessible to the user.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DatasetsResponse'
    Unauthorized:
      description: >-
        Unauthorized. This error occurs if the authentication token is missing
        or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    DatasetsResponse:
      type: array
      items:
        $ref: '#/components/schemas/ApiDatasetDescription'
    ErrorResponse:
      required:
        - error_code
        - message
      type: object
      properties:
        error_code:
          type: string
          example: UNAUTHORIZED
        error_message:
          type: string
          example: ''
        message:
          type: string
          example: Missing authentication token
        sub_errors:
          type: array
          items:
            required:
              - code
              - message
            type: object
            properties:
              code:
                type: string
              message:
                type: string
    ApiDatasetDescription:
      required:
        - name
        - namespace
        - owner
        - visibility
      type: object
      properties:
        name:
          type: string
          description: Name of the dataset.
        namespace:
          type: string
          description: Name of the namespace the dataset belongs to.
        nameWithNamespace:
          type: string
          description: The name concatenated with the namespace.
          deprecated: true
        owner:
          type: string
          description: The username associated with the data.
        user:
          type: string
          description: The username associated with the data.
          deprecated: true
        visibility:
          type: string
          description: Indicates whether the data is public or private.
          enum:
            - Public
            - Private
  securitySchemes:
    bearerAuth:
      type: http
      description: >
        Use a Bearer token for authentication. Submit the token using the
        `Authorization`

        header: `Authorization: Bearer <token>`.
      scheme: bearer
    openId:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: >-
            https://login.datalinks.com/realms/datalinks-realm/protocol/openid-connect/auth
          scopes:
            openid: openid

````