datacite/lupo

View on GitHub
openapi.yaml

Summary

Maintainability
Test Coverage
openapi: 3.0.0
info:
  title: REST 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
tags:
  - name: activities
    description: Activities
  - name: client-prefixes
    description: Client Prefixes
  - name: clients
    description: Clients
  - name: dois
    description: DOIs
  - name: events
    description: Events
  - name: heartbeat
    description: Heartbeat
  - name: prefixes
    description: Prefixes
  - name: provider-prefixes
    description: Provider Prefixes
  - name: providers
    description: Providers
  - name: reports
    description: Reports
paths:
  /activities:
    get:
      tags:
        - activities
      summary: Get a JSON API result of activities.
      security: []
      parameters:
        - in: query
          name: id
          description: Find activity by an id.
          required: false
          schema:
            type: string
        - in: query
          name: ids
          description: Find activities by array of activity ids
          required: false
          schema:
            type: array
            items:
              type: string
        - in: query
          name: query
          description: Search the index by keyword or query string syntax.
          required: false
          schema:
            type: string
        - in: query
          name: 'page[number]'
          description: Pagination - page number
          required: false
          schema:
            type: integer
        - in: query
          name: 'page[size]'
          required: false
          description: Pagination - page size
          schema:
            type: integer
            minimum: 1
            maximum: 1000
        - in: query
          name: 'page[cursor]'
          required: false
          description: 'Pagination - page cursor (used instead of page[number])'
          schema:
            type: string
      responses:
        '200':
          description: A JSON API result of activities.
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Activity'
  '/activities/{id}':
    get:
      parameters:
        - name: id
          in: path
          description: Activity ID
          required: true
          schema:
            type: string
      tags:
        - activities
      summary: Get a JSON API result of a specific activity.
      responses:
        '200':
          description: A JSON object.
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Activity'
  /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
          name: client-id
          schema:
            type: string
        - in: query
          name: prefix-id
          schema:
            type: string
        - in: query
          name: page[number]
          schema:
            type: integer
        - 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:
                $ref: '#/components/schemas/ClientPrefix'
  /clients:
    get:
      tags:
        - clients
      summary: Return a list of clients (repositories).
      parameters:
        - in: query
          name: query
          schema:
            type: string
        - in: query
          name: year
          description: The year the client was created.
          schema:
            type: integer
        - in: query
          name: provider-id
          schema:
            type: string
        - in: query
          name: software
          schema:
            type: string
            enum:
              - cayuse
              - ckan
              - dataverse
              - dlibra
              - dspace
              - eprints
              - ex libris esploro
              - fedora
              - invenio
              - islandora
              - mycore
              - nesstar
              - omega-psir
              - omeka s
              - open journal systems (ojs)
              - opus
              - pubman
              - pure
              - redivis
              - samvera
              - ubiquity
              - other
              - unknown
        - in: query
          name: client-type
          schema:
            type: string
            enum:
              - repository
              - periodical
              - igsnCatalog
              - raidRegistry
        - in: query
          name: repository-type
          schema:
            type: string
            enum:
              - disciplinary
              - governmental
              - institutional
              - multidisciplinary
              - project-related
              - other
        - in: query
          name: certificate
          schema:
            type: string
            enum:
              - CLARIN
              - CoreTrustSeal
              - DIN 31644
              - DINI
              - DSA
              - RatSWD
              - WDS
        - in: query
          name: 'page[number]'
          schema:
            type: integer
        - in: query
          name: 'page[size]'
          schema:
            type: integer
            minimum: 1
            maximum: 1000
        - in: query
          name: include
          schema:
            type: string
            enum:
              - provider
              - repository
        - in: query
          name: sort
          schema:
            type: string
            enum:
              - relevance
              - name
              - '-name'
              - created
              - '-created'
      responses:
        '200':
          description: A JSON array of clients.
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Client'
  /clients/totals:
    get:
      tags:
        - clients
      summary: Return clients DOI production statistics.
      parameters:
        - in: query
          name: provider-id
          schema:
            type: string
        - in: query
          name: state
          schema:
            type: string
            enum:
              - findable
              - registered
              - draft
      responses:
        '200':
          description: A JSON array of clients stats.
  '/clients/{id}':
    get:
      parameters:
      - name: id
        in: path
        description: Client ID
        required: true
        schema:
          type: string
      tags:
        - clients
      summary: Return a client.
      responses:
        '200':
          description: A JSON object.
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Client'
  /dois:
    get:
      tags:
        - dois
      summary: Return a list of dois.
      parameters:
        - in: query
          name: query
          schema:
            type: string
        - in: query
          name: created
          schema:
            type: integer
        - in: query
          name: registered
          schema:
            type: integer
        - in: query
          name: published
          schema:
            type: integer
        - in: query
          name: provider-id
          schema:
            type: string
        - in: query
          name: client-id
          schema:
            type: string
        - in: query
          name: consortium-id
          schema:
            type: string
        - in: query
          name: prefix
          schema:
            type: string
        - in: query
          name: client-type
          schema:
            type: string
            enum:
              - repository
              - periodical
              - igsnCatalog
              - raidRegistry
        - in: query
          name: certificate
          schema:
            type: string
            enum:
              - CLARIN
              - CoreTrustSeal
              - DIN 31644
              - DINI
              - DSA
              - RatSWD
              - WDS
        - in: query
          name: affiliation-id
          description: Searches creators.affiliation.affiliationIdentifier and contributors.affiliation.affiliationIdentifier for a ROR ID.
          schema:
            type: string
        - in: query
          name: funder-id
          description: Searches fundingReferences.funderIdentifier for a Crossref Funder ID.
          schema:
            type: string
        - in: query
          name: user-id
          description: Searches creators.nameIdentifiers.nameIdentifier for an ORCID iD.
          schema:
            type: string
        - in: query
          name: resource-type-id
          description: Filter by the resourceTypeGeneral.
          schema:
            type: string
            enum:
              - audiovisual
              - book
              - book-chapter
              - collection
              - computational-notebook
              - conference-paper
              - conference-proceeding
              - data-paper
              - dataset
              - dissertation
              - event
              - image
              - instrument
              - interactive-resource
              - journal
              - journal-article
              - model
              - output-management-plan
              - peer-review
              - physical-object
              - preprint
              - report
              - service
              - software
              - sound
              - standard
              - study-registration
              - text
              - workflow
              - other
        - in: query
          name: resource-type
          description: Filter by the free text resourceType.
          schema:
            type: string  
        - in: query
          name: subject
          schema:
            type: string
        - in: query
          name: field-of-science
          schema:
            type: string
        - in: query
          name: license
          schema:
            type: string
        - in: query
          name: schema-version
          schema:
            type: string
        - in: query
          name: state
          schema:
            type: string
            enum:
              - findable
              - registered
              - draft
        - in: query
          name: affiliation
          description: Set affiliation=true to see additional affiliation information such as the affiliation identifier that was added in Schema 4.3.
          schema:
            type: boolean
            example: true
        - in: query
          name: link-check-status
          schema:
            type: string
            enum:
              - 200
              - 400
              - 401
              - 403
              - 404
              - 410
              - 429
              - 500
              - 502
              - 503
        - in: query
          name: has-citations
          description: Searches the citationCount field for integer values greater than or equal to the inputted value. 
          schema:
            type: integer
        - in: query
          name: has-references
          description: Searches the referenceCount field for integer values greater than or equal to the inputted value. 
          schema:
            type: integer
        - in: query
          name: has-parts
          description: Searches the partCount field for integer values greater than or equal to the inputted value. 
          schema:
            type: integer
        - in: query
          name: has-part-of
          description: Searches the partOfCount field for integer values greater than or equal to the inputted value. 
          schema:
            type: integer
        - in: query
          name: has-versions
          description: Searches the versionCount field for integer values greater than or equal to the inputted value. 
          schema:
            type: integer
        - in: query
          name: has-version-of
          description: Searches the versionOfCount field for integer values greater than or equal to the inputted value. 
          schema:
            type: integer
        - in: query
          name: has-views
          description: Searches the viewCount field for integer values greater than or equal to the inputted value. 
          schema:
            type: integer
        - in: query
          name: has-downloads
          description: Searches the downloadCount field for integer values greater than or equal to the inputted value. 
          schema:
            type: integer
        - in: query
          name: has-person
          description: Returns DOIs where creators.nameIdentifiers.nameIdentifierScheme has at least one "ORCID" value. 
          schema:
            type: boolean
        - in: query
          name: has-affiliation
          description: Returns DOIs where either creators.affiliation.affiliationIdentifierScheme or contributors.affiliation.affiliationIdentifierScheme has at least one "ROR" value. 
          schema:
            type: boolean
        - in: query
          name: has-organization
          description: Returns DOIs where either creators.nameIdentifiers.nameIdentifierScheme or contributors.nameIdentifiers.nameIdentifierScheme has at least one "ROR" value. 
          schema:
            type: boolean
        - in: query
          name: has-funder
          description: Returns DOIs where fundingReferences.funderIdentifierType has at least one "Crossref Funder ID" value. 
          schema:
            type: boolean
        - in: query
          name: random
          description: Retreive a random sample of DOIs. When true, the page[number] parameter is ignored.
          schema:
            type: boolean
        - in: query
          name: sample-size
          schema:
            type: integer
            minimum: 1
            maximum: 1000
        - in: query
          name: sample-group
          schema:
            type: string
            enum:
              - client
              - provider
              - resource-type
        - in: query
          name: 'page[number]'
          schema:
            type: integer
        - in: query
          name: 'page[size]'
          schema:
            type: integer
            minimum: 1
            maximum: 1000
        - in: query
          name: 'page[cursor]'
          schema:
            type: string
        - in: query
          name: include
          schema:
            type: string
            enum:
              - client
              - media
        - in: query
          name: sort
          schema:
            type: string
            enum:
              - relevance
              - name
              - '-name'
              - created
              - '-created'
              - updated
              - '-updated'
              - 'published'
              - '-published'
              - 'view-count'
              - '-view-count'
              - 'download-count'
              - '-download-count'
              - 'citation-count'
              - '-citation-count'
              - 'title'
              - '-title'
        - in: query
          name: disable-facets
          description: Exclude facets from the response.
          schema:
            type: boolean
        - in: query
          name: detail
          description: When set to true, will include the following attributes in the response - prefix, suffix, viewsOverTime, citationsOverTime, provider, references, citations. parts, partOf, versions, versionOf, xml, alternateIdentifiers.
          schema:
            type: boolean
        - in: query
          name: fields[dois]
          description: Only return the attributes specified. For example, "fields[dois]=titles,subjects" will only return titles and subjects.
          schema:
            type: string
        - in: query
          name: source
          schema:
            type: string
            enum:
                - mds
                - api
                - fabricaForm
                - fabrica
                - ez
      responses:
        '200':
          description: A JSON array of dois.
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Dois'
    post:
      tags:
        - dois
      summary: Add a new doi.
      security:
        - BasicAuth: []
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Doi'
      responses:
        '201':
          description: Created
  '/dois/{id}':
    get:
      parameters:
      - name: id
        in: path
        description: DOI
        required: true
        schema:
          type: string
      tags:
        - dois
      summary: Return a doi.
      responses:
        '200':
          description: A JSON object.
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Doi'
    put:
      parameters:
      - name: id
        in: path
        description: DOI
        required: true
        schema:
          type: string
      tags:
        - dois
      summary: Update a doi.
      security:
        - BasicAuth: []
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Doi'
      responses:
        '200':
          description: OK
    delete:
      parameters:
      - name: id
        in: path
        description: DOI
        required: true
        schema:
          type: string
      tags:
        - dois
      summary: Delete a doi (for DOIs in draft state only).
      security:
        - BasicAuth: []
        - bearerAuth: []
      responses:
        '204':
          description: No content
  '/dois/{id}/activities':
    get:
      parameters:
      - name: id
        in: path
        description: DOI
        required: true
        schema:
          type: string
      tags:
        - dois
        - activities
      summary: Return activity for a specific DOI.
      responses:
        '200':
          description: A JSON object.
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Activity'
  /events:
    get:
      summary: Return a list of events.
      security: []
      parameters:
        - in: query
          name: query
          schema:
            type: string
        - in: query
          name: subj-id
          schema:
            type: string
        - in: query
          name: obj-id
          schema:
            type: string
        - in: query
          name: doi
          schema:
            type: string
        - in: query
          name: orcid
          schema:
            type: string
        - in: query
          name: prefix
          schema:
            type: string
        - in: query
          name: subtype
          schema:
            type: string
        - in: query
          name: citation-type
          schema:
            type: string
        - in: query
          name: source-id
          schema:
            type: string
        - in: query
          name: registrant-id
          schema:
            type: string
        - in: query
          name: relation-type-id
          schema:
            type: string
        - in: query
          name: issn
          schema:
            type: string
        - in: query
          name: publication-year
          schema:
            type: string
        - in: query
          name: year-month
          schema:
            type: string
        - in: query
          name: 'page[number]'
          schema:
            type: integer
        - in: query
          name: 'page[size]'
          schema:
            type: integer
            minimum: 1
            maximum: 1000
        - in: query
          name: 'page[cursor]'
          schema:
            type: string
        - in: query
          name: include
          schema:
            type: string
            enum:
              - subj
              - obj
        - in: query
          name: sort
          schema:
            type: string
            enum:
              - relevance
              - name
              - '-name'
              - created
              - '-created'
      responses:
        '200':
          description: A JSON array of events.
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Event'
      tags:
        - events
  '/events/{id}':
    get:
      parameters:
      - name: id
        in: path
        description: Event
        required: true
        schema:
          type: string
      tags:
        - events
      summary: Return an event.
      security: []
      responses:
        '200':
          description: A JSON array of events.
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Event'
  /heartbeat:
    get:
      tags:
        - heartbeat
      summary: Return the current status of the REST API.
      security: []
      responses:
        '200':
          description: REST API is operating normally.
          content:
            text/plain:
              schema:
                type: string
                example: OK
        '500':
          description: REST API is not working properly.
          content:
            text/plain:
              schema:
                type: string
                example: failed
  /prefixes:
    get:
      tags:
        - prefixes
      summary: Return a list of prefixes.
      security: []
      parameters:
        - in: query
          name: year
          schema:
            type: integer
        - in: query
          name: state
          schema:
            type: string
            enum:
              - with-repository
              - without-repository
              - unassigned
      responses:
        '200':
          description: A JSON array of prefixes.
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Prefix'
  /prefixes/totals:
    get:
      tags:
        - prefixes
      summary: Return prefixes DOI production statistics.
      parameters:
        - in: query
          name: client-id
          schema:
            type: string
        - in: query
          name: state
          description: Must be authenticated to view registered and draft DOIs.
          schema:
            type: string
            enum:
              - findable
              - registered
              - draft
      responses:
        '200':
          description: A JSON array of prefixes stats.
  '/prefixes/{id}':
    get:
      tags:
        - prefixes
      summary: Return a prefix.
      security: []
      parameters:
        - name: id
          in: path
          description: Prefix
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Return a prefix.
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Prefix'
  /provider-prefixes:
    get:
      tags:
        - provider-prefixes
      summary: Return a list of provider-prefixes.
      parameters:
        - in: query
          name: query
          schema:
            type: string
        - in: query
          name: year
          schema:
            type: integer
        - in: query
          name: consortium-id
          schema:
            type: string
        - in: query
          name: provider-id
          schema:
            type: string
        - in: query
          name: prefix-id
          schema:
            type: string
        - in: query
          name: page[number]
          schema:
            type: integer
        - in: query
          name: sort
          schema:
            type: string
            enum:
              - name
              - '-name'
              - created
              - '-created'
      responses:
        '200':
          description: A JSON array of provider-prefixes.
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ProviderPrefix'
  /providers:
    get:
      tags:
        - providers
      summary: Return a list of providers (including members and consortium organizations).
      parameters:
        - in: query
          name: query
          schema:
            type: string
        - in: query
          name: year
          description: The year the provider was created.
          schema:
            type: integer
        - in: query
          name: consortium-id
          schema:
            type: string
        - in: query
          name: region
          schema:
            type: string
            enum:
              - amer
              - apac
              - emea
        - in: query
          name: member-type
          schema:
            type: string
            enum:
              - consortium_organization
              - direct_member
              - governmentAgency
              - consortium
              - member_only
              - developer
        - in: query
          name: organization-type
          schema:
            type: string
            enum:
              - academicInstitution
              - governmentAgency
              - nationalInstitution
              - publisher
              - professionalSociety
              - researchInstitution
              - serviceProvider
              - internationalOrganization
              - other
        - in: query
          name: focus-area
          schema:
            type: string
            enum:
              - naturalSciences
              - engineeringAndTechnology
              - medicalAndHealthSciences
              - agriculturalSciences
              - socialSciences
              - humanities
              - general
        - in: query
          name: has-required-contacts
          schema:
            type: boolean
        - in: query
          name: 'page[number]'
          schema:
            type: integer
        - in: query
          name: 'page[size]'
          schema:
            type: integer
            minimum: 1
            maximum: 1000
        - in: query
          name: sort
          schema:
            type: string
            enum:
              - relevance
              - name
              - '-name'
              - created
              - '-created'
      responses:
        '200':
          description: A JSON array of prefixes.
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Provider'
  /providers/totals:
    get:
      tags:
        - providers
      summary: Return providers DOI production statistics.
      parameters:
        - in: query
          name: state
          schema:
            type: string
            enum:
              - findable
              - registered
              - draft
      responses:
        '200':
          description: A JSON array of providers stats.
  '/providers/{id}':
    get:
      parameters:
      - name: id
        in: path
        description: Provider ID
        required: true
        schema:
          type: string
      tags:
        - providers
      summary: Return a provider.
      responses:
        '200':
          description: A JSON object.
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Provider'
  /reports:
    get:
      tags:
        - reports
      summary: A JSON array of reports.
      security: []
      parameters:
        - in: query
          name: platform
          description: >-
            Name of the Platform the usage is being requested for. This can be
            omitted if the service provides usage for only one platform.
          schema:
            type: string
        - in: query
          name: report-name
          description: The long name of the report.
          schema:
            type: string
        - in: query
          name: report-id
          description: >-
            The report ID or code or shortname. Typically this will be the same
            code provided in the Report parameter of the request.
          schema:
            type: string
        - in: query
          name: release
          description: The release or version of the report.
          schema:
            type: string
        - in: query
          name: created
          description: >-
            Time the report was prepared. Format as defined by date-time -
            RFC3339
          schema:
            type: string
            format: dateTime
        - in: query
          name: created-by
          description: Name of the organization producing the report.
          schema:
            type: string
        - in: query
          name: 'page[number]'
          schema:
            type: integer
        - in: query
          name: 'page[size]'
          schema:
            type: integer
            minimum: 1
            maximum: 1000
      responses:
        '200':
          description: A JSON array of reports.
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Report'
    post:
      tags:
        - reports
      summary: Add a new report.
      security:
        - BasicAuth: []
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Report'
      responses:
        '201':
          description: Created
  '/reports/{id}':
    get:
      parameters:
      - name: id
        in: path
        description: Report
        required: true
        schema:
          type: string
      tags:
        - reports
      summary: Return a report.
      responses:
        '200':
          description: A JSON object.
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Report'
    put:
      parameters:
      - name: id
        in: path
        description: Report
        required: true
        schema:
          type: string
      tags:
        - reports
      summary: Update a report.
      security:
        - BasicAuth: []
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Report'
      responses:
        '200':
          description: OK
    delete:
      parameters:
      - name: id
        in: path
        description: Report
        required: true
        schema:
          type: string
      tags:
        - reports
      summary: Delete a report.
      security:
        - BasicAuth: []
        - bearerAuth: []
      responses:
        '204':
          description: No content
