> ## Documentation Index
> Fetch the complete documentation index at: https://docs.visotrust.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the detections for a relationship

> Returns one page of the control validation detections (e.g. CUECs, exceptions, shared-responsibility-model statements) in this relationship's evidence, one entry per detection, in id order. Read every page by passing each response's nextAfterId as afterId until it is null; if riskAssessmentId changes between pages, the evidence changed, so start again. riskAssessmentId is null only before the relationship's first risk assessment, which is not the same as having no detections. Detections on artifacts listed in artifactsInProgress are left out until their validation completes, so a detection missing from one of those artifacts has not been resolved.




## OpenAPI

````yaml https://app.visotrust.com/v1/api-docs get /api/v1/relationships/{id}/detections
openapi: 3.1.0
info:
  title: VISO TRUST API Documentation
  description: VISO TRUST
  version: v1.0
servers:
  - url: https://app.visotrust.com
    description: Generated server url
security: []
externalDocs:
  description: VISO TRUST Support Documentation
  url: https://docs.visotrust.com/
paths:
  /api/v1/relationships/{id}/detections:
    get:
      tags:
        - client-api-relationship-rest-resource
      summary: Get the detections for a relationship
      description: >
        Returns one page of the control validation detections (e.g. CUECs,
        exceptions, shared-responsibility-model statements) in this
        relationship's evidence, one entry per detection, in id order. Read
        every page by passing each response's nextAfterId as afterId until it is
        null; if riskAssessmentId changes between pages, the evidence changed,
        so start again. riskAssessmentId is null only before the relationship's
        first risk assessment, which is not the same as having no detections.
        Detections on artifacts listed in artifactsInProgress are left out until
        their validation completes, so a detection missing from one of those
        artifacts has not been resolved.
      operationId: getDetections
      parameters:
        - name: id
          in: path
          description: Relationship ID
          required: true
          schema:
            type: integer
            format: int64
        - name: detectionType
          in: query
          description: >-
            Only these detection types; repeatable. Defaults to every type
            except NORMAL, which only evidences that a control is in place.
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - NORMAL
                - SUBSERVICE
                - SHARED_RESPONSIBILITY_MODEL
                - EXCEPTION
                - CUEC
                - SUBPROCESSOR
            uniqueItems: true
          example: CUEC
        - name: controlDomainType
          in: query
          description: >-
            Only detections in these kinds of control domain; repeatable.
            Defaults to all.
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - SECURITY
                - PRIVACY
                - RESILIENCE
                - ARTIFICIAL_INTELLIGENCE
                - PRODUCT_SECURITY
                - GOVERNANCE_ETHICS
                - FOURTH_PARTY
                - SUSTAINABILITY_HUMAN_RIGHTS
                - SANCTIONS_TRADE
                - FINANCIAL_VIABILITY
                - CYBER_INSURANCE
                - SERVICE_LOCATIONS
                - SUBSERVICERS
                - SUPPLEMENTAL_QUESTIONNAIRE
                - UNASSIGNED
            uniqueItems: true
          example: SECURITY
        - name: assessmentId
          in: query
          description: >-
            A completed assessment of this relationship, to see what it saw, or
            the relationship's latest assessment while in progress. Any other
            assessment is a 400. Omit for the current picture.
          required: false
          schema:
            type: integer
            format: int64
        - name: includeQuestionnaireAnswers
          in: query
          description: >-
            Also return the answers behind supplemental questionnaire
            detections.
          required: false
          schema:
            type: boolean
            default: false
        - name: afterId
          in: query
          description: The previous page's nextAfterId. Omit for the first page.
          required: false
          schema:
            type: integer
            format: int64
            exclusiveMinimum: 0
        - name: size
          in: query
          description: Detections per page, 1 to 500.
          required: false
          schema:
            type: integer
            format: int32
            default: 100
            maximum: 500
            minimum: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DetectionsResponse'
components:
  schemas:
    DetectionsResponse:
      type: object
      properties:
        relationshipId:
          type: integer
          format: int64
        assessmentId:
          type: integer
          format: int64
        riskAssessmentId:
          type: integer
          format: int64
        riskAssessmentDate:
          type: string
          format: date-time
        artifactsInProgress:
          type: array
          items:
            $ref: '#/components/schemas/InProgressArtifact'
        size:
          type: integer
          format: int32
        afterId:
          type: integer
          format: int64
        nextAfterId:
          type: integer
          format: int64
        detections:
          type: array
          items:
            $ref: '#/components/schemas/Detection'
    InProgressArtifact:
      type: object
      properties:
        artifactId:
          type: integer
          format: int64
        artifactName:
          type: string
    Detection:
      type: object
      properties:
        id:
          type: integer
          format: int64
        detectionType:
          type: string
          enum:
            - NORMAL
            - SUBSERVICE
            - SHARED_RESPONSIBILITY_MODEL
            - EXCEPTION
            - CUEC
            - SUBPROCESSOR
        detectionStatus:
          type: string
          enum:
            - UNVALIDATED
            - NOT_APPLICABLE
            - PRESENT
            - DESCRIPTION_ONLY
            - NOT_PRESENT
        text:
          type: string
        controlIdsText:
          type: string
        updatedDate:
          type: string
          format: date-time
        controlDomainId:
          type: integer
          format: int64
        controlDomainName:
          type: string
        controlDomainType:
          type: string
          enum:
            - SECURITY
            - PRIVACY
            - RESILIENCE
            - ARTIFICIAL_INTELLIGENCE
            - PRODUCT_SECURITY
            - GOVERNANCE_ETHICS
            - FOURTH_PARTY
            - SUSTAINABILITY_HUMAN_RIGHTS
            - SANCTIONS_TRADE
            - FINANCIAL_VIABILITY
            - CYBER_INSURANCE
            - SERVICE_LOCATIONS
            - SUBSERVICERS
            - SUPPLEMENTAL_QUESTIONNAIRE
            - UNASSIGNED
        controlId:
          type: integer
          format: int64
        controlName:
          type: string
        questionnaireAnswer:
          $ref: '#/components/schemas/Answer'
        source:
          $ref: '#/components/schemas/Source'
    Answer:
      type: object
      properties:
        answer:
          type: string
        aiAnswer:
          type: string
        answered:
          type: boolean
        answerSource:
          type: string
          enum:
            - VISO_AI
            - HUMAN
            - UNABLE_TO_ANSWER
        answeredDate:
          type: string
          format: date-time
    Source:
      type: object
      properties:
        artifactId:
          type: integer
          format: int64
        artifactName:
          type: string
        viewerPage:
          type: string

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.