Stanford University Objects API

Digital Repository Objects

Operations 21

POST /v1/virtual_objects Create a virtual object. #
POST /v1/objects/{id}/publish Publish object to PURL #
POST /v1/objects/{id}/accession Start an assembly workflow, optionally opening a version #
POST /v1/objects/{id}/apply_admin_policy_defaults Applies the default values (copyright, use_statement, rights) from the admin policy #
GET /v1/objects/{object_id}/query/collections List the collections that an object belongs to #
GET /v1/objects/{object_id}/members List the members of this collection #
GET /v1/objects/{id}/solr Show solr document for head version #
POST /v1/objects Register a new object #
GET /v1/objects/find Finds an object #
POST /v1/objects/find_all Finds multiple objects #
PATCH /v1/objects/{id} Update object metadata #
GET /v1/objects/{id} Retrieve the object COCINA metadata #
HEAD /v1/objects/{id} Retrieve the head for object COCINA metadata #
DELETE /v1/objects/{id} Destroys the object #
GET /v1/objects/{id}/validate_moab Starts a validate moab job, which does a validation of the on disk Moab, without reference to the preservation-catalog basis
GET /v1/objects/{id}/checksum Show the checksums and filesizes for a single object
GET /v1/objects/{id}/file Returns a specific content, metadata, or manifest file for the object.
POST /v1/objects/{id}/content_diff Retrieves Moab::FileInventoryDifference model from comparison of passed contentMetadata.xml with latest (or specified) version in Moab for all files (default) or a specified subset
POST /v1/resources Creates a new object #
GET /v1/resources/{id} Retrieve the object metadata #
PUT /v1/resources/{id} Update an existing object #

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/stanford-objects-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

stanford-objects-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stanford Objects API
  version: 1.0.0
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  description: 'Operations tagged objects across 3 of this provider''s published API definitions: stanford-dor-services-api-openapi.yml, stanford-preservation-catalog-api-openapi.yml, stanford-sdr-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://dor-services-{env}.stanford.edu
  description: Production service
  variables:
    env:
      default: prod
- url: https://preservation-catalog-{env}-01.stanford.edu
  description: Production service
  variables:
    env:
      default: prod
- url: https://sdr-api-{env}.stanford.edu
  description: Production service
  variables:
    env:
      default: prod
security:
- bearerAuth: []
tags:
- name: objects
  description: Digital Repository Objects
