swagger: "2.0"
basePath: /
info:
  description: CyCAT - The Cybersecurity Resource Catalogue public API services.
  license:
    name: CC-BY
  title: CyCAT.org API
  version: "0.9"
  x-apisguru-categories:
    - security
  x-logo:
    url: https://cycat.org/images/illustrations/pointing.svg
  x-origin:
    - format: swagger
      url: https://api.cycat.org/swagger.json
      version: "2.0"
  x-providerName: cycat.org
consumes:
  - application/json
produces:
  - application/json
responses:
  MaskError:
    description: When any error occurs on mask
  ParseError:
    description: When a mask can't be parsed
tags:
  - description: Default namespace
    name: default
paths:
  "/child/{uuid}":
    get:
      description: Get child UUID(s) from a specified project or publisher UUID.
      operationId: get_child
      responses:
        "200":
          description: Success
      tags:
        - default
    parameters:
      - in: path
        name: uuid
        required: true
        type: string
  /generate/uuid:
    get:
      description: Generate an UUID version 4 RFC4122-compliant.
      operationId: get_generate_uuid
      responses:
        "200":
          description: Success
      tags:
        - default
  /info:
    get:
      description: Get information about the CyCAT backend services including status, overall statistics and version.
      operationId: get_info
      responses:
        "200":
          description: Success
      tags:
        - default
  "/list/project/{start}/{end}":
    get:
      description: List projects registered in CyCAT by pagination (start,end).
      operationId: get_list_project
      responses:
        "200":
          description: Success
      tags:
        - default
    parameters:
      - in: path
        name: start
        required: true
        type: integer
      - in: path
        name: end
        required: true
        type: integer
  "/list/publisher/{start}/{end}":
    get:
      description: List publishers registered in CyCAT by pagination (start,end).
      operationId: get_list_publisher
      responses:
        "200":
          description: Success
      tags:
        - default
    parameters:
      - in: path
        name: start
        required: true
        type: integer
      - in: path
        name: end
        required: true
        type: integer
  "/lookup/{uuid}":
    get:
      description: Lookup UUID registered in CyCAT.
      operationId: get_lookup
      responses:
        "200":
          description: Success
      tags:
        - default
    parameters:
      - in: path
        name: uuid
        required: true
        type: string
  "/namespace/finduuid/{namespace}/{namespaceid}":
    get:
      description: Get all known UUID for a given namespace id.
      operationId: get_namespacefinduuid
      responses:
        "200":
          description: Success
      tags:
        - default
    parameters:
      - in: path
        name: namespace
        required: true
        type: string
      - in: path
        name: namespaceid
        required: true
        type: string
  /namespace/getall:
    get:
      description: List all known namespaces.
      operationId: get_namespacegetall
      responses:
        "200":
          description: Success
      tags:
        - default
  "/namespace/getid/{namespace}":
    get:
      description: Get all ID from a given namespace.
      operationId: get_namespacegetid
      responses:
        "200":
          description: Success
      tags:
        - default
    parameters:
      - in: path
        name: namespace
        required: true
        type: string
  "/parent/{uuid}":
    get:
      description: Get parent UUID(s) from a specified project or item UUID.
      operationId: get_parent
      responses:
        "200":
          description: Success
      tags:
        - default
    parameters:
      - in: path
        name: uuid
        required: true
        type: string
  /propose:
    post:
      description: Propose new resource to CyCAT.
      operationId: post_propose
      responses:
        "200":
          description: Success
      tags:
        - default
  "/relationships/expanded/{uuid}":
    get:
      description: Get relationship(s) UUID from a specified UUID including the relationships meta information.
      operationId: get_relationshipsexpanded
      responses:
        "200":
          description: Success
      tags:
        - default
    parameters:
      - in: path
        name: uuid
        required: true
        type: string
  "/relationships/{uuid}":
    get:
      description: Get relationship(s) UUID from a specified UUID.
      operationId: get_relationships
      responses:
        "200":
          description: Success
      tags:
        - default
    parameters:
      - in: path
        name: uuid
        required: true
        type: string
  "/search/{searchquery}":
    get:
      description: Full-text search in CyCAT and return matching UUID.
      operationId: get_search
      responses:
        "200":
          description: Success
      tags:
        - default
    parameters:
      - in: path
        name: searchquery
        required: true
        type: string
