Qwiet Ai wiz API

The endpoints to manage the Wiz integration.

OpenAPI Specification

qwiet-ai-wiz-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  x-logo:
    url: https://docs.shiftleft.io/img/sl-logo.svg
  version: 4.0.0
  title: alerting wiz API
  description: 'The Qwiet API allows you to programmatically interact with Qwiet. You can manage users and their roles and get scan-related information, such as which applications were scanned and what vulnerabilities were identified by Qwiet as being present. You can also compare scans to see changes to your applications over time.


    # Authentication


    Use of the Qwiet API requires an access token, which is available via the [Qwiet UI](https://app.shiftleft.io/user/profile).

    '
servers:
- url: https://app.shiftleft.io/api/v4
tags:
- name: wiz
  x-displayName: Wiz
  description: 'The endpoints to manage the Wiz integration.

    '
paths:
  /orgs/{orgID}/integrations/wiz/creds:
    x-internal: false
    get:
      tags:
      - wiz
      summary: Get WIZ client credentials
      operationId: getWizCreds
      description: Get the client credentials i.e. authURL, apiURL.
      parameters:
      - $ref: '#/components/parameters/orgID'
      security:
      - BearerToken:
        - wiz_auth:write
      responses:
        '200':
          description: Success
        '404':
          description: Credentials Not Found
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      tags:
      - wiz
      summary: Store WIZ client credentials
      operationId: storeWizCreds
      description: Captures the wiz client credentials such as clientID, clientSecret, authentication url & API endpoint.
      parameters:
      - $ref: '#/components/parameters/orgID'
      security:
      - BearerToken:
        - wiz_auth:write
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WizStoreCredsRequest'
      responses:
        '200':
          description: Success
        '400':
          description: The provided wiz auth/api url is invalid
        '401':
          description: The provided wiz client credentials are invalid
        '403':
          description: The provided wiz credentials does not have sufficient permissions for enrichment
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /orgs/{orgID}/compounds/named/{compoundName}/integrations/wiz/enrollment:
    x-internal: false
    get:
      tags:
      - wiz
      summary: Get Wiz Compound enrollment status
      operationId: getWizCompoundEnrollmentStatus
      description: Get the compound enrollment status. Provides detail about enrolled enrichments. If no compound level configuration present, it fetches the organization level configurations.
      parameters:
      - $ref: '#/components/parameters/orgID'
      - $ref: '#/components/parameters/compoundName'
      security:
      - BearerToken:
        - project:read
        - wiz_enrollment:read
      responses:
        '200':
          description: Success
        '400':
          description: Enrollment not found
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      tags:
      - wiz
      summary: Update Wiz Compound enrollment
      operationId: updateWizCompoundEnrollment
      description: Updates compound enrollment. A compound can be enrolled for multiple supported enrichment [SAST/SCA]. Only the projects under enrolled compound are allowed for wiz integration after the successful project scan.
      parameters:
      - $ref: '#/components/parameters/orgID'
      - $ref: '#/components/parameters/compoundName'
      security:
      - BearerToken:
        - project:update
        - wiz_enrollment:write
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WizProjectEnrollmentRequest'
      responses:
        '200':
          description: Success
        '400':
          description: The provided wiz enrichment type is invalid
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
      - wiz
      summary: Remove Wiz Compound enrollment
      operationId: removeWizCompoundEnrollment
      description: Removes compoud enrollment. Removed compound will not be used for wiz enrichment.
      parameters:
      - $ref: '#/components/parameters/orgID'
      - $ref: '#/components/parameters/compoundName'
      security:
      - BearerToken:
        - project:update
        - wiz_enrollment:write
      responses:
        '200':
          description: Success
        '400':
          description: Enrollment not found
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /orgs/{orgID}/integrations/wiz/enrollment:
    x-internal: false
    get:
      tags:
      - wiz
      summary: Get Wiz Org enrollment status
      operationId: getWizOrgEnrollmentStatus
      description: Get the org enrollment status. Provides detail about enrolled enrichments.
      parameters:
      - $ref: '#/components/parameters/orgID'
      security:
      - BearerToken:
        - wiz_enrollment:read
      responses:
        '200':
          description: Success
        '400':
          description: Enrollment not found
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      tags:
      - wiz
      summary: Update Wiz Org enrollment
      operationId: updateWizOrgEnrollment
      description: Updates Wiz org enrollment. This configuration will be default for all compounds under the organization unless overridden at compound level.
      parameters:
      - $ref: '#/components/parameters/orgID'
      security:
      - BearerToken:
        - wiz_enrollment:write
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WizProjectEnrollmentRequest'
      responses:
        '200':
          description: Success
        '400':
          description: The provided wiz enrichment type is invalid
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    WizStoreCredsRequest:
      type: object
      properties:
        client_id:
          type: string
          description: service account client id
        client_secret:
          type: string
          description: service account client secret
        auth_url:
          type: string
          description: wiz authentication url (i.e. "https://auth.app.wiz.io/oauth/token")
        api_url:
          type: string
          description: wiz api endpoint (i.e. "https://api.us17.app.wiz.io/graphql")
    WizProjectEnrollmentRequest:
      type: object
      properties:
        enrolled_for:
          type: array
          description: enrichment type, possible values [SAST, SCA]
          items:
            type: string
        scope:
          type: string
          description: indicates the scope from which configuration are fetched. If no config found for requested scope, it fetches the config from higher level. possible values- compound / organization.
        is_enabled:
          type: boolean
          description: disables enrichment at the config level. i.e. If a compound level enrichment is disabled, the compound will be ignored during enrichment even if the org level enrichment is enabled. Granular level configuration takes the higher precedence.
    Error:
      type: object
      required:
      - ok
      - code
      - message
      properties:
        ok:
          type: boolean
          description: Whether the request was successful (true) or not (false)
        code:
          type: string
          description: The `enum` representing the error encountered
          example: INTERNAL_SERVER_ERROR
        message:
          type: string
          description: A message describing the error
          example: Internal Server Error
        validation_errors:
          type: array
          description: The validation errors the user should correct before re-submitting the request
          items:
            type: string
            description: A description of the validation error
  parameters:
    compoundName:
      name: compoundName
      in: path
      description: A compound's name
      required: true
      schema:
        type: string
    orgID:
      name: orgID
      in: path
      description: The org ID
      required: true
      schema:
        type: string
        format: uuid
  securitySchemes:
    BearerToken:
      description: 'Use of the Qwiet API requires an access token, which is available via the Qwiet Dashboard (either under [Account Settings](https://app.shiftleft.io/user/profile) or [Integration Tokens](https://app.shiftleft.io/integrations)) or via the `/tokens` endpoints. You can pass an access token to the API using the HTTP `Authorization` Request header as follows:\

        `Authorization: Bearer {access token}`

        '
      type: http
      scheme: bearer