paths:
  /v1/virtual_objects:
    post:
      tags:
      - objects
      summary: Create a virtual object.
      description: Combines a virtual_object object with constituent objects to create an object like an Atlas (composed of several images)
      operationId: virtual_objects#create
      responses:
        '201':
          description: Virtual merge action started
          headers:
            location:
              description: the status of the action is found at this URI
              schema:
                type: string
                format: uri
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - virtual_objects
              properties:
                virtual_objects:
                  type: array
                  minItems: 1
                  items:
                    $ref: '#/components/schemas/VirtualObjectRequest'
    servers:
    - url: https://dor-services-{env}.stanford.edu
      description: Production service
      variables:
        env:
          default: prod
    - url: https://dor-services-{env}.stanford.edu
      description: Staging service
      variables:
        env:
          default: stage
    - url: https://dor-services-{env}.stanford.edu
      description: QA service
      variables:
        env:
          default: qa
  /v1/objects/{id}/publish:
    post:
      tags:
      - objects
      summary: Publish object to PURL
      description: ''
      operationId: objects#publish
      responses:
        '201':
          description: Publishing action started
          headers:
            location:
              description: the status of the action is found at this URI
              schema:
                type: string
                format: uri
      parameters:
      - name: id
        in: path
        description: ID of object
        required: true
        schema:
          $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Druid
      - name: lane-id
        in: query
        schema:
          $ref: '#/components/schemas/LaneId'
    servers:
    - url: https://dor-services-{env}.stanford.edu
      description: Production service
      variables:
        env:
          default: prod
    - url: https://dor-services-{env}.stanford.edu
      description: Staging service
      variables:
        env:
          default: stage
    - url: https://dor-services-{env}.stanford.edu
      description: QA service
      variables:
        env:
          default: qa
  /v1/objects/{id}/accession:
    post:
      tags:
      - objects
      summary: Start an assembly workflow, optionally opening a version
      description: ''
      operationId: objects#accession
      responses:
        '201':
          description: Workflow started
        '409':
          description: Unable to open version.
      parameters:
      - name: id
        in: path
        description: ID of object
        required: true
        schema:
          $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Druid
      - name: workflow
        in: query
        description: which workflow should be started
        required: false
        schema:
          type: string
          default: assemblyWF
          enum:
          - assemblyWF
          - gisAssemblyWF
      - name: description
        in: query
        description: the description of the version change (if versioning is needed)
        required: true
        schema:
          type: string
        example: Re-accessioning this object
      - name: opening_user_name
        in: query
        description: the username of the person creating the version (if versioning is needed)
        required: false
        schema:
          type: string
        example: some_sunetid
    servers:
    - url: https://dor-services-{env}.stanford.edu
      description: Production service
      variables:
        env:
          default: prod
    - url: https://dor-services-{env}.stanford.edu
      description: Staging service
      variables:
        env:
          default: stage
    - url: https://dor-services-{env}.stanford.edu
      description: QA service
      variables:
        env:
          default: qa
  /v1/objects/{id}/apply_admin_policy_defaults:
    post:
      tags:
      - objects
      summary: Applies the default values (copyright, use_statement, rights) from the admin policy
      description: ''
      operationId: admin_policy_defaults#apply
      responses:
        '200':
          description: OK
        '400':
          description: The object is not supported for inheritance of APO access defaults because its type is not supported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
        '422':
          description: 'The object is in a state in which it cannot be modified: it must be either registered or opened for versioning'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
      parameters:
      - name: id
        in: path
        description: ID of object
        required: true
        schema:
          $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Druid
    servers:
    - url: https://dor-services-{env}.stanford.edu
      description: Production service
      variables:
        env:
          default: prod
    - url: https://dor-services-{env}.stanford.edu
      description: Staging service
      variables:
        env:
          default: stage
    - url: https://dor-services-{env}.stanford.edu
      description: QA service
      variables:
        env:
          default: qa
  /v1/objects/{object_id}/query/collections:
    get:
      tags:
      - objects
      summary: List the collections that an object belongs to
      description: ''
      operationId: queries#collections
      responses:
        '200':
          description: OK
      parameters:
      - name: object_id
        in: path
        description: ID of object
        required: true
        schema:
          $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Druid
    servers:
    - url: https://dor-services-{env}.stanford.edu
      description: Production service
      variables:
        env:
          default: prod
    - url: https://dor-services-{env}.stanford.edu
      description: Staging service
      variables:
        env:
          default: stage
    - url: https://dor-services-{env}.stanford.edu
      description: QA service
      variables:
        env:
          default: qa
  /v1/objects/{object_id}/members:
    get:
      tags:
      - objects
      summary: List the members of this collection
      description: ''
      operationId: members#index
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  members:
                    type: array
                    items:
                      type: object
                      properties:
                        externalIdentifier:
                          $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Druid
                        version:
                          type: integer
      parameters:
      - name: object_id
        in: path
        description: ID of object
        required: true
        schema:
          $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Druid
    servers:
    - url: https://dor-services-{env}.stanford.edu
      description: Production service
      variables:
        env:
          default: prod
    - url: https://dor-services-{env}.stanford.edu
      description: Staging service
      variables:
        env:
          default: stage
    - url: https://dor-services-{env}.stanford.edu
      description: QA service
      variables:
        env:
          default: qa
  /v1/objects/{id}/solr:
    get:
      tags:
      - objects
      summary: Show solr document for head version
      operationId: objects#solr
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      parameters:
      - name: id
        in: path
        description: ID of object
        required: true
        schema:
          $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Druid
      - name: validate
        in: query
        description: Enable or disable validation ofCocina
        required: false
        schema:
          type: boolean
          default: true
    servers:
    - url: https://dor-services-{env}.stanford.edu
      description: Production service
      variables:
        env:
          default: prod
    - url: https://dor-services-{env}.stanford.edu
      description: Staging service
      variables:
        env:
          default: stage
    - url: https://dor-services-{env}.stanford.edu
      description: QA service
      variables:
        env:
          default: qa
  /v1/objects:
    post:
      tags:
      - objects
      summary: Register a new object
      description: 'If ''collection'' is provided, the object will be a member of the provided

        collection.


        Note that the ''source_id'' property is required for items but not for

        collections.'
      operationId: objects#create
      parameters:
      - in: query
        name: assign_doi
        description: If a doi should be assigned to the object
        schema:
          type: boolean
      - in: query
        name: user_name
        description: The sunetid of the person making the change
        required: false
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/RequestDRO
              - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/RequestCollection
              - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/RequestAdminPolicy
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                oneOf:
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/DRO
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/DROWithMetadata
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Collection
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/CollectionWithMetadata
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/AdminPolicy
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/AdminPolicyWithMetadata
          headers:
            ETag:
              schema:
                type: string
            Last-Modified:
              schema:
                type: string
            X-Created-At:
              schema:
                type: string
        '400':
          description: Invalid DOR parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Object not found in DOR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Object with that sourceId already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Roundtrip validation has failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Error connecting to Symphony
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service temporarily disabled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    servers:
    - url: https://dor-services-{env}.stanford.edu
      description: Production service
      variables:
        env:
          default: prod
    - url: https://dor-services-{env}.stanford.edu
      description: Staging service
      variables:
        env:
          default: stage
    - url: https://dor-services-{env}.stanford.edu
      description: QA service
      variables:
        env:
          default: qa
  /v1/objects/find:
    get:
      tags:
      - objects
      summary: Finds an object
      operationId: objects#find
      parameters:
      - in: query
        name: sourceId
        required: true
        schema:
          $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/SourceId
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                oneOf:
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/DRO
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/DROWithMetadata
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Collection
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/CollectionWithMetadata
          headers:
            ETag:
              schema:
                type: string
            Last-Modified:
              schema:
                type: string
            X-Created-At:
              schema:
                type: string
        '404':
          description: Object not found in DOR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    servers:
    - url: https://dor-services-{env}.stanford.edu
      description: Production service
      variables:
        env:
          default: prod
    - url: https://dor-services-{env}.stanford.edu
      description: Staging service
      variables:
        env:
          default: stage
    - url: https://dor-services-{env}.stanford.edu
      description: QA service
      variables:
        env:
          default: qa
  /v1/objects/find_all:
    post:
      tags:
      - objects
      summary: Finds multiple objects
      operationId: objects#find_all
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                externalIdentifiers:
                  type: array
                  items:
                    $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Druid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                  - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/DRO
                  - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/DROWithMetadata
                  - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Collection
                  - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/CollectionWithMetadata
                  - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/AdminPolicy
                  - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/AdminPolicyWithMetadata
    servers:
    - url: https://dor-services-{env}.stanford.edu
      description: Production service
      variables:
        env:
          default: prod
    - url: https://dor-services-{env}.stanford.edu
      description: Staging service
      variables:
        env:
          default: stage
    - url: https://dor-services-{env}.stanford.edu
      description: QA service
      variables:
        env:
          default: qa
  /v1/objects/{id}:
    patch:
      tags:
      - objects
      summary: Update object metadata
      description: 'Replace the object metadata with the provided metadata.


        The returned Cocina object may differ from the provided Cocina object due to normalization.


        Since we don''t presently have a full mapping between cocina JSON and MODS,

        only the title can be updated in the descriptive metadata.'
      operationId: objects#update
      parameters:
      - name: id
        in: path
        description: ID of object
        required: true
        schema:
          $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Druid
      - name: event_description
        in: query
        description: A description of the change being made to the object
        required: false
        schema:
          type: string
      - name: user_name
        in: query
        description: The sunetid of the person making the change
        required: false
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/DRO
              - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/DROWithMetadata
              - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Collection
              - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/CollectionWithMetadata
              - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/AdminPolicy
              - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/AdminPolicyWithMetadata
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                oneOf:
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/DRO
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/DROWithMetadata
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Collection
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/CollectionWithMetadata
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/AdminPolicy
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/AdminPolicyWithMetadata
          headers:
            ETag:
              schema:
                type: string
            Last-Modified:
              schema:
                type: string
            X-Created-At:
              schema:
                type: string
        '400':
          description: Invalid DOR parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Object not found in DOR
        '409':
          description: Object with that sourceId already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '412':
          description: Roundtrip validation has failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error
    get:
      tags:
      - objects
      summary: Retrieve the object COCINA metadata
      description: Returns a JSON representation (not yet complete) of an object, collection or admin policy.
      operationId: objects#show
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                oneOf:
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/DRO
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/DROWithMetadata
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Collection
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/CollectionWithMetadata
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/AdminPolicy
                - $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/AdminPolicyWithMetadata
          headers:
            ETag:
              schema:
                type: string
            Last-Modified:
              schema:
                type: string
            X-Created-At:
              schema:
                type: string
        '304':
          description: No change. The client provided an ETag that matches the current state of the item.
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      parameters:
      - name: id
        in: path
        description: ID of object
        required: true
        schema:
          $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Druid
    head:
      tags:
      - objects
      summary: Retrieve the head for object COCINA metadata
      operationId: objects#head
      responses:
        '200':
          description: OK
          headers:
            ETag:
              schema:
                type: string
            Last-Modified:
              schema:
                type: string
            X-Created-At:
              schema:
                type: string
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      parameters:
      - name: id
        in: path
        description: ID of object
        required: true
        schema:
          $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Druid
    delete:
      tags:
      - objects
      summary: Destroys the object
      description: ''
      operationId: objects#destroy
      responses:
        '201':
          description: Deleted
        '400':
          description: Bad request
        '404':
          description: Object or tag not found
        '500':
          description: Internal Server Error
      parameters:
      - name: id
        in: path
        description: ID of object
        required: true
        schema:
          $ref: https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Druid
      - name: user_name
        in: query
        description: Username of user requesting delete
        required: false
        schema:
          type: string
    servers:
    - url: https://dor-services-{env}.stanford.edu
      description: Production service
      variables:
        env:
          default: prod
    - url: https://dor-services-{env}.stanford.edu
      description: Staging service
      variables:
        env:
          default: stage
    - url: https://dor-services-{env}.stanford.edu
      description: QA service
      variables:
        env:
          default: qa
  /v1/objects/{id}/validate_moab:
    get:
      tags:
      - objects
      summary: Starts a validate moab job, which does a validation of the on disk Moab, without reference to the preservation-catalog basis
      responses:
        '200':
          description: Job queued
        '400':
          description: Bad request (e.g., malformed druid)
        '423':
          description: Failed to enqueue the job, likely because it is a duplicate of a job already waiting in the queue. Caller may retry later if appropriate.
      parameters:
      - name: id
        in: path
        required: true
        example: druid:bc123df4567
        schema:
          $ref: '#/components/schemas/Druid'
      - name: lane-id
        in: query
        schema:
          description: Lane for prioritizing the work
          type: string
          enum:
          - default
          - low
          - high
          default: default
    servers:
    - url: https://preservation-catalog-{env}-01.stanford.edu
      description: Production service
      variables:
        env:
          default: prod
    - url: https://preservation-catalog-{env}-01.stanford.edu
      description: Staging service
      variables:
        env:
          default: stage
    - url: https://preservation-catalog-{env}-01.stanford.edu
      description: QA service
      variables:
        env:
          default: qa
  /v1/objects/{id}/checksum:
    get:
      tags:
      - objects
      summary: Show the checksums and filesizes for a single object
      responses:
        '200':
          description: Object found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChecksumsForObject'
        '400':
          description: Bad request (e.g., malformed druid)
        '404':
          description: Object not found
      parameters:
      - name: id
        in: path
        required: true
        example: druid:bc123df4567
        schema:
          $ref: '#/components/schemas/Druid'
    servers:
    - url: https://preservation-catalog-{env}-01.stanford.edu
      description: Production service
      variables:
        env:
          default: prod
    - url: https://preservation-catalog-{env}-01.stanford.edu
      description: Staging service
      variables:
        env:
          default: stage
    - url: https://preservation-catalog-{env}-01.stanford.edu
      description: QA service
      variables:
        env:
          default: qa
  /v1/objects/{id}/file:
    get:
      tags:
      - objects
      summary: Returns a specific content, metadata, or manifest file for the object.
      responses:
        '200':
          description: OK, returns a file (of whatever type, thus not validated here)
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '400':
          description: Version parameter not positive integer or other problem with request params
        '404':
          description: Object or file or version not found
      parameters:
      - name: id
        in: path
        required: true
        example: druid:bc123df4567
        schema:
          $ref: '#/components/schemas/Druid'
      - name: filepath
        description: filepath relative to given `category` query argument, which is a directory in the Moab
        in: query
        required: true
        example: manifestInventory.xml
        schema:
          type: string
      - name: category
        description: category of file to return
        in: query
        required: true
        example: manifest
        schema:
          type: string
          enum:
          - content
          - manifest
          - metadata
      - name: version
        in: query
        required: false
        example: '9'
        schema:
          type:
          - string
          - 'null'
    servers:
    - url: https://preservation-catalog-{env}-01.stanford.edu
      description: Production service
      variables:
        env:
          default: prod
    - url: https://preservation-catalog-{env}-01.stanford.edu
      description: Staging service
      variables:
        env:
          default: stage
    - url: https://preservation-catalog-{env}-01.stanford.edu
      description: QA service
      variables:
        env:
          default: qa
  /v1/objects/{id}/content_diff:
    post:
      tags:
      - objects
      summary: Retrieves Moab::FileInventoryDifference model from comparison of passed contentMetadata.xml with latest (or specified) version in Moab for all files (default) or a specified subset.
      responses:
        '200':
          description: OK
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/ContentDiff'
        '400':
          description: Version parameter not a positive integer or parameter error raised
        '500':
          description: Unable to get content diff
      parameters:
      - name: id
        in: path
        required: true
        example: druid:bc123df4567
        schema:
          $ref: '#/components/schemas/Druid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content_metadata:
                  type: string
                  description: an XML representation of content metadata
                version:
                  example: '9'
                  type:
                  - string
                  - 'null'
                subset:
                  example: publish
                  description: 'subset of files to diff (default: ''all'')'
                  type:
                  - string
   

# --- truncated at 32 KB (44 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/stanford/refs/heads/main/openapi/stanford-objects-api-openapi.yml