Imperial College London Core API

Communities, collections, and items.

OpenAPI Specification

imperial-college-london-core-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Spiral Open Access Repository (DSpace 7 REST API) Core API
  description: 'OpenAPI description of the read-oriented, publicly accessible subset of the DSpace 7.6.1 REST API powering Imperial College London''s Spiral open-access repository. The live API root reports `dspaceVersion: DSpace 7.6.1` and `crisVersion: cris-2023.02.05`. Responses are HAL+JSON (application/hal+json). DSpace does not ship a vendor OpenAPI document; this description was authored from the live HAL contract and real responses observed at https://spiral.imperial.ac.uk/server/api . Only anonymous, read-only endpoints verified against the running instance are included; write, workflow, and authenticated administration endpoints are omitted.'
  version: 7.6.1
  contact:
    name: Imperial College London - Spiral
    url: https://spiral.imperial.ac.uk/
  license:
    name: DSpace BSD License
    url: https://github.com/DSpace/DSpace/blob/main/LICENSE
servers:
- url: https://spiral.imperial.ac.uk/server/api
  description: Spiral DSpace 7 REST API (production)
tags:
- name: Core
  description: Communities, collections, and items.
paths:
  /core/communities:
    get:
      tags:
      - Core
      summary: List top-level and all communities
      operationId: getCommunities
      parameters:
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/Size'
      responses:
        '200':
          description: Paginated list of communities.
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/CommunityPage'
  /core/communities/{uuid}:
    get:
      tags:
      - Core
      summary: Get a single community by UUID
      operationId: getCommunity
      parameters:
      - $ref: '#/components/parameters/Uuid'
      responses:
        '200':
          description: A community.
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Community'
        '404':
          $ref: '#/components/responses/NotFound'
  /core/collections:
    get:
      tags:
      - Core
      summary: List collections
      operationId: getCollections
      parameters:
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/Size'
      responses:
        '200':
          description: Paginated list of collections.
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/HalPage'
  /core/collections/{uuid}:
    get:
      tags:
      - Core
      summary: Get a single collection by UUID
      operationId: getCollection
      parameters:
      - $ref: '#/components/parameters/Uuid'
      responses:
        '200':
          description: A collection.
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Collection'
        '404':
          $ref: '#/components/responses/NotFound'
  /core/items/{uuid}:
    get:
      tags:
      - Core
      summary: Get a single item by UUID
      operationId: getItem
      parameters:
      - $ref: '#/components/parameters/Uuid'
      responses:
        '200':
          description: An item (a deposited research output).
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Item'
        '404':
          $ref: '#/components/responses/NotFound'
  /dso/find:
    get:
      tags:
      - Core
      summary: Find a DSpaceObject by UUID
      operationId: dsoFind
      parameters:
      - name: uuid
        in: query
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: The resolved DSpace object.
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Item'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    NotFound:
      description: Object not found.
      content:
        application/json:
          schema:
            type: object
            properties:
              timestamp:
                type: string
                format: date-time
              status:
                type: integer
              message:
                type: string
              path:
                type: string
  schemas:
    MetadataMap:
      type: object
      description: Map of Dublin Core / DSpace metadata field keys (e.g. `dc.title`, `dc.contributor.author`) to arrays of metadata values.
      additionalProperties:
        type: array
        items:
          $ref: '#/components/schemas/MetadataValue'
    PageInfo:
      type: object
      properties:
        size:
          type: integer
        totalElements:
          type: integer
        totalPages:
          type: integer
        number:
          type: integer
    HalPage:
      type: object
      properties:
        _embedded:
          type: object
        _links:
          type: object
        page:
          $ref: '#/components/schemas/PageInfo'
    Collection:
      allOf:
      - $ref: '#/components/schemas/DSpaceObject'
      - type: object
        properties:
          archivedItemsCount:
            type: integer
          type:
            type: string
            example: collection
    Item:
      allOf:
      - $ref: '#/components/schemas/DSpaceObject'
      - type: object
        properties:
          inArchive:
            type: boolean
          discoverable:
            type: boolean
          withdrawn:
            type: boolean
          lastModified:
            type: string
            format: date-time
          entityType:
            type: string
            nullable: true
          type:
            type: string
            example: item
    Community:
      allOf:
      - $ref: '#/components/schemas/DSpaceObject'
      - type: object
        properties:
          archivedItemsCount:
            type: integer
          type:
            type: string
            example: community
    DSpaceObject:
      type: object
      properties:
        id:
          type: string
          format: uuid
        uuid:
          type: string
          format: uuid
        name:
          type: string
        handle:
          type: string
          example: 10044/1/489
        metadata:
          $ref: '#/components/schemas/MetadataMap'
        type:
          type: string
        _links:
          type: object
    MetadataValue:
      type: object
      description: A single metadata field value in DSpace's metadata model.
      properties:
        value:
          type: string
        language:
          type: string
          nullable: true
        authority:
          type: string
          nullable: true
        confidence:
          type: integer
        place:
          type: integer
      required:
      - value
    CommunityPage:
      allOf:
      - $ref: '#/components/schemas/HalPage'
      - type: object
        properties:
          _embedded:
            type: object
            properties:
              communities:
                type: array
                items:
                  $ref: '#/components/schemas/Community'
  parameters:
    Page:
      name: page
      in: query
      required: false
      schema:
        type: integer
        minimum: 0
        default: 0
      description: Zero-based page index.
    Size:
      name: size
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
      description: Page size.
    Uuid:
      name: uuid
      in: path
      required: true
      schema:
        type: string
        format: uuid