components:
  schemas:
    Client:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
            type:
              type: string
            attributes:
              type: object
              properties:
                name:
                  type: string
                symbol:
                  type: string
                contactName:
                  type: string
                contactEmail:
                  type: string
                description:
                  type: string
                domains:
                  type: string
                url:
                  type: string
                created:
                  type: string
                  readOnly: true
                updated:
                  type: string
                  readOnly: true
      required:
        - id
        - attributes - name - symbol - contactName - contactEmail
      example:
        id: tib.pangaea
        attributes:
          name: Pangaea
    ClientPrefix:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
            type:
              type: string
            attributes:
              type: object
              properties:
                created:
                  type: string
                  readOnly: true
                updated:
                  type: string
                  readOnly: true
      required:
        - id
    Activity:
      type: object
      description: Represents an activity for an event within DataCite systems.
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: 0000-0000-0000-0000
            type:
              type: string
            attributes:
              type: object
              properties:
                'prov:wasGeneratedBy':
                  type: string
                'prov:generatedAtTime':
                  type: string
                'prov:wasDerivedFrom':
                  type: string
                'prov:wasAttributedTo':
                  type: string
                action:
                  type: string
                version:
                  type: number
                changes:
                  type: object
    Doi:
      description: >-
        Represents a single DOI and provides access to metadata attributes, further
        schema specific information can be found at https://schema.datacite.org
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              readOnly: true
            type:
              type: string
              enum: [dois]
            attributes:
                $ref: '#/components/schemas/DoiAttributes'
            relationships:
                type: object
                readOnly: true
                properties:
                  client:
                    type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/DoiDataObject'
                  provider:
                    type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/DoiDataObject'
                  media:
                    type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/DoiDataObject'
                  references:
                    type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/DoiDataArray'
                  citations:
                    type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/DoiDataArray'
                  parts:
                    type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/DoiDataArray'
                  partOf:
                    type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/DoiDataArray'
                  versions:
                    type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/DoiDataArray'
                  versionOf:
                    type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/DoiDataArray'
          required:
            - type
      example:
        data:
          type: dois
          attributes:
            doi: 10.5438/0014
            prefix: "10.5438"
            suffix: "0014"
            identifiers:
              - identifier: 'https://doi.org/10.5438/0014'
                identifierType: DOI
            creators:
              - name: DataCite Metadata Working Group
            titles:
              - title: >-
                  DataCite Metadata Schema Documentation for the Publication and
                  Citation of Research Data v4.1
            publisher: DataCite
            publicationYear: 2017
            types:
              resourceTypeGeneral: Text
            url: https://schema.datacite.org/meta/kernel-4.1/
    Dois:
      description: >-
        Represents a list of DOIs and provides access to metadata attributes, further
        schema specific information can be found at https://schema.datacite.org
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              type:
                type: string
                enum: [dois]
              attributes:
                  $ref: '#/components/schemas/DoisAttributes'
              relationships:
                type: object
                properties:
                  client:
                    type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/DoiDataObject'
            required:
              - type
        meta:
          type: object
          properties:
            total:
              type: number
            totalPages:
              type: number
            page:
              type: number
            states:
               $ref: '#/components/schemas/DoiMetaArray'
            resourceTypes:
               $ref: '#/components/schemas/DoiMetaArray'
            created:
               $ref: '#/components/schemas/DoiMetaArray'
            published:
               $ref: '#/components/schemas/DoiMetaArray'
            registered:
               $ref: '#/components/schemas/DoiMetaArray'
            providers:
               $ref: '#/components/schemas/DoiMetaArray'
            clients:
               $ref: '#/components/schemas/DoiMetaArray'
            affiliations:
               $ref: '#/components/schemas/DoiMetaArray'
            prefixes:
               $ref: '#/components/schemas/DoiMetaArray'
            certificates:
               $ref: '#/components/schemas/DoiMetaArray'
            licenses:
               $ref: '#/components/schemas/DoiMetaArray'
            schemaVersions:
               $ref: '#/components/schemas/DoiMetaArray'
            linkChecksStatus:
               $ref: '#/components/schemas/DoiMetaArray'
            subjects:
               $ref: '#/components/schemas/DoiMetaArray'
            fieldsOfScience:
               $ref: '#/components/schemas/DoiMetaArray'
            citations:
               $ref: '#/components/schemas/DoiMetaArray'
            views:
               $ref: '#/components/schemas/DoiMetaArray'
            downloads:
               $ref: '#/components/schemas/DoiMetaArray'
        links:
          type: object
          properties:
            self:
              type: string
            next:
              type: string
      example:
        data:
          type: dois
          attributes:
            doi: 10.5438/0014
            prefix: "10.5438"
            suffix: "0014"
            identifiers:
              - identifier: 'https://doi.org/10.5438/0014'
                identifierType: DOI
            creators:
              - name: DataCite Metadata Working Group
            titles:
              - title: >-
                  DataCite Metadata Schema Documentation for the Publication and
                  Citation of Research Data v4.1
            publisher: DataCite
            publicationYear: 2017
            types:
              resourceTypeGeneral: Text
            url: https://schema.datacite.org/meta/kernel-4.1/       
    DoiAttributes: # Extended attributes for Doi model, used in /dois{id} response.
      allOf:
        - type: object
          properties:
            doi:
              type: string
            event:
              description: Can be set to trigger a DOI state change.
              type: string
              enum:
                - publish
                - register
                - hide
              writeOnly: true
            prefix:
              type: string
            suffix:
              type: string
            identifiers:
              type: array
              items:
                type: object
                properties:
                  identifier:
                    type: string
                  identifierType:
                    type: string
            alternateIdentifiers:
              type: array
              items:
                type: object
                properties:
                  alternateIdentifierType:
                    type: string
                  alternateIdentifier:
                    type: string
        - $ref: '#/components/schemas/DoiPropertiesMetadata'
        - type: object
          properties:
            xml:
              type: string
        - $ref: '#/components/schemas/DoiPropertiesOther'
        - type: object
          properties:
            viewCount:
              readOnly: true
              type: number
            viewsOverTime:
              readOnly: true
              type: array
              items:
                type: object
                properties:
                  yearMonth:
                    type: string
                  total:
                    type: number
            downloadCount:
              readOnly: true
              type: number
            downloadsOverTime:
              readOnly: true
              type: array
              items:
                type: object
                properties:
                  yearMonth:
                    type: string
                  total:
                    type: number
            referenceCount:
              readOnly: true
              type: number
            citationCount:
              readOnly: true
              type: number
            citationsOverTime:
              readOnly: true
              type: array
              items:
                type: object
                properties:
                  yearMonth:
                    type: string
                  total:
                    type: number
            partCount:
              readOnly: true
              type: number
            partOfCount:
              readOnly: true
              type: number
            versionCount:
              readOnly: true
              type: number
            versionOfCount:
              readOnly: true
              type: number
            landingPage:
              readOnly: true
              description: 'Data describing the landing page, used by link checking.'
              type: object
              properties:
                checked:
                  type: string
                url:
                  type: string
                contentType:
                  type: string
                error:
                  type: string
                redirectCount:
                  type: number
                redirectUrls:
                  type: array
                  items:
                    type: string
                downloadLatency:
                  type: number
                hasSchemaOrg:
                  type: boolean
                schemaOrgid:
                  type: string
                dcIdentifier:
                  type: string
                citationDoi:
                  type: string
                bodyhasPid:
                  type: boolean
        - $ref: '#/components/schemas/DoiPropertiesDates'
    DoisAttributes: # Doi attributes used in /dois list response.
      allOf:
        - type: object
          properties:
            doi:
              type: string
            identifiers:
              type: array
              items:
                type: object
                properties:
                  identifier:
                    type: string
                  identifierType:
                    type: string
        - $ref: '#/components/schemas/DoiPropertiesMetadata'
        - $ref: '#/components/schemas/DoiPropertiesOther'
        - type: object
          properties:
            viewCount:
              readOnly: true
              type: number
            downloadCount:
              readOnly: true
              type: number
            referenceCount:
              readOnly: true
              type: number
            citationCount:
              readOnly: true
              type: number
            partCount:
              readOnly: true
              type: number
            partOfCount:
              readOnly: true
              type: number
            versionCount:
              readOnly: true
              type: number
            versionOfCount:
              readOnly: true
              type: number
        - $ref: '#/components/schemas/DoiPropertiesDates'
      required:
        - publisher
        - publicationYear   
    DoiPropertiesMetadata:
      type: object
      properties:
        creators:
            type: array
            items:
              type: object
              properties:
                nameType:
                  $ref: '#/components/schemas/nameType'
                nameIdentifiers:
                  type: array
                  items:
                    type: object
                    properties:
                      nameIdentifier:
                        type: string
                      nameIdentifierScheme:
                        type: string
                      schemeUri:
                        type: string
                name:
                  type: string
                givenName:
                  type: string
                familyName:
                  type: string
                affiliation:
                  type: array
                  items:
                    type: object
                    properties:
                      affiliationIdentifier:
                        type: string
                      affiliationIdentifierScheme:
                        type: string
                      name:
                        type: string
                      schemeUri:
                        type: string
                lang:
                  type: string
        titles:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              titleType:
                $ref: '#/components/schemas/titleType'
              lang:
                type: string
        publisher:
          type: object
          properties:
            name:
              type: string
            publisherIdentifier:
              type: string
            publisherIdentifierScheme:
              type: string
            schemeUri:
              type: string
            lang:
              type: string
        container:
          readOnly: true
          type: object
          properties:
            type:
              type: string
            identifier:
              type: string
            identifierType:
              type: string
            title:
              type: string
            volume:
              type: string
            issue:
              type: string
            firstPage:
              type: string
            lastPage:
              type: string
        publicationYear:
          type: integer
        subjects:
          type: array
          items:
            type: object
            properties:
              subject:
                type: string
              subjectScheme:
                type: string
              schemeUri:
                type: string
              valueUri:
                type: string
              lang:
                type: string
              classificationCode:
                type: string
        contributors:
          type: array
          items:
            type: object
            properties:
              nameType:
                $ref: '#/components/schemas/nameType'
              nameIdentifiers:
                type: array
                items:
                  type: object
                  properties:
                    nameIdentifier:
                      type: string
                    nameIdentifierScheme:
                      type: string
                    schemeUri:
                      type: string
              name:
                type: string
              givenName:
                type: string
              familyName:
                type: string
              affiliation:
                type: array
                items:
                  type: object
                  properties:
                    affiliationIdentifier:
                      type: string
                    affiliationIdentifierScheme:
                      type: string
                    name:
                      type: string
                    schemeUri:
                      type: string
              contributorType:
                $ref: '#/components/schemas/contributorType'
              lang:
                type: string
        dates:
          type: array
          items:
            type: object
            properties:
              date:
                type: string
              dateType:
                type: string
                enum:
                  - Accepted
                  - Available
                  - Copyrighted
                  - Collected
                  - Created
                  - Issued
                  - Submitted
                  - Updated
                  - Valid
                  - Withdrawn
                  - Other
              dateInformation:
                type: string
        language:
          type: string
        types:
          type: object
          properties:
            resourceTypeGeneral:
              $ref: '#/components/schemas/resourceTypeGeneral'
            resourceType:
              type: string
            schemaOrg:
              type: string
            bibtex:
              type: string
            citeproc:
              type: string
            ris:
              type: string
        relatedIdentifiers:
          type: array
          items:
            type: object
            properties:
              relatedIdentifier:
                type: string
              relatedIdentifierType:
                $ref: '#/components/schemas/relatedIdentifierType'
              relationType:
                $ref: '#/components/schemas/relationType'
              resourceTypeGeneral:
                $ref: '#/components/schemas/resourceTypeGeneral'
              relatedMetadataScheme:
                type: string
              schemeUri:
                type: string
              schemeType:
                type: string
        relatedItems:
          type: array
          items:
            type: object
            properties:
              relatedItemType:
                $ref: '#/components/schemas/resourceTypeGeneral'
              relationType:
                $ref: '#/components/schemas/relationType'
              relatedItemIdentifier:
                type: object
                properties:
                  relatedItemIdentifier:
                    type: string
                  relatedItemIdentifierType:
                    $ref: '#/components/schemas/relatedIdentifierType'
                  relatedMetadataScheme:
                    type: string
                  schemeURI:
                    type: string
                  schemeType:
                    type: string
              creators:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                    givenName:
                      type: string
                    familyName:
                      type: string
                    nameType:
                      $ref: '#/components/schemas/nameType'
              titles:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                    titleType:
                      $ref: '#/components/schemas/titleType'
              volume:
                type: string
              issue:
                type: string
              number:
                type: string
              numberType:
                type: string
                enum:
                  - Article
                  - Chapter
                  - Report
                  - Other
              firstPage:
                type: string
              lastPage:
                type: string
              publisher:
                type: string
              publicationYear:
                type: string
              edition:
                type: string
              contributors:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                    givenName:
                      type: string
                    familyName:
                      type: string
                    nameType:
                      $ref: '#/components/schemas/nameType'
                    contributorType:
                      $ref: '#/components/schemas/contributorType'
        sizes:
          type: array
          items:
            type: string
        formats:
          type: array
          items:
            type: string
        version:
          type: string
        rightsList:
          type: array
          items:
            type: object
            properties:
              rights:
                type: string
              rightsUri:
                type: string
              schemeUri:
                type: string
              rightsIdentifier:
                type: string
              rightsIdentifierScheme:
                type: string
              lang:
                type: string
        descriptions:
          type: array
          items:
            type: object
            properties:
              description:
                type: string
              descriptionType:
                type: string
                enum:
                  - Abstract
                  - Methods
                  - SeriesInformation
                  - TableOfContents
                  - TechnicalInfo
                  - Other
              lang:
                type: string
        geoLocations:
          type: array
          items:
            type: object
            properties:
              geoLocationPoint:
                type: object
                properties:
                  pointLongitude:
                    type: string
                  pointLatitude:
                    type: string
              geoLocationBox:
                type: object
                properties:
                  westBoundLongitude:
                    type: string
                  eastBoundLongitude:
                    type: string
                  southBoundLatitude:
                    type: string
                  northBoundLatitude:
                    type: string
              geoLocationPlace:
                type: string
        fundingReferences:
          type: array
          items:
            type: object
            properties:
              funderName:
                type: string
              funderIdentifier:
                type: string
              funderIdentifierType:
                type: string
                enum:
                  - Crossref Funder ID
                  - GRID
                  - ISNI
                  - ROR
                  - Other
              awardNumber:
                type: string
              awardUri:
                type: string
              awardTitle:
                type: string
    DoiPropertiesOther:
      type: object
      properties:
        url:
          type: string
        contentUrl:
          readOnly: true
          type: array
          items:
            type: string
        metadataVersion:
          readOnly: true
          type: number
        schemaVersion:
          type: string
        source:
          readOnly: true
          type: string
        isActive:
          readOnly: true
          type: boolean
        state:
          readOnly: true
          type: string
        reason:
          readOnly: true
          type: string
    DoiPropertiesDates:
      type: object
      properties:
        created:
          type: string
          readOnly: true
        registered:
          type: string
          readOnly: true
        updated:
          type: string
          readOnly: true
    DoiDataObject:
        type: object
        properties:
          id:
            type: string
          type:
            type: string
    DoiDataArray:
      type: array
      items:
        $ref: '#/components/schemas/DoiDataObject'
    DoiMetaObject:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        count:
          type: number
    DoiMetaArray:
      type: array
      items:
        $ref: '#/components/schemas/DoiMetaObject'
    Event:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
            type:
              type: string
            attributes:
              type: object
              properties:
                subjId:
                  type: string
                objId:
                  type: string
                messageAction:
                  type: string
                  enum:
                    - create
                    - delete
                relationTypeId:
                  type: string
                sourceToken:
                  type: string
                sourceId:
                  type: string
                total:
                  type: number
                license:
                  type: string
                occuredAt:
                  type: string
                timestamp:
                  type: string
                subj:
                  type: object
                obj:
                  type: object
      required:
        - id
        - attributes - subjId - sourceToken - sourceId
    Prefix:
      type: object
      properties:
        data:
          type: object
          properties:
            prefix:
              type: string
      required:
        - prefix
    ProviderPrefix:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
            attributes:
              type: object
              properties:
                created:
                  type: string
                  readOnly: true
                updated:
                  type: string
                  readOnly: true
      required:
        - id
    Provider:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            symbol:
              type: string
      required:
        - id
        - attributes - name - symbol
      example:
        id: bl
        attributes:
          name: British Library
          symbol: BL
    Report:
      type: object
      description: >-
        Describes the formatting needs for the COUNTER Dataset Report. Response
        may include the Report_Header (optional), Report_Datasets (usage stats).
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: 0000-0000-0000-0000
            report-name:
              type: string
              description: The long name of the report.
              example: Dataset Report
            report-id:
              type: string
              description: >-
                The report ID or code or shortname. Typically this will be the
                same code provided in the Report parameter of the request.
              example: DSR
            release:
              type: string
              description: The release or version of the report.
              example: RD1
            created:
              type: string
              format: dateTime
              description: >-
                Time the report was prepared. Format as defined by date-time -
                RFC3339
              example: '2016-09-08T22:47:31Z'
            created-by:
              type: string
              description: Name of the organization producing the report.
              example: DataONE
            report-filters:
              type: string
              description: >-
                Zero or more report filters used for this report. Typically
                reflect filters provided on the Request. Filters limit the data
                to be reported on.
            report-attributes:
              type: string
              description: >-
                Zero or more additional attributes applied to the report.
                Attributes inform the level of detail in the report.
            reporting-period:
              type: string
              description: Time the report was prepared.
            report-datasets:
              type: string
              description: >-
                Defines the output for the Report_Datasets being returned in a
                Dataset Report. Collection of datasets from the report.
      required:
        - report-datasets
        - report-id
        - report-name
        - release
        - created-by
        - reporting-period
    relationType:
      type: string
      enum:
        - IsCitedBy
        - Cites
        - IsSupplementTo
        - IsSupplementedBy
        - IsContinuedBy
        - Continues
        - IsDescribedBy
        - Describes
        - HasMetadata
        - IsMetadataFor
        - HasVersion
        - IsVersionOf
        - IsNewVersionOf
        - IsPreviousVersionOf
        - IsPartOf
        - HasPart
        - IsPublishedIn
        - IsReferencedBy
        - References
        - IsDocumentedBy
        - Documents
        - IsCompiledBy
        - Compiles
        - IsVariantFormOf
        - IsOriginalFormOf
        - IsIdenticalTo
        - IsReviewedBy
        - Reviews
        - IsDerivedFrom
        - IsSourceOf
        - IsRequiredBy
        - Requires
        - IsObsoletedBy
        - Obsoletes
        - IsCollectedBy
        - Collects
    resourceTypeGeneral:
      type: string
      enum:
        - Audiovisual
        - Book
        - BookChapter
        - Collection
        - ComputationalNotebook
        - ConferencePaper
        - ConferenceProceeding
        - DataPaper
        - Dataset
        - Dissertation
        - Event
        - Image
        - Instrument
        - InteractiveResource
        - Journal
        - JournalArticle
        - Model
        - OutputManagementPlan
        - PeerReview
        - PhysicalObject
        - Preprint
        - Report
        - Service
        - Software
        - Sound
        - Standard
        - StudyRegistration
        - Text
        - Workflow
        - Other
    contributorType:
      type: string
      enum:
        - ContactPerson
        - DataCollector
        - DataCurator
        - DataManager
        - Distributor
        - Editor
        - HostingInstitution
        - Producer
        - ProjectLeader
        - ProjectManager
        - ProjectMember
        - RegistrationAgency
        - RegistrationAuthority
        - RelatedPerson
        - Researcher
        - ResearchGroup
        - RightsHolder
        - Sponsor
        - Supervisor
        - WorkPackageLeader
        - Other
    relatedIdentifierType:
      type: string
      enum:
        - ARK
        - arXiv
        - bibcode
        - DOI
        - EAN13
        - EISSN
        - Handle
        - IGSN
        - ISBN
        - ISSN
        - ISTC
        - LISSN
        - LSID
        - PMID
        - PURL
        - UPC
        - URL
        - URN
        - w3id
    titleType:
      type: string
      enum:
        - AlternativeTitle
        - Subtitle
        - TranslatedTitle
        - Other
    nameType:
      type: string
      enum:
        - Personal
        - Organizational
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
security:
  - {}
  - BasicAuth: []
  - bearerAuth: []