Credentially Compliance-packages API

Profile's compliance packages management proxy endpoints

OpenAPI Specification

credentially-compliance-packages-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Credentially Public Compliance-packages API
  description: Public API Proxy with Rate Limiting and Audit
  version: 2.0.0
servers:
- url: https://app.credentially.io/gateway
  description: Generated server url
tags:
- name: Compliance-packages
  description: Profile's compliance packages management proxy endpoints
paths:
  /api/compliance-packages/{profileId}:
    get:
      tags:
      - Compliance-packages
      summary: Get all profile's compliance packages
      description: 'Fetches a list of all compliance requirements for all assigned packages for the profile.


        **Rate Limit:** `profile-compliance-packages` (25 req / 1s)'
      operationId: getProfileCompliancePackages
      parameters:
      - name: profileId
        in: path
        required: true
        schema:
          type: string
      - name: X-API-Version
        in: header
        schema:
          type: string
          default: 2.0.0
          enum:
          - 2.0.0
      responses:
        '200':
          description: Compliance packages retrieved successfully
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CompliancePackageDto'
        '404':
          description: Compliance packages or profile not found
        '500':
          description: Internal server error
        '429':
          description: Too many requests - the rate limit for this endpoint has been exceeded. Use the Retry-After header to determine when to retry.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                type: integer
                format: int32
                example: 1
      security:
      - bearer-key: []
    post:
      tags:
      - Compliance-packages
      summary: Assign compliance packages to profile
      description: 'Assign compliance packages (list of their ids) to profile.


        **Rate Limit:** `profile-compliance-packages` (25 req / 1s)'
      operationId: assign
      parameters:
      - name: profileId
        in: path
        required: true
        schema:
          type: string
      - name: X-API-Version
        in: header
        schema:
          type: string
          default: 2.0.0
          enum:
          - 2.0.0
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
        required: true
      responses:
        '200':
          description: Compliance packages were assigned successfully
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CompliancePackageDto'
        '404':
          description: Compliance packages or profile not found
        '500':
          description: Internal server error
        '429':
          description: Too many requests - the rate limit for this endpoint has been exceeded. Use the Retry-After header to determine when to retry.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                type: integer
                format: int32
                example: 1
      security:
      - bearer-key: []
  /api/compliance-packages:
    get:
      tags:
      - Compliance-packages
      summary: Get all organisation's compliance packages
      description: 'Fetches a list of all organisation''s compliance packages.


        **Rate Limit:** `organisation-compliance-packages` (25 req / 1s)'
      operationId: getOrganisationCompliancePackages
      parameters:
      - name: X-API-Version
        in: header
        schema:
          type: string
          default: 2.0.0
          enum:
          - 2.0.0
      responses:
        '200':
          description: Compliance packages retrieved successfully
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CompliancePackageBasicDto'
        '404':
          description: Compliance packages not found
        '500':
          description: Internal server error
        '429':
          description: Too many requests - the rate limit for this endpoint has been exceeded. Use the Retry-After header to determine when to retry.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                type: integer
                format: int32
                example: 1
      security:
      - bearer-key: []
components:
  schemas:
    EmployeeBasicDto:
      type: object
      properties:
        id:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        smallAvatarUrl:
          type: string
    EmployeeComplianceRequirementDto:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
          - DOCUMENT_TYPE
          - INTEGRATION
          - REFERENCE_FORM
          - TEXT_REQUIREMENT
        complianceStatus:
          type: string
          enum:
          - COMPLIANT
          - NOT_COMPLIANT
        complianceTags:
          type: array
          items:
            $ref: '#/components/schemas/ComplianceTagDto'
          uniqueItems: true
        documentType:
          $ref: '#/components/schemas/DocumentTypeBaseDto'
        referenceForm:
          $ref: '#/components/schemas/ReferenceFormBaseDto'
        requiredReferencesNumber:
          type: integer
          format: int32
        integration:
          $ref: '#/components/schemas/CheckIntegrationDto'
        textRequirement:
          $ref: '#/components/schemas/TextRequirementShortDto'
        approved:
          type: string
          format: date-time
        approvedBy:
          $ref: '#/components/schemas/EmployeeBasicDto'
    TextRequirementShortDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
    ReferenceFormBaseDto:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        businessRules:
          type: string
        phoneRequired:
          type: boolean
        prohibitPersonalEmails:
          type: boolean
        expired:
          type: boolean
    CheckIntegrationDto:
      type: object
      properties:
        name:
          type: string
        type:
          type: string
    DocumentTypeBaseDto:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
        description:
          type: string
        key:
          type: string
    ComplianceTagDto:
      type: object
      properties:
        key:
          type: string
        group:
          type: string
          enum:
          - COMPLIANCE_ERROR
          - COMPLIANCE_OK
    CompliancePackageBasicDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        roles:
          type: array
          items:
            $ref: '#/components/schemas/BaseRoleDto'
        totalRequirements:
          type: integer
          format: int32
        updated:
          type: string
          format: date-time
        compliantAssignmentCount:
          type: integer
          format: int64
        totalAssignmentCount:
          type: integer
          format: int64
        totalAllAssignmentCount:
          type: integer
          format: int64
        updateInProgress:
          type: boolean
    CompliancePackageDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        modified:
          type: boolean
        groups:
          type: array
          items:
            $ref: '#/components/schemas/EmployeeComplianceGroupDto'
    EmployeeComplianceGroupDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        requirements:
          type: array
          items:
            $ref: '#/components/schemas/EmployeeComplianceRequirementDto'
    BaseRoleDto:
      type: object
      properties:
        roleId:
          type: integer
          format: int64
        roleName:
          type: string
  securitySchemes:
    bearer-key:
      type: http
      scheme: bearer
      bearerFormat: JWT