Imperial College London Discover API

Search and browse over indexed objects.

OpenAPI Specification

imperial-college-london-discover-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Spiral Open Access Repository (DSpace 7 REST API) Core Discover 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: Discover
  description: Search and browse over indexed objects.
paths:
  /discover/search/objects:
    get:
      tags:
      - Discover
      summary: Search indexed objects
      description: Full-text and faceted search over indexed DSpace objects. Restrict to a type with `dsoType` (e.g. `item`, `collection`, `community`).
      operationId: searchObjects
      parameters:
      - name: query
        in: query
        required: false
        schema:
          type: string
        description: Lucene/Solr query string.
      - name: dsoType
        in: query
        required: false
        schema:
          type: string
          enum:
          - item
          - collection
          - community
      - name: scope
        in: query
        required: false
        schema:
          type: string
          format: uuid
        description: Restrict the search to a community/collection UUID.
      - name: sort
        in: query
        required: false
        schema:
          type: string
        description: Sort spec, e.g. `dc.date.accessioned,DESC`.
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/Size'
      responses:
        '200':
          description: A discovery search result.
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/SearchResult'
components:
  schemas:
    SearchResult:
      type: object
      properties:
        id:
          type: string
          nullable: true
        scope:
          type: string
          nullable: true
        query:
          type: string
          nullable: true
        appliedFilters:
          type: array
          nullable: true
          items:
            type: object
        sort:
          type: object
          nullable: true
        type:
          type: string
          example: discover
        _links:
          type: object
        _embedded:
          type: object
          properties:
            searchResult:
              type: object
              properties:
                _embedded:
                  type: object
                  properties:
                    objects:
                      type: array
                      items:
                        type: object
                        properties:
                          hitHighlights:
                            nullable: true
                            type: object
                          type:
                            type: string
                            example: discover
                          _embedded:
                            type: object
                            properties:
                              indexableObject:
                                $ref: '#/components/schemas/Item'
    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'
    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
    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
  parameters:
    Size:
      name: size
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
      description: Page size.
    Page:
      name: page
      in: query
      required: false
      schema:
        type: integer
        minimum: 0
        default: 0
      description: Zero-based page index.