swagger: '2.0'
info:
  title: Phenotype Library API
  version: v1
host: phenotypes.healthdatagateway.org
schemes:
- https
basePath: /api/v1/swagger.yaml/
consumes:
- application/json
produces:
- application/json
securityDefinitions:
  Basic:
    type: basic
security:
- Basic: []
paths:
  /collections/:
    get:
      operationId: collections_list
      description: Get all collections
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - collections
    parameters: []
  /collections/{collection_id}/detail/:
    get:
      operationId: collections_detail_list
      description: |-
        Get detail of specified collection by collection_id, including associated
          published entities
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - collections
    parameters:
    - name: collection_id
      in: path
      required: true
      type: string
  /concepts/:
    get:
      operationId: concepts_list
      description: Get all concepts accessible to the user, optionally, provide parameters
        to filter by
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - concepts
    parameters: []
  /concepts/C{concept_id}/detail/:
    get:
      operationId: concepts_detail_list
      description: |-
        Get the detail of specified concept by concept_id, optionally target a specific
            version using version_id and/or export the concept codelist
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - concepts
    parameters:
    - name: concept_id
      in: path
      required: true
      type: string
  /concepts/C{concept_id}/export/codes/:
    get:
      operationId: concepts_export_codes_list
      description: |-
        Get the detail of specified concept by concept_id, optionally target a specific
            version using version_id and/or export the concept codelist
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - concepts
    parameters:
    - name: concept_id
      in: path
      required: true
      type: string
  /concepts/C{concept_id}/get-versions/:
    get:
      operationId: concepts_get-versions_list
      description: Get version history of a specific concept, using concept_id
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - concepts
    parameters:
    - name: concept_id
      in: path
      required: true
      type: string
  /concepts/C{concept_id}/version/{version_id}/detail/:
    get:
      operationId: concepts_version_detail_list
      description: |-
        Get the detail of specified concept by concept_id, optionally target a specific
            version using version_id and/or export the concept codelist
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - concepts
    parameters:
    - name: concept_id
      in: path
      required: true
      type: string
    - name: version_id
      in: path
      required: true
      type: string
  /concepts/C{concept_id}/version/{version_id}/export/codes/:
    get:
      operationId: concepts_version_export_codes_list
      description: |-
        Get the detail of specified concept by concept_id, optionally target a specific
            version using version_id and/or export the concept codelist
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - concepts
    parameters:
    - name: concept_id
      in: path
      required: true
      type: string
    - name: version_id
      in: path
      required: true
      type: string
  /data-sources/:
    get:
      operationId: data-sources_list
      description: Get all datasources
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - data-sources
    parameters: []
  /data-sources/{datasource_id}/detail/:
    get:
      operationId: data-sources_detail_list
      description: |-
        Get detail of specified datasource by datasource_id (id or HDRUK UUID for
          linkage between applications), including associated published entities
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - data-sources
    parameters:
    - name: datasource_id
      in: path
      required: true
      type: string
  /phenotypes/:
    get:
      operationId: phenotypes_list
      description: Get all generic entities accessible to the user, optionally paginate
        results
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - phenotypes
    parameters: []
  /phenotypes/{phenotype_id}/detail/:
    get:
      operationId: phenotypes_detail_list
      description: |-
        Get detail of specified entity by phenotype_id, optionally target a specific
          version using version_id and/or target a specific entity field using
          field parameters
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - phenotypes
    parameters:
    - name: phenotype_id
      in: path
      required: true
      type: string
  /phenotypes/{phenotype_id}/export/{field}/:
    get:
      operationId: phenotypes_export_read
      description: |-
        Get detail of specified entity by phenotype_id, optionally target a specific
          version using version_id and/or target a specific entity field using
          field parameters
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - phenotypes
    parameters:
    - name: phenotype_id
      in: path
      required: true
      type: string
    - name: field
      in: path
      required: true
      type: string
  /phenotypes/{phenotype_id}/get-versions/:
    get:
      operationId: phenotypes_get-versions_list
      description: Get version history of specific entity, using phenotype_id
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - phenotypes
    parameters:
    - name: phenotype_id
      in: path
      required: true
      type: string
  /phenotypes/{phenotype_id}/version/{version_id}/detail/:
    get:
      operationId: phenotypes_version_detail_list
      description: |-
        Get detail of specified entity by phenotype_id, optionally target a specific
          version using version_id and/or target a specific entity field using
          field parameters
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - phenotypes
    parameters:
    - name: phenotype_id
      in: path
      required: true
      type: string
    - name: version_id
      in: path
      required: true
      type: string
  /phenotypes/{phenotype_id}/version/{version_id}/export/{field}/:
    get:
      operationId: phenotypes_version_export_read
      description: |-
        Get detail of specified entity by phenotype_id, optionally target a specific
          version using version_id and/or target a specific entity field using
          field parameters
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - phenotypes
    parameters:
    - name: phenotype_id
      in: path
      required: true
      type: string
    - name: version_id
      in: path
      required: true
      type: string
    - name: field
      in: path
      required: true
      type: string
  /tags/:
    get:
      operationId: tags_list
      description: Get all tags
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - tags
    parameters: []
  /tags/{tag_id}/detail/:
    get:
      operationId: tags_detail_list
      description: |-
        Get detail of specified tag by tag_id, including associated
          published entities
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - tags
    parameters:
    - name: tag_id
      in: path
      required: true
      type: string
  /templates/:
    get:
      operationId: templates_list
      description: Get all templates
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - templates
    parameters: []
  /templates/{template_id}/detail/:
    get:
      operationId: templates_detail_list
      description: Get detail of a template, optionally target a specific version
        using version_id
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - templates
    parameters:
    - name: template_id
      in: path
      required: true
      type: string
  /templates/{template_id}/get-versions/:
    get:
      operationId: templates_get-versions_list
      description: Get version history of a specific entity, using phenotype_id
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - templates
    parameters:
    - name: template_id
      in: path
      required: true
      type: string
  /templates/{template_id}/version/{version_id}/detail/:
    get:
      operationId: templates_version_detail_list
      description: Get detail of a template, optionally target a specific version
        using version_id
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - templates
    parameters:
    - name: template_id
      in: path
      required: true
      type: string
    - name: version_id
      in: path
      required: true
      type: string
definitions: {}
