DataCite client-prefixes API

Client Prefixes

OpenAPI Specification

datacite-client-prefixes-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: REST activities client-prefixes API
  description: The REST API is used for all API interactions with DataCite services.
  contact:
    name: DataCite Support
    url: https://support.datacite.org
    email: support@datacite.org
  license:
    name: MIT
    url: https://raw.githubusercontent.com/datacite/lupo/master/LICENSE
  version: 2.3.0
servers:
- url: https://api.test.datacite.org
  description: Staging server
- url: https://api.datacite.org
  description: Production server
security:
- {}
- BasicAuth: []
- bearerAuth: []
tags:
- name: client-prefixes
  description: Client Prefixes
paths:
  /client-prefixes:
    get:
      tags:
      - client-prefixes
      summary: Return a list of client-prefixes.
      parameters:
      - in: query
        name: query
        schema:
          type: string
      - in: query
        name: year
        schema:
          type: integer
      - in: query
        $ref: '#/components/parameters/clientIdParam'
      - in: query
        name: prefix-id
        schema:
          type: string
      - in: query
        $ref: '#/components/parameters/pageNumberParam'
      - in: query
        $ref: '#/components/parameters/pageSizeParam'
      - in: query
        name: sort
        schema:
          type: string
          enum:
          - name
          - -name
          - created
          - -created
      responses:
        '200':
          description: A JSON array of client-prefixes.
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ClientPrefix'
                  meta:
                    allOf:
                    - $ref: '#/components/schemas/MetaCore'
                    - type: object
                      properties:
                        years:
                          allOf:
                          - $ref: '#/components/schemas/MetaArray'
                        providers:
                          type: array
                        clients:
                          type: array
                  links:
                    allOf:
                    - $ref: '#/components/schemas/Links'
components:
  schemas:
    MetaObject:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        count:
          type: number
    Links:
      type: object
      properties:
        self:
          type: string
        next:
          type: string
    MetaArray:
      type: array
      items:
        $ref: '#/components/schemas/MetaObject'
    ClientPrefix:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
          - client-prefixes
        attributes:
          type: object
          properties:
            createdAt:
              type: string
              readOnly: true
            updatedAt:
              type: string
              readOnly: true
        relationships:
          type: object
          properties:
            client:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/DataObject'
            provider:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/DataObject'
            providerPrefix:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/DataObject'
            prefix:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/DataObject'
      required:
      - id
    MetaCore:
      type: object
      properties:
        total:
          description: Total results count.
          type: number
        totalPages:
          description: Total pages count.
          type: number
        page:
          description: Current page of the results.
          type: number
    DataObject:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
  parameters:
    pageNumberParam:
      name: page[number]
      in: query
      schema:
        type: integer
      description: Page number for [pagination](https://support.datacite.org/docs/pagination).
    pageSizeParam:
      name: page[size]
      in: query
      schema:
        type: integer
        minimum: 0
        maximum: 1000
      description: Page size between 0 and 1,000 for [pagination](https://support.datacite.org/docs/pagination).
    clientIdParam:
      name: client-id
      in: query
      description: Filter by a specific DataCite client (repository). Use commas to include multiple repositories.
      schema:
        type: string
      example: datacite.blog
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT