SDR API

Stanford Digital Repository deposit API. First-party OpenAPI 3.0.0 published by SUL-DLSS under Apache 2.0; 7 paths, 8 operations, bearer auth. Servers are sdr-api-{env}.stanford.edu — the production host resolves in public DNS but does not answer a public connection, so the contract is public and the deployment is internal.

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/sdr-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 email required.

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

OpenAPI Specification

stanford-sdr-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: Stanford Digital Repository API
  version: 1.0.0
  title: SDR API
  license:
    name: Apache 2.0
    url: "http://www.apache.org/licenses/LICENSE-2.0.html"
servers:
  - url: "https://sdr-api-{env}.stanford.edu"
    description: Production service
    variables:
      env:
        default: prod
  - url: "https://sdr-api-{env}.stanford.edu"
    description: Staging service
    variables:
      env:
        default: stage
tags:
  - name: authentication
    description: Authenticate the user
  - name: objects
    description: Digital Repository Objects
  - name: files
    description: upload binary files
paths:
  /v1/direct_uploads:
    post:
      tags:
        - files
      summary: Creates a new file resource
      responses:
        "200":
          description: OK
          content:
            application/json:
              example:
                {
                  "id": 56,
                  "key": "3eh3k0x16eysn9ivndmqjo5jdf4d",
                  "filename": "Gemfile.lock",
                  "content_type": "text/html",
                  "metadata": {},
                  "byte_size": 1082,
                  "checksum": "A72Iwi4DGf80H7WM4VHuUw==",
                  "created_at": "2020-01-07T23:18:08.818Z",
                  "signed_id": "eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBQUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--8802f5d43bd2c192ef783e02c55481d129a51a72",
                  "direct_upload":
                    {
                      "url": "http://localhost:3000/rails/active_storage/disk/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9JYTJWNVNTSWhNMlZvTTJzd2VERTJaWGx6YmpscGRtNWtiWEZxYnpWcVpHWTBaQVk2QmtWVU9oRmpiMjUwWlc1MFgzUjVjR1ZKSWc1MFpYaDBMMmgwYld3R093WlVPaE5qYjI1MFpXNTBYMnhsYm1kMGFHa0NPZ1E2RFdOb1pXTnJjM1Z0U1NJZFFUY3lTWGRwTkVSSFpqZ3dTRGRYVFRSV1NIVlZkejA5QmpzR1ZBPT0iLCJleHAiOiIyMDIwLTAxLTA3VDIzOjIzOjA4LjgyNFoiLCJwdXIiOiJibG9iX3Rva2VuIn19--ae7c0227ed5840f30b3293d2f2b6c8109397527a",
                      "headers": { "Content-Type": "text/html" },
                    },
                }
  /v1/disk/{encoded_token}:
    put:
      tags:
        - files
      summary: |
        Upload the binary file resource
        Note that the 'content_type' of the file posted will be set to 'application/octet-stream' if not supplied.
        Additional values in 'content_type' after a semicolon will be removed (e.g. ';v15' is removed in 'application/text;v15')
        You may post JSON files with 'content_type' of 'application/x-stanford-json' to avoid 400 errors if posted JSON file is invalid.
        The system will automatically change the content type to 'application/json' after upload.
      responses:
        "200":
          description: OK
      parameters:
        - name: encoded_token
          in: path
          required: true
          example: eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9JYTJWNVNTSWhhbkk1YlRNeFpuQnJkbmwxZG1zM01qYzFOM042ZURRMWRXYzBOQVk2QmtWVU9oRmpiMjUwWlc1MFgzUjVjR1ZKSWc1MFpYaDBMMmgwYld3R093WlVPaE5qYjI1MFpXNTBYMnhsYm1kMGFHa0Jrem9OWTJobFkydHpkVzFKSWgxemFURXZURE5xVEV0M05GRjVVRGw0UjNaMEsyRlJQVDBHT3daVSIsImV4cCI6IjIwMjAtMDEtMDlUMjE6MzI6NDguNDc1WiIsInB1ciI6ImJsb2JfdG9rZW4ifX0=--da785217f57ab55fe37e8de0a9c26b4d7612c187
          schema:
            type: string
  /v1/background_job_results/{id}:
    get:
      tags:
        - jobs
      summary: View results of a background job
      description: Used to allow the application run long-running processes out of the request/response cycle
      operationId: "background_job_results#show"
      responses:
        "200":
          description: The background job has completed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BackgroundJobResultResponse"
        "202":
          description: The background job is pending or processing
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BackgroundJobResultResponse"
        "404":
          description: The background job with the given id was not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      parameters:
        - name: id
          in: path
          description: ID of background job result
          required: true
          schema:
            type: integer
  /v1/resources:
    post:
      tags:
        - objects
      summary: Creates a new object
      description: "Does registration and accessioning of the object"
      operationId: "objects#create"
      responses:
        "200":
          description: OK
          headers:
            Location:
              schema:
                type: string
                format: uri
              description: URL to retrieve background job results.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateObjectResponse"
      parameters:
        - in: query
          name: accession
          description: If set to true the version will be closed
          schema:
            type: boolean
        - in: query
          name: priority
          schema:
            type: string
            enum:
              - "default"
              - "low"
              - "high"
        - in: query
          name: assign_doi
          schema:
            type: boolean
        - in: query
          name: user_versions
          description: Create, update, or do nothing with user versions on close
          schema:
            type: string
            enum:
              - "none"
              - "new"
              - "update"
      requestBody:
        description: The metadata for the object
        required: true
        content:
          application/json:
            schema:
              oneOf:
                # Need to set additionalProperties to true for RequestDRO to allow accession parameter.
                - $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"
  /v1/resources/{id}:
    get:
      tags:
        - objects
      summary: Retrieve the object metadata
      description: "Returns a JSON representation of an object, collection or admin policy."
      operationId: "resources#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/Collection"
                  - $ref: "https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/AdminPolicy"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "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"
    put:
      tags:
        - objects
      summary: Update an existing object
      description: "Does update and re-accessioning of the object"
      operationId: "objects#update"
      responses:
        "200":
          description: OK
          headers:
            Location:
              schema:
                type: string
                format: uri
              description: URL to retrieve background job results.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateObjectResponse"
      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: accession
          in: query
          description: If set to true the version will be closed
          schema:
            type: boolean
        - name: versionDescription
          in: query
          schema:
            type: string
        - name: user_versions
          in: query
          description: Create, update, or do nothing with user versions on close
          schema:
            type: string
            enum:
              - "none"
              - "new"
              - "update"
      requestBody:
        description: The metadata for the object
        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/Collection"
                - $ref: "https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/AdminPolicy"
  /v1/auth/login:
    post:
      tags:
        - authentication
      summary: Retrieve a JSON web token for subsequent requests
      operationId: "authentication#login"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: The access token
                    example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
                  exp:
                    type: string
                    description: When the token will expire
                    example: 09-13-2023 23:00
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
                - password
              properties:
                email:
                  description: email address of the user
                  type: string
                  format: email
                password:
                  description: password of the user
                  type: string
                  example: sekr3t!
  /v1/auth/proxy:
    post:
      tags:
        - authentication
      summary: Retrieve a JSON web token for a different user
      operationId: "authentication#proxy"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: The access token
                    example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
                  exp:
                    type: string
                    description: When the token will expire
                    example: 09-13-2023 23:00
      parameters:
        - in: query
          name: to
          description: The email of the user to proxy to
          required: true
          schema:
            type: string
components:
  schemas:
    BackgroundJobResultResponse:
      type: object
      properties:
        output:
          type: object
          description: output from the job
          properties:
            druid:
              $ref: "https://raw.githubusercontent.com/sul-dlss/cocina-models/refs/tags/v0.113.0/schema.json#/$defs/Druid"
            errors:
              type: array
              items:
                $ref: "#/components/schemas/Error"
        status:
          type: string
          description: the status of the background job
          enum:
            - pending
            - processing
            - complete
        try_count:
          type: integer
          description: the number of tries
    CreateObjectResponse:
      type: object
      properties:
        jobId:
          type: string
          description: id for the background job that is processing the create object request
      required:
        - jobId
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: "#/components/schemas/Error"
    Error:
      type: object
      properties:
        title:
          type: string
          description: "a short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem."
          example: Invalid Attribute
        detail:
          type: string
          description: a human-readable explanation specific to this occurrence of the problem.
          example: Title must contain at least three characters.
        source:
          type: object
          properties:
            pointer:
              type: string
              example: /data/attributes/title
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
security:
  - bearerAuth: []