openapi: 3.0.1
info:
  title: Security Designer REST API Controller
  description: |-
    Security Designer (SD) REST API definitions for domain models, user system models and usage by other applications. <br>
    For loading of the entire model, first send a models/{modelId} GET request to find the loadingId, and then use this ID in a /models/{modelId}/{loadingId}/loadingprogress GET request. <br>
  termsOfService: '?'
  contact:
    name: University of Southampton IT Innovation Centre
    url: http://www.it-innovation.soton.ac.uk/contact-us
    email: admin@it-innovation.soton.ac.uk
  license:
    name: Proprietary
    url: https://unknown.io/
  version: 1.0.0
servers:
  - url: https://security.it-innovation.soton.ac.uk/system-modeller
tags:
  - name: Authentication
    description: Available authentication methods of API Controller.
  - name: Models
    description: Includes all operations of the Model Controller Service.
  - name: Risk
    description: Requests that can operate on the risk calculation procedure.
  - name: Validation
    description: Requests that can operate on the validation procedure.
  - name: Relations
    description: Includes all operations possible on Relations between Assets.
  - name: Assets
    description: Includes all operations possible on Assets.
  - name: Threats and Controls
    description: Includes all operations regarding the threats and their controls within
      the model.
paths:
  /auth:
    post:
      tags:
        - Authentication
      summary: Send a request to authenticate user, returning a cookie.
      operationId: Auth
      parameters:
        - in: header
          name: Access-Control-Allow-Origin
          schema:
            type: "string"
          example: ""
          allowEmptyValue: true
        - in: header
          name: Host
          schema:
            type: "string"
          example: "security.it-innovation.soton.ac.uk"
      requestBody:
        description: The user details to authenticate.
        content:
          application/json:
            schema:
              required:
                - username
                - password
              type: object
              properties:
                username:
                  type: string
                  example: guest
                password:
                  type: string
                  example: password
        required: true
      responses:
        200:
          description: Succesful
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                  authenticated:
                    type: boolean
          headers:
            Set-Cookie:
              schema:
                type: string
                example: Authorization=1234thisisanexampleauthtoken1234; JSESSIONID=abcde12345; Path=/; HttpOnly
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
  /models:
    get:
      tags:
        - Models
      summary: Returns a list of models for the user.
      operationId: Models List
      parameters:
        - in: header
          name: Access-Control-Allow-Origin
          schema:
            type: "string"
            example: ""
          required: true
      #        - in: header
      #          name: Cookie
      #          schema:
      #            type: "string"
      #            example: "Authorization=1234"
      #          required: true
      responses:
        200:
          description: Succesful
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Model'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - cookieAuth: []
          basicAuth: []

    post:
      tags:
        - Models
      summary: Send a request to create a new blank model for the user
      operationId: Model Create
      requestBody:
        description: The model to create.
        content:
          application/json:
            schema:
              required:
                - domainGraph
                - name
              type: object
              properties:
                name:
                  type: string
                  example: MyNewModel
                domainGraph:
                  type: string
                  description: Domain URI to create the model with
                  example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain-network
        required: true
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - basicAuth: []
  /models/import:
    post:
      tags:
        - Models
      summary: Import a model model in .nq.gz or .nq format. returns list of models
        for the user
      operationId: Model Import
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
                - asserted
                - file
                - overwrite
              properties:
                file:
                  type: string
                  description: The file to upload.
                  format: binary
                asserted:
                  type: boolean
                  description: Import asserted facts only
                overwrite:
                  type: boolean
                  description: Does model overwrite existing with the same name?
                newName:
                  type: string
                  description: Choose a new name for the model
        required: true
      responses:
        200:
          description: Succesful
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Model'
        401:
          description: Unauthorized
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - basicAuth: []
  /models/{modelId}:
    get:
      tags:
        - Models
      summary: Return the model info for the given ID.
      operationId: Model Info (Partial)
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Succesful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      tags:
        - Models
      summary: Update a model given the model parameters and ID.
      operationId: Model Update
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      requestBody:
        description: The model details to update.
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                name:
                  type: string
                description:
                  type: string
                domainGraph:
                  type: string
                  description: Domain URI to update the model with
                  example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain-network
                created:
                  type: number
                  format: int64
                modified:
                  type: number
                  format: int64
        required: true
      responses:
        200:
          description: Succesful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - basicAuth: []
    delete:
      tags:
        - Models
      summary: Delete the model given the ID.
      operationId: Model Delete
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Succesful
          content: {}
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - basicAuth: []
  /models/{modelId}/{loadingId}/loadingprogress:
    get:
      tags:
        - Models
      summary: Get an update on loading the model given the ID and loadingID of the
        model.
      operationId: Model Loader (Full)
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
        - name: loadingId
          in: path
          description: Loading ID that can be used to access loading progress. Found
            in ModelInfo definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelProgress'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/export:
    get:
      tags:
        - Models
      summary: Return an export of the model in .nq.gz format.
      operationId: Model Export (Full)
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Succesful
          content:
            text/plain:
              schema:
                type: string
        401:
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/exportAsserted:
    get:
      tags:
        - Models
      summary: Return an export of model excluding inferred assets, relations, controls
        etc... in .nq.gz format.
      operationId: Model Export (Asserted)
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Succesful
          content:
            text/plain:
              schema:
                type: string
        401:
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/palette:
    get:
      tags:
        - Models
      summary: Return the palette available for the model given the ID of the model.
      operationId: Palette
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Succesful
          content:
            application/json:
              schema:
                type: object
                properties:
                  links:
                    $ref: '#/components/schemas/LinkURIs'
                  arrays:
                    type: array
                    items:
                      $ref: '#/components/schemas/AssetDomainTemplate'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/issues:
    get:
      tags:
        - Models
      summary: Get a list of issues for the model.
      operationId: Model Issues
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Issue'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/calc_risks:
    get:
      tags:
        - Risk
      summary: Initiate a risk calculation operation for the model given the ID of
        the model.
      operationId: Risk Calc Initiate
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
        - name: mode
          in: query
          description: Mode with which to run risk calculation, 'CURRENT' or 'FUTURE'.
          required: true
          schema:
            type: string
      responses:
        202:
          description: Accepted
          content: {}
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/riskcalcprogress:
    get:
      tags:
        - Risk
      summary: Get an update on the risk calculation operation running the model given
        the ID of the model.
      operationId: Risk Calc Progress
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Progress'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/validated:
    get:
      tags:
        - Validation
      summary: Initiate a validation operation for the model given the ID of the model.
      operationId: Validation Initiate
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      responses:
        202:
          description: Accepted
          content: {}
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/validationprogress:
    get:
      tags:
        - Validation
      summary: Get an update on the validation operation running the model given the
        ID of the model.
      operationId: Validation Progress
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Progress'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/relations:
    get:
      tags:
        - Relations
      summary: Get a list of Relation present in the model.
      operationId: Relations List
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  allOf:
                    - $ref: '#/components/schemas/Relation'
                    - $ref: '#/components/schemas/RelationAdditional'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
        - Relations
      summary: Submit a new relation to be created.
      operationId: Relation Create
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      requestBody:
        description: Relation object that can be used with the request. Found in Relation
          definition and any response that returns Relation type.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Relation'
        required: true
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  model:
                    $ref: '#/components/schemas/Model'
                  relation:
                    type: object
                    allOf:
                      - $ref: '#/components/schemas/Relation'
                      - $ref: '#/components/schemas/RelationAdditional'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/relations/{relationId}:
    get:
      tags:
        - Relations
      summary: Get information about a relation.
      operationId: Relation Info
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
        - name: relationId
          in: path
          description: Relation ID that can be used in the request. Found in RelationAdditional
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  Relation:
                    $ref: '#/components/schemas/Relation'
                  RelationAdditional:
                    $ref: '#/components/schemas/RelationAdditional'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      tags:
        - Relations
      summary: Update information about a relation.
      operationId: Relation Update
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
        - name: relationId
          in: path
          description: Relation ID that can be used in the request. Found in RelationAdditional
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      requestBody:
        description: Relation object that can be used with the request. Found in Relation
          definition and any response that returns Relation type.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Relation'
        required: true
      responses:
        200:
          description: Successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  Relation:
                    $ref: '#/components/schemas/Relation'
                  RelationAdditional:
                    $ref: '#/components/schemas/RelationAdditional'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - Relations
      summary: Delete a relation given the model and relation IDs.
      operationId: Relation Delete
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
        - name: relationId
          in: path
          description: Relation ID that can be used in the request. Found in RelationAdditional
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Succesful
          content:
            application/json:
              schema:
                type: object
                properties:
                  valid:
                    type: boolean
                  assets:
                    type: array
                    items:
                      type: string
                      example: <asset ID>
                  relations:
                    type: array
                    items:
                      type: string
                      example: <relation ID>
                  issues:
                    type: array
                    items:
                      $ref: '#/components/schemas/Issue'
                  empty:
                    type: boolean
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/assets:
    get:
      tags:
        - Assets
      summary: Get a list of all assets.
      operationId: Assets List
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  Asset:
                    $ref: '#/components/schemas/Asset'
                  AssetAdditional:
                    $ref: '#/components/schemas/AssetAdditional'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
        - Assets
      summary: Post a new asset to be created.
      operationId: Asset Create
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      requestBody:
        description: Asset object that can be used with the request. Found in Relation
          definition and any response that returns Relation type.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetTemplate'
        required: true
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  valid:
                    type: boolean
                  asset:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          type:
                            type: string
                            description: URI identifier to locate the asset template
                              within the domain datastore.
                            example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#Interface
                          trustworthinessAttributeSets:
                            type: array
                            items:
                              type: string
                              example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#TWAS-IntrinsicTW-eb869a1e
                          misbehaviourSets:
                            type: array
                            items:
                              type: string
                              example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#MS-LossOfIntrinsicTW-eb869a1e
                      - $ref: '#/components/schemas/Asset'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/assets/{assetId}:
    get:
      tags:
        - Assets
      summary: Get extended information beloning to an asset, given its ID.
      operationId: Asset Info
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
        - name: assetId
          in: path
          description: Asset ID that can be used in the request. Found in Asset definition
            and any response that returns Asset type or assetId attributes.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  Asset:
                    $ref: '#/components/schemas/Asset'
                  AssetAdditional:
                    $ref: '#/components/schemas/AssetAdditional'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - Assets
      summary: Delete the asset from the model.
      operationId: Asset Delete
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
        - name: assetId
          in: path
          description: Asset ID that can be used in the request. Found in Asset definition
            and any response that returns Asset type or assetId attributes.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  valid:
                    type: boolean
                  assets:
                    type: array
                    items:
                      type: string
                      example: <asset ID>
                  relations:
                    type: array
                    items:
                      type: string
                      example: <reation ID>
                  issues:
                    type: array
                    items:
                      type: string
                      example: <issue ID>
                  empty:
                    type: boolean
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/assets/{assetId}/control:
    put:
      tags:
        - Threats and Controls
      summary: Update a control for an asset. Used mainly in the control set operations.
      operationId: Control Set Update
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
        - name: assetId
          in: path
          description: Asset ID that can be used in the request. Found in Asset definition
            and any response that returns Asset type or assetId attributes.
          required: true
          schema:
            type: string
      requestBody:
        description: Control set object that can be used with the request. Found in
          Control Set definition and any response that returns the Control Set type.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ControlSet'
        required: true
      responses:
        200:
          description: Successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  complianceThreat:
                    type: string
                    description: Array of created compliance threat URIs.
                  complianceSets:
                    type: array
                    description: Array of created compliance set objects.
                    items:
                      $ref: '#/components/schemas/ComplianceSet'
                  threats:
                    type: string
                    description: Array of created threat URIs.
                  controlSets:
                    type: array
                    description: Array of created control set objects.
                    items:
                      $ref: '#/components/schemas/ControlSet'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/assets/{assetId}/controls_and_threats:
    get:
      tags:
        - Threats and Controls
      summary: Receive all controls and threats for a single asset. Can be used for
        more compact model information retrieval.
      operationId: Asset CS & Threats List
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
        - name: assetId
          in: path
          description: Asset ID that can be used in the request. Found in Asset definition
            and any response that returns Asset type or assetId attributes.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  complianceThreat:
                    type: string
                    description: Array of associated compliance threat URIs.
                  complianceSets:
                    type: array
                    description: Array of associated compliance set objects.
                    items:
                      $ref: '#/components/schemas/ComplianceSet'
                  threats:
                    $ref: '#/components/schemas/Threat'
                  controlSets:
                    type: array
                    description: Array of associated control set objects.
                    items:
                      $ref: '#/components/schemas/ControlSet'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/assets/{assetId}/twas:
    put:
      tags:
        - Assets
      summary: Update Trustworthiness Assignment for an asset. Used mainly in the
        Trustworthiness assignment operations.
      operationId: Asset TWAS Update
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
        - name: assetId
          in: path
          description: Asset ID that can be used in the request. Found in Asset definition
            and any response that returns Asset type or assetId attributes.
          required: true
          schema:
            type: string
      requestBody:
        description: Trustworthiness assignment properties to be updated in the request.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrustworthinessAssignment'
        required: true
      responses:
        200:
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustworthinessAssignment'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/assets/controls:
    put:
      tags:
        - Threats and Controls
      summary: Update controls for all assets. Used mainly in the control strategy
        operations.
      operationId: Control Strategy Update
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      requestBody:
        description: Impact to be updated on the misbehaviour set in the request.
        content:
          application/json:
            schema:
              type: object
              properties:
                controls:
                  type: array
                  description: Control URI identifiers with the Asset ID to locate
                    within system datastore.
                  items:
                    type: string
                    example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#CS-BiometricIDVerifier-6492bace
                proposed:
                  type: boolean
        required: true
      responses:
        200:
          description: Successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  complianceThreat:
                    type: string
                    description: Array of affected compliance threat URIs.
                  complianceSets:
                    type: array
                    description: Array of affected compliance set objects.
                    items:
                      $ref: '#/components/schemas/ComplianceSet'
                  threats:
                    type: string
                    description: Array of affected threat URIs.
                  controlSets:
                    type: array
                    description: Array of affected control set objects.
                    items:
                      $ref: '#/components/schemas/ControlSet'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/assets/{assetId}/meta:
    get:
      tags:
        - Assets
      summary: Get all metadata pairs associated with a single asset in a model.
      operationId: Get asset metadata
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
        - name: assetId
          in: path
          description: Asset ID of the asset which metadata will be retrieved for
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful
          content:
            text/plain:
              schema:
                type: string
        401:
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - Assets
      summary: Delete all metadata associated with a single asset
      operationId: Delete asset metadata
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
        - name: assetId
          in: path
          description: Asset ID of the asset which metadata will be retrieved for
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful
          content:
            text/plain:
              schema:
                type: string
        401:
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/assets/meta:
    get:
      tags:
        - Assets
      summary: Query assets by their metadata. A query is constructed from a list of metadata pairs. Each asset
        returned will have (in its metadata) at least one of the specified values for each specified key
      operationId: Query assets by metadata
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
        - name: metadataJson
          in: query
          description: JSON array of metadata pairs which will be used to form the query
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful
          content:
            text/plain:
              schema:
                type: string
        401:
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      tags:
        - Assets
      summary: Replace all metadata on an asset.
      operationId: Replace asset metadata
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      requestBody:
        description: List of metadata pairs with which to replace the asset's metadata
        content:
          application/json:
            schema:
              type: object
              properties:
                assets:
                  type: array
                  items:
                    $ref: '#/components/schemas/MetadataPair'
        required: true
      responses:
        200:
          description: Successful
          content:
            text/plain:
              schema:
                type: string
        401:
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      tags:
        - Assets
      summary: Add metadata on an asset.
      operationId: Add asset metadata
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      requestBody:
        description: List of metadata pairs to add to the asset's metadata
        content:
          application/json:
            schema:
              type: object
              properties:
                assets:
                  type: array
                  items:
                    $ref: '#/components/schemas/MetadataPair'
        required: true
      responses:
        200:
          description: Successful
          content:
            text/plain:
              schema:
                type: string
        401:
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/assets/updateLocations:
    put:
      tags:
        - Assets
      summary: Update location for a set of assets. Used mainly by the Canvas user
        operaitons.
      operationId: Assets Location Update
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      requestBody:
        description: Impact to be updated on the misbehaviour set in the request.
        content:
          application/json:
            schema:
              type: object
              properties:
                assets:
                  type: array
                  items:
                    $ref: '#/components/schemas/AssetLocation'
        required: true
      responses:
        200:
          description: Successful
          content:
            text/plain:
              schema:
                type: string
        401:
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/threats:
    get:
      tags:
        - Threats and Controls
      summary: Find the list of threats available for the model.
      operationId: Threats List (Full)
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Threat'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/misbehaviours/{misbehaviourId}/impact:
    put:
      tags:
        - Threats and Controls
      summary: Update impact information about a misbehaviour associated with a threat.
      operationId: Threat Impact Update
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
        - name: misbehaviourId
          in: path
          description: Misbehaviour Set ID that can be used in the request. Found in
            MisbehaviourSet definition and any response that returns MisbehaviourSet
            definition type.
          required: true
          schema:
            type: string
      requestBody:
        description: Impact to be updated on the misbehaviour set in the request.
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  description: Misbehaviour Set ID
                  example: <MisbehaviourSet ID>
                uri:
                  type: string
                  description: Misbehaviour Set system datastore identifier
                  example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#MS-LossOfControl-6492bace
                impactLevel:
                  type: object
                  properties:
                    uri:
                      type: string
                      description: Impact domain datastore identifier
                      example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#ImpactLevelMedium
        required: true
      responses:
        200:
          description: Successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  Level:
                    $ref: '#/components/schemas/Level'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /models/{modelId}/report:
    get:
      tags:
        - Report
      summary: Get a JSON report for the model
      operationId: Report
      parameters:
        - name: modelId
          in: path
          description: Model ID that can be used to access the model. Found in ModelInfo
            definition and any response that returns ModelInfo type.
          required: true
          schema:
            type: string
      responses:
        200:
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Report'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unknown Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Issue:
      type: object
      properties:
        assetid:
          type: string
        incomingIncomplete:
          type: array
          items:
            $ref: '#/components/schemas/LinkIssue'
        outcomingIncomplete:
          type: array
          items:
            $ref: '#/components/schemas/LinkIssue'
    RelationAdditional:
      type: object
      properties:
        sourceCardinality:
          type: number
          description: -1 indicates cardinality is 1
          format: int
          example: -1.0
        targetCardinality:
          type: number
          description: -1 indicates cardinality is 1
          format: int
          example: -1.0
        immutable:
          type: boolean
        hidden:
          type: boolean
        inferredAssets:
          type: array
          items:
            type: string
            description: Asset URI identifier to locate within system datastore
            example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#Interface_6492bace_7cdb2f3c
        id:
          type: string
          example: 9c1817ed
      description: Additional attributes for Relation of Assets
    Parent:
      type: string
      description: URI to identify and locate parent nodes within the core datastore.
      example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/core#TrustworthinessLevel
    ComplianceSet:
      type: object
      properties:
        uri:
          type: string
          example: http://it-innovation.soton.ac.uk/?
    MisbehaviourSet:
      type: object
      properties:
        uri:
          type: string
          description: URI to locate Misbehaviour within system datastore.
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#MS-LossOfIntrinsicTW-eb869a1e
        label:
          type: string
          example: MS-LossOfIntrinsicTW-eb869a1e
        description:
          type: string
        parents:
          type: array
          items:
            $ref: '#/components/schemas/Parent'
        misbehaviour:
          type: string
          description: URI to locate Misbehaviour type within domain datastore.
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#LossOfIntrinsicTW
        mLabel:
          type: string
          description: Human readable label.
          example: Loss of IntrinsicTW
        asset:
          type: string
          description: URI to locate the asset within system datastore.
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#1cc489d9
        aLabel:
          type: string
          description: Associated Asset human readable label.
          example: SysAdmin
        impactLevel:
          type: object
          allOf:
            - type: object
              properties: {}
              description: Impact level calculation of the misbehaviour set.
            - $ref: '#/components/schemas/Level'
        riskLevel:
          type: object
          allOf:
            - type: object
              properties: {}
              description: Risk level calculation of the misbehaviour set.
            - $ref: '#/components/schemas/Level'
        directCauses:
          type: array
          description: Direct causes of the misbehaviour set.
          items:
            $ref: '#/components/schemas/Cause'
        indirectCauses:
          type: array
          description: Indirect causes of the misbehaviour set.
          items:
            $ref: '#/components/schemas/Cause'
        rootCauses:
          type: array
          description: Root causes of the misbehaviour set.
          items:
            $ref: '#/components/schemas/Cause'
        id:
          type: string
    Node:
      type: object
      properties:
        uri:
          type: string
          description: URI Identifier for the threat pattern to locate within system
            datastore.
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#Node-b5e6a1b1-SpaceRole
        label:
          type: string
        description:
          type: string
        parents:
          type: array
          items:
            $ref: '#/components/schemas/Parent'
        asset:
          type: string
          description: URI identifier to locate the Asset within system datastore.
        role:
          type: string
          description: URI identifier to locate the Role within domain datastore.
        aLabel:
          type: string
          description: Asset human readable label.
        rLabel:
          type: string
          description: Role human readable label.
        id:
          type: string
      description: Role node object associated to the asset. Describes the role of
        the node in the threat pattern.
    Risk:
      type: object
      properties:
        uri:
          type: string
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#RiskLevelVeryLow
        label:
          type: string
          example: Very Low
        description:
          type: string
        parents:
          type: array
          items:
            $ref: '#/components/schemas/Parent'
    LinkURIs:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/Links'
      description: URI keys pointing to the Link objects
    AssetAdditional:
      type: object
      properties:
        type:
          type: string
          description: URI identifier to locate the asset template within the domain
            datastore.
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#Interface
        parents:
          type: array
          items:
            $ref: '#/components/schemas/Parent'
        misbehaviourSets:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/MisbehaviourSet'
          description: 'URI keys pointing to the Misbehaviour Set objects available.
            Example key: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#MS-LossOfAvailability-fe26c80'
        trustworthinessAttributeSets:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TrustworthinessAssignment'
          description: 'Example keys: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#TWAS-IntrinsicTW-eb869a1e'
    ControlStrategy:
      type: object
      properties:
        uri:
          type: string
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#H.MTW.HS.1-HS_6492bace_b5e6a1b1-CSG-PersonalDeviceProtection
        label:
          type: string
        description:
          type: string
        parents:
          type: array
          items:
            $ref: '#/components/schemas/Parent'
        blockingEffect:
          type: object
          properties:
            description:
              type: string
            label:
              type: string
            id:
              type: string
            uri:
              type: string
              example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#TrustworthinessLevelHigh
            value:
              type: number
              format: int32
            parents:
              type: array
              items:
                $ref: '#/components/schemas/Parent'
        type:
          type: string
          example: BLOCK
        controlSets:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ControlSet'
          description: 'URI keys pointing to the Control Set objects available. Example
            key: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#CS-PersonalDevice-6492bace'
        threat:
          type: string
          description: URI to locate the threat related to the control strategy within
            the system datastore
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#H.MTW.HS.1-HS_6492bace_b5e6a1b1
        enabled:
          type: boolean
        id:
          type: string
    AssetLocation:
      type: object
      properties:
        uri:
          type: string
          description: System datastore identifier for the Asset.
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#8fe081a8
        iconX:
          type: number
          format: int32
        iconY:
          type: number
          format: int32
      description: Asset object that can be used with the location change request.
    Relation:
      allOf:
        - $ref: '#/components/schemas/LinkIssue'
        - type: object
          properties:
            asserted:
              type: boolean
            fromID:
              type: string
              example: <asset ID>
            label:
              type: string
              example: interactsWith
            toID:
              type: string
              example: <asset ID>
            visible:
              type: boolean
          description: Relation of assets attributes
    Cause:
      type: object
      properties:
        name:
          type: string
    Asset:
      type: object
      properties:
        uri:
          type: string
          description: System datastore identifier for the Asset.
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#Interface_6492bace_7cdb2f3c
        label:
          type: string
          example: Interface-Host01-WiredLAN
        description:
          type: string
        asserted:
          type: boolean
        visible:
          type: boolean
        iconX:
          type: number
          description: X coordinates for the Asset in the Canvas. Inferred Assets
            have -1.
          format: int32
        iconY:
          type: number
          description: Y coordinates for the Asset in the Canvas. Inferred Assets
            have -1.
          format: int32
        minCardinality:
          type: number
          format: int32
        maxCardinality:
          type: number
          format: int32
        controlSets:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ControlSet'
          description: 'URI keys pointing to the Control Set objects available. Example
            key: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#CS-PersonalDevice-6492bace'
        inferredAssets:
          type: array
          items:
            type: string
            description: URI identifier to locate the inferredAsset in the system
              datastore.
            example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#Interface_6492bace_7cdb2f3c
        id:
          type: string
    ModelProgress:
      allOf:
        - $ref: '#/components/schemas/Progress'
        - type: object
          properties:
            model:
              $ref: '#/components/schemas/Model'
    Pattern:
      type: object
      properties:
        uri:
          type: string
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#HS_6492bace_b5e6a1b1
        label:
          type: string
          example: HS_Host01_Space01
        description:
          type: string
        parents:
          type: array
          items:
            $ref: '#/components/schemas/Parent'
        parent:
          type: string
          description: URI identifier to local the parent in the domain datastore.
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#HS
        parentLabel:
          type: string
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/Node'
        links:
          type: array
          items:
            type: object
            properties:
              fromAssetLabel:
                type: string
                description: Asset label for the source of the relation.
              toAsset:
                type: string
                example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#1bae1f35
              toRole:
                type: string
                example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#SpaceRole
              fromRoleLabel:
                type: string
                description: Role label for the source of the relation.
              toAssetLabel:
                type: string
                description: Asset label for the target of the relation.
              typeLabel:
                type: string
                description: Human readable Label for the type of the relation.
              type:
                type: string
                example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#locatedIn
              toRoleLabel:
                type: string
                description: Role label for the target of the relation.
              fromAsset:
                type: string
                example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#8fe081a8
              fromRole:
                type: string
                example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#HostRole
        id:
          type: string
    Progress:
      type: object
      properties:
        modelId:
          type: string
          description: Different to the model id used in the Request parameters
        progress:
          type: number
          description: A number from 0 to 1 representing the progress as a float.
          format: float
        message:
          type: string
          description: Describes the current loading or calculation step
          example: Loading model or Analysing threats of type CP-DF1FsUTs
        status:
          type: string
          example: running
        error:
          type: string
    Error:
      type: string
      description: The cause of the Error.
      example: Error Message
    ControlSet:
      type: object
      properties:
        uri:
          type: string
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#CS-PersonalDevice-6492bace
        label:
          type: string
          example: PersonalDevice
        description:
          type: string
        parents:
          type: array
          items:
            $ref: '#/components/schemas/Parent'
        control:
          type: string
          description: URI to identify the control within the domain datastore
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#PersonalDevice
        assetUri:
          type: string
          description: URI to locate the asset within the system datastore
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#8fe081a8
        assetId:
          type: string
        proposed:
          type: boolean
        assertable:
          type: boolean
        id:
          type: string
    LinkIssue:
      type: object
      properties:
        from:
          type: string
          description: From asset domain model URI
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#bbbd4ee8
        to:
          type: string
          description: To asset system model URI
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#3dbdcee8
        type:
          type: string
          description: Relation type domain model URI
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#hosts
    AssetTemplate:
      type: object
      properties:
        label:
          type: string
          example: FixedHost
        type:
          type: string
          description: URI identifier of the asset template to locate within the domain
            datastore.
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#HostedAsset
        asserted:
          type: boolean
        visible:
          type: boolean
        iconX:
          type: number
          format: int32
        iconY:
          type: number
          format: int32
        minCardinality:
          type: number
          format: int32
        maxCardinality:
          type: number
          format: int32
    Model:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        domainGraph:
          type: string
          description: Domain URI used to define the model
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain-network
        hasChanged:
          type: boolean
        valid:
          type: boolean
        riskLevelsValid:
          type: boolean
        calculatingRisks:
          type: boolean
        risk:
          type: object
          allOf:
            - type: object
              properties: {}
              description: Not populated unless a LoadingProgress request has completed.
                Include details about model risk calculation.
            - $ref: '#/components/schemas/Risk'
        issues:
          type: array
          description: Not populated unless a LoadingProgress request has completed.
            List all model issues.
          items:
            $ref: '#/components/schemas/Issue'
        threats:
          type: array
          description: Not populated unless a LoadingProgress request has completed.
            List all model threats.
          items:
            $ref: '#/components/schemas/Threat'
        complianceThreats:
          type: array
          description: Not populated unless a LoadingProgress request has completed.
            List all model compliance threats.
          items:
            type: object
            properties: {}
        complianceSets:
          type: array
          description: Not populated unless a LoadingProgress request has completed.
            List all model compliance sets.
          items:
            $ref: '#/components/schemas/ComplianceSet'
        misbehaviourSets:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/MisbehaviourSet'
          description: 'Not populated unless a LoadingProgress request has completed.
            Hash map of all model misbehaviour sets. Example key: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#MS-LossOfIntrinsicTW-eb869a1e'
        twas:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TrustworthinessAssignment'
          description: 'Not populated unless a LoadingProgress request has completed.
            Hash map of all model trustworthiness assignments. Example keys: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#TWAS-IntrinsicTW-eb869a1e'
        controlSets:
          type: array
          description: Not populated unless a LoadingProgress request has completed.
            List all model control sets.
          items:
            $ref: '#/components/schemas/ControlSet'
        userId:
          type: string
        editorId:
          type: string
        created:
          type: integer
          format: int64
        modified:
          type: integer
          format: int64
        modifiedBy:
          type: string
        levels:
          type: array
          items:
            type: object
            properties: {}
        assets:
          type: array
          description: Not populated unless a LoadingProgress request has completed.
            List all model assets.
          items:
            type: object
            allOf:
              - type: object
                properties:
                  type:
                    type: string
                    description: URI identifier to locate the asset template within
                      the domain datastore.
                    example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#Interface
                  trustworthinessAttributeSets:
                    type: array
                    items:
                      type: string
                  misbehaviourSets:
                    type: array
                    items:
                      type: string
                      example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#MS-LossOfAvailability-fe26c80
              - $ref: '#/components/schemas/Asset'
        relations:
          type: array
          description: Not populated unless a LoadingProgress request has completed.
            List all model relations.
          items:
            type: object
            allOf:
              - $ref: '#/components/schemas/Relation'
              - $ref: '#/components/schemas/RelationAdditional'
        loadingId:
          type: string
        id:
          type: string
        readUrl:
          type: string
        validating:
          type: boolean
    Links:
      type: object
      properties:
        linksFrom:
          type: array
          items:
            $ref: '#/components/schemas/Link'
        linksTo:
          type: array
          items:
            $ref: '#/components/schemas/Link'
    Level:
      type: object
      properties:
        uri:
          type: string
          description: Domain/System datastore URI identifier.
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#RiskLevelVeryLow
        label:
          type: string
          description: Human readable label of the level.
          example: Very Low
        description:
          type: string
        parents:
          type: array
          items:
            $ref: '#/components/schemas/Parent'
        value:
          type: number
          format: int32
        id:
          type: string
    AssetDomainTemplate:
      type: object
      properties:
        id:
          type: string
          description: URI identifier of the asset template to locate within the domain
            datastore.
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#HostedAsset
        label:
          type: string
          example: HWDomain
        category:
          type: string
          example: HostedAsset
        assertable:
          type: boolean
        type:
          type: array
          items:
            type: string
            description: URI identifier of the asset template to locate within the
              domain datastore.
            example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#HostedAsset
        icon:
          type: string
          description: Image url for the asset relative to the project root.
          example: ../../images/fallback.png
        description:
          type: string
        minCardinality:
          type: number
          format: int32
        maxCardinality:
          type: number
          format: int32
    Link:
      type: object
      properties:
        type:
          type: string
          description: Relation type domain model URI
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#interactsWith
        label:
          type: string
        comment:
          type: string
        inferred:
          type: boolean
        options:
          type: array
          items:
            type: string
            description: URI identifier for Options available for the link located
              in the domain datastore.
    Threat:
      type: object
      properties:
        uri:
          type: string
          description: Threat URI used to locate within the datastore
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#H.MTW.HS.1-HS_6492bace_b5e6a1b1
        label:
          type: string
        description:
          type: string
        pattern:
          $ref: '#/components/schemas/Pattern'
        threatensAssets:
          type: string
          description: URI used to locate affected assets
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#8fe081a8
        type:
          type: string
          description: Threat type URI to locate within the domain datastore
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#H.MTW.HS.1
        resolved:
          type: boolean
        acceptedJustification:
          type: string
        misbehaviours:
          type: array
          items:
            type: string
            description: URI used to locate misbehaviour within the system datastore
            example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#MS-LossOfControl-6492bace
        indirectEffects:
          type: array
          items:
            type: string
        secondaryEffectConditions:
          type: array
          items:
            type: string
        controlStrategies:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ControlStrategy'
          description: 'URI keys pointing to the Control Strategy objects, containing
            control sets available in the model. Example key: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#H.MTW.HS.1-HS_6492bace_b5e6a1b1-CSG-PersonalDeviceProtection'
        entryPoints:
          type: array
          description: URI identifiers to locate Trustworthiness Assignments within
            the system datastore
          items:
            type: string
            example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#TWAS-UserTW-b5e6a1b1
        likelihood:
          type: object
          allOf:
            - type: object
              properties: {}
              description: Likelihood level calculation of the threat.
            - $ref: '#/components/schemas/Level'
        riskLevel:
          type: object
          allOf:
            - type: object
              properties: {}
              description: Risk level calculation of the threat.
            - $ref: '#/components/schemas/Level'
        rootCause:
          type: boolean
        allControlCombinations:
          type: array
          items:
            type: array
            items:
              $ref: '#/components/schemas/ControlSet'
        id:
          type: string
    TrustworthinessAssignment:
      type: object
      properties:
        uri:
          type: string
          description: URI identifier to locate the Trustworthiness Assignment within
            the system datastore.
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#TWAS-IntrinsicTW-eb869a1e
        label:
          type: string
          example: TWAS-IntrinsicTW-eb869a1e
        description:
          type: string
        parents:
          type: array
          items:
            $ref: '#/components/schemas/Parent'
        asset:
          type: string
          description: URI to locate the asset within system datastore.
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#1cc489d9
        attribute:
          type: object
          properties:
            description:
              type: string
            label:
              type: string
              example: IntrinsicTW
            id:
              type: string
            uri:
              type: string
              description: URI identifier to locate the attribute node within the
                domain datastore.
              example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#IntrinsicTW
            parents:
              type: array
              items:
                $ref: '#/components/schemas/Parent'
        causingMisbehaviourSet:
          type: string
          description: URI identifier to locate the misbehaviour set within the system
            datastore.
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#MS-LossOfIntrinsicTW-eb869a1e
        assertedTWLevel:
          type: object
          allOf:
            - type: object
              properties: {}
              description: User asserted Trustworthiness level.
            - $ref: '#/components/schemas/Level'
        inferredTWLevel:
          type: object
          allOf:
            - type: object
              properties: {}
              description: Inferred Trustworthiness level.
            - $ref: '#/components/schemas/Level'
        id:
          type: string
    MetadataPair:
      type: object
      properties:
        uri:
          type: string
          description: URI identifier to locate the metadata pair within
            the system datastore.
          example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#Meta-323b228cc17b989f-5190fbb1
        key:
          type: string
          description: key of the metadata pair
          example: exampleKey
        value:
          type: string
          description: value of the metadata pair
          example: exampleValue
    Report:
      type: object
      properties:
        name:
          type: string
          example: "Example Model"
        domain:
          type: string
          example: "http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain-example"
        assertedAssets:
          type: object
          example:
            94bef42:
              label: "AssertedAssetLabel"
              type: "AssetType"
              trustworthinessAttribues: ["cd554db0"]
              controls: ["20f85af8"]
              misbehaviours: []
        inferredAssets:
          type: object
          example:
            2a473a46:
              label: "InferredAssetLabel"
              type: "InferredAssetType"
              trustworthinessAttribues: []
              controls: []
              misbehaviours: ["47ba4613"]
        relations:
          type: object
          example:
            938e7d8c:
              from: "c611c17"
              to: "382b4709"
              type: "start"
        threats:
          type: object
          example:
            eb24d124:
              description: "Example threat description"
              likelihood: "Low"
              risk: "Very Low"
              resolved: false
              controlStrategies: ["658b25e3"]
              misbehaviours: ["47ba4613"]
              trustworthinessAttributes: ["cd554db0"]
        misbehaviours:
          type: object
          example:
            47ba4613:
              id: "47ba4613"
              label: "MisbehaviourLabel"
              asset: "2a473a46"
              impact: "Low"
              likelihood: "Low"
              risk: "Very Low"
        trustworthinessAttributes:
          type: object
          example:
            cd554db0:
              asset: "94bef42"
              attribute: "AttributeLabel"
              assumedLevel: "Very High"
              calculatedLevel: "High"
        controls:
          type: object
          example:
            20f85af8:
              label: "ControlLabel"
              asset: "94bef42"
              assertable: false
              proposed: false
              workInProgress: false
        controlStrategies:
          type: object
          example:
            658b25e3:
              id: "658b25e3"
              label: "CsgLabel"
              threat: "eb24d124"
              enabled: false
              blockingEffect: "Very High"
              controls: [
                "20f85af8"
              ]
          
    
  responses:
    default:
      description: Unknown Error
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'
    unauthorized:
      description: Unauthorized
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'
    forbidden:
      description: Forbidden
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'
    notFound:
      description: Not found
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'
    error:
      description: Internal Server Error
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    modelId:
      name: modelId
      in: path
      description: Model ID that can be used to access the model. Found in ModelInfo
        definition and any response that returns ModelInfo type.
      required: true
      schema:
        type: string
    assetId:
      name: assetId
      in: path
      description: Asset ID that can be used in the request. Found in Asset definition
        and any response that returns Asset type or assetId attributes.
      required: true
      schema:
        type: string
    loadingId:
      name: loadingId
      in: path
      description: Loading ID that can be used to access loading progress. Found in
        ModelInfo definition and any response that returns ModelInfo type.
      required: true
      schema:
        type: string
    relationId:
      name: relationId
      in: path
      description: Relation ID that can be used in the request. Found in RelationAdditional
        definition and any response that returns ModelInfo type.
      required: true
      schema:
        type: string
    misbehaviourId:
      name: misbehaviourId
      in: path
      description: Misbehaviour Set ID that can be used in the request. Found in MisbehaviourSet
        definition and any response that returns MisbehaviourSet definition type.
      required: true
      schema:
        type: string
  requestBodies:
    TWAS:
      description: Trustworthiness assignment properties to be updated in the request.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/TrustworthinessAssignment'
      required: true
    misbehaviourImpact:
      description: Impact to be updated on the misbehaviour set in the request.
      content:
        '*/*':
          schema:
            type: object
            properties:
              id:
                type: string
                description: Misbehaviour Set ID
                example: <MisbehaviourSet ID>
              uri:
                type: string
                description: Misbehaviour Set system datastore identifier
                example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/system#MS-LossOfControl-6492bace
              impactLevel:
                type: object
                properties:
                  uri:
                    type: string
                    description: Impact domain datastore identifier
                    example: http://it-innovation.soton.ac.uk/ontologies/trustworthiness/domain#ImpactLevelMedium
      required: true
    controlSet:
      description: Control set object that can be used with the request. Found in
        Control Set definition and any response that returns the Control Set type.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/ControlSet'
      required: true
    asset:
      description: Asset object that can be used with the request. Found in Relation
        definition and any response that returns Relation type.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/AssetTemplate'
      required: true
    relation:
      description: Relation object that can be used with the request. Found in Relation
        definition and any response that returns Relation type.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Relation'
      required: true
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
    cookieAuth:
      type: apiKey
      in: header
      name: Cookie