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

# Its versions

> Newest first. `current` marks the one the library shows and share links serve. An asset with one version lists itself.

Scope: `read`.



## OpenAPI

````yaml /openapi.json get /api/v1/assets/{id}/versions
openapi: 3.1.0
info:
  title: artbucket
  version: '1'
  description: >-
    Agent-first asset management. The web UI is built on this API and nothing
    else, beside signing in at /api/auth. Send `Authorization: Bearer <key>`: a
    key works in one workspace with one scope, and scopes are a ladder: read <
    propose < write < admin. People signed in to the app carry a session cookie
    instead, and their scope is what their grants add up to: on the
    organization, the workspace, or single collections and assets. A scope shown
    as needed on the workspace is also enough on the one collection or asset a
    route acts on. Agents (MCP at POST /api/v1/mcp) usually get `propose`: what
    they add waits for a human.
servers:
  - url: http://localhost:3000
security:
  - bearer: []
  - session: []
  - {}
paths:
  /api/v1/assets/{id}/versions:
    parameters:
      - name: id
        in: path
        required: true
        description: 'Asset id: any version of it'
        schema:
          type: string
    get:
      summary: Its versions
      description: >-
        Newest first. `current` marks the one the library shows and share links
        serve. An asset with one version lists itself.


        Scope: `read`.
      responses:
        '200':
          description: The versions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        workspaceId:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        sha256:
                          type: string
                        filename:
                          type: string
                        mime:
                          type: string
                        size:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        width:
                          anyOf:
                            - type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            - type: 'null'
                        height:
                          anyOf:
                            - type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            - type: 'null'
                        probe:
                          anyOf:
                            - type: object
                              propertyNames:
                                type: string
                              additionalProperties: {}
                            - type: 'null'
                        metadata:
                          anyOf:
                            - type: object
                              properties:
                                title:
                                  type: string
                                description:
                                  type: string
                                keywords:
                                  type: array
                                  items:
                                    type: string
                                creator:
                                  type: string
                                copyright:
                                  type: string
                                capturedAt:
                                  type: string
                                camera:
                                  type: string
                                lens:
                                  type: string
                                gps:
                                  type: object
                                  properties:
                                    lat:
                                      type: number
                                    lon:
                                      type: number
                                  required:
                                    - lat
                                    - lon
                                  additionalProperties: false
                              additionalProperties: false
                            - type: 'null'
                        tags:
                          type: array
                          items:
                            type: string
                        fields:
                          type: object
                          propertyNames:
                            type: string
                          additionalProperties:
                            type:
                              - string
                              - number
                              - boolean
                          description: The asset's own values
                        inherited:
                          type: object
                          propertyNames:
                            type: string
                          additionalProperties:
                            type:
                              - string
                              - number
                              - boolean
                          description: >-
                            Values inherited from its collections; own values
                            win
                        status:
                          type: string
                          enum:
                            - draft
                            - proposed
                            - active
                            - archived
                            - rejected
                          description: >-
                            draft, proposed (in review), active (approved),
                            archived or rejected
                        state:
                          type: string
                          enum:
                            - draft
                            - proposed
                            - active
                            - expired
                            - archived
                            - rejected
                            - deleted
                          description: >-
                            The status; expired for an approved asset past its
                            last day of use; deleted, until restored or purged
                        deletedAt:
                          anyOf:
                            - type: string
                              format: date-time
                              pattern: >-
                                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                            - type: 'null'
                          description: >-
                            When it was deleted: restorable for 30 days, then
                            purged
                        stackId:
                          anyOf:
                            - type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            - type: 'null'
                          description: >-
                            Versions of one thing share a stack; null when it
                            has one version
                        version:
                          anyOf:
                            - type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            - type: 'null'
                          description: Its number in the stack
                        current:
                          type: boolean
                          description: >-
                            Its stack's current approved version: the others are
                            superseded by it
                        proposedBy:
                          description: >-
                            For a proposal: who made it, a person's or an API
                            key's name
                          type:
                            - string
                            - 'null'
                        reviewNote:
                          description: Why a person rejected it
                          type:
                            - string
                            - 'null'
                        proposedTags:
                          type: array
                          items:
                            type: string
                        rights:
                          anyOf:
                            - type: object
                              properties:
                                license:
                                  type:
                                    - string
                                    - 'null'
                                territories:
                                  type: array
                                  items:
                                    type: string
                                  description: 'ISO 3166-1 alpha-2; empty: anywhere'
                                channels:
                                  type: array
                                  items:
                                    type: string
                                  description: 'empty: any use'
                                embargo:
                                  anyOf:
                                    - type: string
                                      format: date
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                                    - type: 'null'
                                  description: Not before this day
                                expires:
                                  anyOf:
                                    - type: string
                                      format: date
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                                    - type: 'null'
                                  description: The last day it may be used
                                modelRelease:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - released
                                        - missing
                                        - not-needed
                                    - type: 'null'
                              required:
                                - license
                                - territories
                                - channels
                                - embargo
                                - expires
                                - modelRelease
                              additionalProperties: false
                            - type: 'null'
                        origin:
                          anyOf:
                            - type: string
                              enum:
                                - shot
                                - licensed
                                - generated
                            - type: 'null'
                        parentAssetId:
                          anyOf:
                            - type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            - type: 'null'
                        generator:
                          type:
                            - string
                            - 'null'
                        prompt:
                          type:
                            - string
                            - 'null'
                        c2pa:
                          anyOf:
                            - type: object
                              properties:
                                manifests:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                generator:
                                  description: The app that signed it
                                  type:
                                    - string
                                    - 'null'
                                title:
                                  type:
                                    - string
                                    - 'null'
                                signedBy:
                                  description: >-
                                    The signing certificate's organization, as
                                    the file claims it; not verified
                                  type:
                                    - string
                                    - 'null'
                                actions:
                                  type: array
                                  items:
                                    type: string
                                digitalSourceType:
                                  description: >-
                                    IPTC: digitalCapture,
                                    trainedAlgorithmicMedia...
                                  type:
                                    - string
                                    - 'null'
                                softwareAgent:
                                  description: The tool the actions name, often the model
                                  type:
                                    - string
                                    - 'null'
                                ingredients:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                              required:
                                - manifests
                                - generator
                                - title
                                - signedBy
                                - actions
                                - digitalSourceType
                                - softwareAgent
                                - ingredients
                              additionalProperties: false
                            - type: 'null'
                          description: >-
                            Content Credentials read from the file; the original
                            keeps the signed manifest
                        supersededBy:
                          anyOf:
                            - type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            - type: 'null'
                          description: The asset that replaces this one
                        private:
                          type: boolean
                          description: >-
                            Its own flag; it is private too when every
                            collection it is in is
                        collections:
                          type: array
                          items:
                            type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        createdAt:
                          type: string
                          format: date-time
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                        updatedAt:
                          type: string
                          format: date-time
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                      required:
                        - id
                        - workspaceId
                        - sha256
                        - filename
                        - mime
                        - size
                        - width
                        - height
                        - probe
                        - metadata
                        - tags
                        - fields
                        - inherited
                        - status
                        - state
                        - deletedAt
                        - stackId
                        - version
                        - current
                        - proposedBy
                        - reviewNote
                        - proposedTags
                        - rights
                        - origin
                        - parentAssetId
                        - generator
                        - prompt
                        - c2pa
                        - supersededBy
                        - private
                        - collections
                        - createdAt
                        - updatedAt
                      additionalProperties: false
                required:
                  - data
                additionalProperties: false
        default:
          description: An error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail: {}
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: 'An API key: ab_...'
    session:
      type: apiKey
      in: cookie
      name: better-auth.session_token
      description: Signed in, at /api/auth

````