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

# Get Resource Metadata

> Get all metadata values for a directory, canvas, collection, or asset.

Values the caller can't see are left out: without `VIEW_METADATA`, only the core attributes (such as Name, Added and Type) are returned; through a share link, only the attributes visible in the link's settings, plus the core ones.



## OpenAPI

````yaml /api-reference/openapi.json get /resources/{resource_id}/metadata
openapi: 3.1.0
info:
  title: Aspect API
  description: Manage and search media in Aspect.
  version: 1.0.0
servers:
  - url: https://api.aspect.inc
security:
  - ApiKeyAuth: []
tags:
  - name: Users
  - name: API Keys
  - name: Workspaces
  - name: Teams
  - name: Directories
  - name: Assets
  - name: Attachments
  - name: Filesystem Items
  - name: Collections
  - name: Canvases
  - name: Comments
  - name: Search
  - name: Transcription
  - name: Metadata
  - name: Shares
  - name: Share Templates
  - name: Watermarks
paths:
  /resources/{resource_id}/metadata:
    get:
      tags:
        - Metadata
      summary: Get Resource Metadata
      description: >-
        Get all metadata values for a directory, canvas, collection, or asset.


        Values the caller can't see are left out: without `VIEW_METADATA`, only
        the core attributes (such as Name, Added and Type) are returned; through
        a share link, only the attributes visible in the link's settings, plus
        the core ones.
      operationId: get_resource_metadata
      parameters:
        - name: resource_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: ID of a directory, canvas, collection, or asset
            title: Resource Id
          description: ID of a directory, canvas, collection, or asset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceMetadataResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ResourceMetadataResponse:
      properties:
        resource_id:
          type: string
          format: uuid
          title: Resource Id
          description: ID of the directory, canvas, collection, or asset
        values:
          items:
            $ref: '#/components/schemas/MetadataValue'
          type: array
          title: Values
          description: All metadata values for the resource
      type: object
      required:
        - resource_id
        - values
      title: ResourceMetadataResponse
      description: API response schema containing all metadata for a resource.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MetadataValue:
      properties:
        attribute_id:
          type: string
          format: uuid
          title: Attribute Id
          description: ID of the attribute this value is for
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Display name of the attribute
        data_type:
          $ref: '#/components/schemas/MetadataDataType'
          description: Data type of the value
        value:
          title: Value
          description: >-
            The value. Its shape depends on `data_type`:


            - `string`: A string.

            - `integer`, `float`: A number.

            - `boolean`: `true` or `false`.

            - `datetime`: An ISO 8601 string.

            - `single_select`: An option ID.

            - `multi_select`: A list of option IDs.

            - `user_id`: A list of users, each with `id`, `first_name`,
            `last_name`, `email`, and `avatar_url`.

            - `person_id`: A list of people, each with `person_id`, `label`, and
            `author_kind`.

            - `object_id`: A list of objects, each with `object_id`, `label`,
            and `author_kind`.

            - `directory_id`: The directories containing the resource, outermost
            first, each with `id` and `name`. Empty when the resource is
            directly in the team's top-level directory.


            `null` when there's no value.
        author_kind:
          $ref: '#/components/schemas/AuthorKind'
          description: >-
            Who wrote the value's current content: user, ai, or system for
            values Aspect fills in itself, such as ones read from the file
          default: user
      type: object
      required:
        - attribute_id
        - data_type
        - value
      title: MetadataValue
      description: A single metadata value with its attribute.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    MetadataDataType:
      type: string
      enum:
        - string
        - integer
        - float
        - boolean
        - datetime
        - single_select
        - multi_select
        - user_id
        - person_id
        - object_id
        - directory_id
      title: MetadataDataType
      description: >-
        Type of value an attribute holds.


        - `string`: Text.

        - `integer`: A whole number.

        - `float`: A decimal number.

        - `boolean`: True or false.

        - `datetime`: A date and time.

        - `single_select`: One of the attribute's `options`.

        - `multi_select`: Any number of the attribute's `options`.

        - `user_id`: Users.

        - `person_id`: People recognized in the asset. Used by the built-in
        People attribute.

        - `object_id`: Objects recognized in the asset. Used by the built-in
        Objects attribute.

        - `directory_id`: The directories containing the asset. Used by the
        built-in Path attribute.
    AuthorKind:
      type: string
      enum:
        - user
        - ai
        - system
      title: AuthorKind
      description: >-
        Who wrote the value: a user, AI, or the system, for values Aspect fills
        in itself, such as ones read from the file.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Aspect API key (sk_...) in Authorization header. 'Bearer ' optional.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.