Qwiet Ai scopes API

Scopes define the type of resource and the operation that you can perform with the access token you bear. For example, `scans:create` means that the bearer of the token with this scope can create scans via the API. For each endpoint, we indicate the scope required to perform an operation under **Authorizations**. We also offer helper endpoints that allow you to determine what the allowed scopes for your access token are in the context of a specific API resource. [![Run in Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/9829310-54d0d8f3-0cc0-42c3-8eee-2eb66e1ea835?action=collection%2Ffork&collection-url=entityId%3D9829310-54d0d8f3-0cc0-42c3-8eee-2eb66e1ea835%26entityType%3Dcollection%26workspaceId%3Da63f69cc-5c31-4f2b-8d28-b647f83b9e97)

OpenAPI Specification

qwiet-ai-scopes-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 scopes 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: scopes
  x-displayName: Scopes
  description: 'Scopes define the type of resource and the operation that you can perform with the access token you bear. For example, `scans:create` means that the bearer of the token with this scope can create scans via the API.


    For each endpoint, we indicate the scope required to perform an operation under **Authorizations**.


    We also offer helper endpoints that allow you to determine what the allowed scopes for your access token are in the context of a specific API resource.


    [![Run in Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/9829310-54d0d8f3-0cc0-42c3-8eee-2eb66e1ea835?action=collection%2Ffork&collection-url=entityId%3D9829310-54d0d8f3-0cc0-42c3-8eee-2eb66e1ea835%26entityType%3Dcollection%26workspaceId%3Da63f69cc-5c31-4f2b-8d28-b647f83b9e97)

    '
paths:
  /orgs/{orgID}/my_scopes:
    parameters:
    - $ref: '#/components/parameters/orgID'
    get:
      tags:
      - scopes
      summary: List user's org scopes
      operationId: ListMyOrgScopes
      description: 'Return a list of the scopes the user''s bearer token is allowed to perform in the context of an org.

        '
      security:
      - BearerToken: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/SuccessResponse'
                - type: object
                  required:
                  - response
                  properties:
                    response:
                      type: array
                      items:
                        $ref: '#/components/schemas/Scope'
              example:
                ok: true
                response:
                - teams:read
                - apps:list
                - github:install
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /orgs/{orgID}/apps/{appID}/my_scopes:
    parameters:
    - $ref: '#/components/parameters/orgID'
    - $ref: '#/components/parameters/appID'
    get:
      tags:
      - scopes
      summary: List user's app scopes
      operationId: ListMyAppScopes
      description: 'Return a list of scopes the user is allowed to perform in the context of an app.

        '
      security:
      - BearerToken: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/SuccessResponse'
                - type: object
                  required:
                  - response
                  properties:
                    response:
                      type: array
                      items:
                        $ref: '#/components/schemas/Scope'
              example:
                ok: true
                response:
                - scans:read
                - findings:list
                - findings:read
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /orgs/{orgID}/rbac/teams/{rbacTeamID}/my_scopes:
    parameters:
    - $ref: '#/components/parameters/orgID'
    - $ref: '#/components/parameters/rbacTeamID'
    get:
      tags:
      - scopes
      summary: List user's team scopes
      operationId: ListMyTeamScopes
      description: 'Return a list of scopes the user is allowed to perform in the context of their team.

        '
      security:
      - BearerToken: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/SuccessResponse'
                - type: object
                  required:
                  - response
                  properties:
                    response:
                      type: array
                      items:
                        $ref: '#/components/schemas/Scope'
              example:
                ok: true
                response:
                - roles:read
                - team:read
                - team:update
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    appID:
      name: appID
      in: path
      description: The app ID (e.g., `HelloQwiet`)
      required: true
      schema:
        type: string
    orgID:
      name: orgID
      in: path
      description: The org ID
      required: true
      schema:
        type: string
        format: uuid
    rbacTeamID:
      name: rbacTeamID
      in: path
      description: The team ID
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    Scope:
      type: string
      pattern: ^\w+:\w+$|^\w+:\*$
    SuccessResponse:
      type: object
      required:
      - ok
      properties:
        ok:
          type: boolean
          description: Whether the request was successful or not
    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
  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