Stanford University Files API

upload binary files

Operations 2

POST /v1/direct_uploads Creates a new file resource
PUT /v1/disk/{encoded_token} 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

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-files-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-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: Stanford Digital Repository API
  version: 1.0.0
  title: SDR Files 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
security:
- bearerAuth: []
tags:
- 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
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT