Zenodo Access API

Access control and sharing

OpenAPI Specification

zenodo-access-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Zenodo REST Access API
  description: 'REST API for Zenodo, the free open research data repository operated by CERN and built on InvenioRDM. Provides programmatic access to deposits (draft records), published records, file management, communities, vocabularies, OAI-PMH sets, requests, users, groups, statistics, and audit logs. Every published record receives a DOI for persistent citation. Authenticate with a personal access token passed as a Bearer token.

    '
  version: 12.0.0
  contact:
    name: Zenodo Developer Documentation
    url: https://developers.zenodo.org/
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
  x-upstream-spec: https://github.com/inveniosoftware/invenio-openapi
servers:
- url: https://zenodo.org
  description: Zenodo production instance
- url: https://sandbox.zenodo.org
  description: Zenodo sandbox (testing)
security:
- BearerAuth: []
tags:
- name: Access
  description: Access control and sharing
paths:
  /api/records/{recordId}/access/links:
    post:
      summary: Create an access link
      tags:
      - Access
      operationId: createAnAccessLink
      parameters:
      - name: recordId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              permission: view
              expires_at: '2024-11-06'
      responses:
        '201':
          $ref: '#/components/responses/Created'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
      - BearerAuth: []
    get:
      summary: List access links
      tags:
      - Access
      operationId: listAccessLinks
      parameters:
      - name: recordId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/Success'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
      - BearerAuth: []
  /api/records/{recordId}/access/links/{linkId}:
    get:
      summary: Get an access link by ID
      tags:
      - Access
      operationId: getAnAccessLinkById
      parameters:
      - name: recordId
        in: path
        required: true
        schema:
          type: string
      - name: linkId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/Success'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
      - BearerAuth: []
    patch:
      summary: Update an access link
      tags:
      - Access
      operationId: updateAnAccessLink
      parameters:
      - name: recordId
        in: path
        required: true
        schema:
          type: string
      - name: linkId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              permission: edit
              expires_at: '2024-11-06'
      responses:
        '200':
          $ref: '#/components/responses/Success'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
      - BearerAuth: []
    delete:
      summary: Delete an access link
      tags:
      - Access
      operationId: deleteAnAccessLink
      parameters:
      - name: recordId
        in: path
        required: true
        schema:
          type: string
      - name: linkId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/Success'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
      - BearerAuth: []
components:
  responses:
    Created:
      description: Resource created successfully
      content:
        application/json:
          schema:
            type: object
    Success:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
    Unauthorized:
      description: Unauthorized - authentication required
    BadRequest:
      description: Bad request - invalid input parameters
    NotFound:
      description: Not found - resource does not exist
    Forbidden:
      description: Forbidden - insufficient permissions
    InternalServerError:
      description: Internal server error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Personal access token issued from the Zenodo account settings