openapi: 3.1.0
info:
  title: Tray APIs
  version: 1.0.0
  x-logo:
    url: ../images/tray-dev-logo.svg
    altText: Tray.ai logo

paths:
  /core/v1/connectors:
    get:
      operationId: get-connectors
      summary: List Connectors
      description:
        $ref: descriptions/trayapi/endpoints/connectors/getConnectors.md
      tags:
        - connectors
      parameters:
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
          example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
          description: >-
            You can either pass your <a target="_blank"
            href="https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/">master
            token</a> here or <a target="_blank"
            href="/developer/embedded-apis/users#graphql-create-user-token">user
            token</a> of an end user.
      responses:
        '200':
          description: >-
            OK - returns an `elements` array which contains the `name` and
            `version` <br />(required for [Get service
            environments](/developer/platform-apis/authentications#endpoint-get-service-environments) [Get
            connector
            operations](/developer/platform-apis/connectors#endpoint-get-connector-operations) and
            [Call connector](/developer/platform-apis/connectors#endpoint-call-connector))
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicConnectorList'
              examples:
                Connector List:
                  value:
                    elements:
                      - title: Slack
                        description: Slack connector
                        name: slack
                        service:
                          id: 3e21b055-1597-40ae-bcc2-72af0843b283
                          name: slack
                          version: 4
                        version: '9.0'
                      - name: twilio-output
                        description: Cloud communication platform for developers
                        service:
                          id: 55d1154c-4fd8-4c2c-ba22-041deabfcbfd
                          name: twilio
                          version: 1
                        version: '2.1'
                        title: Twilio
                      - name: shopify
                        service:
                          id: e0b2cbd7-657d-4917-8362-31d028968e0b
                          name: shopify
                          version: 4
                        title: Shopify
                        version: '4.1'
                        description: >-
                          Shopify gives you everything you need to build a
                          successful online business.
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: >-
            Unauthorized - Verify the token validity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /core/v1/connectors/{connector-name}/versions/{connector-version}/operations:
    get:
      operationId: get-connector-operations
      summary: List Connector Operations
      description:
        $ref: descriptions/trayapi/endpoints/connectors/getOperations.md
      tags:
        - connectors
      responses:
        '200':
          description: >-
            OK - Returns an `elements` array which contains the input schema for
            [Call connector](/developer/platform-apis/connectors#endpoint-call-connector)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicConnectorOperationList'
              examples:
                Slack Operations List:
                  value:
                    elements:
                      - name: send_message
                        inputSchema:
                          properties:
                            workspace_id:
                              type: string
                              description: >-
                                The workspace id that has the channel where the
                                reminder will be sent
                              title: Workspace
                              lookup:
                                message: list_workspaces_ddl
                                input: {}
                            description:
                              type: string
                              description: The description of the reminder
                              title: Description
                            time:
                              type: string
                              description: >-
                                When this reminder should happen. Some examples
                                that work: 1458678068, 20, in 5 minutes,
                                tomorrow, at 3:30pm, on Tuesday, or next week.
                              title: Time
                            channel_id:
                              type: string
                              title: Channel
                              description: >-
                                The ID of the channel where the reminder will be
                                sent
                              lookup:
                                message: list_channels_ddl
                                input:
                                  include_private_channels: false
                                  workspace_id: '{{{workspace_id}}}'
                            message:
                              type: string
                              description: The content of the reminder
                              title: Message
                          required:
                            - message
                            - time
                            - channel_id
                          type: object
                          additionalProperties: false
                          advanced:
                            - description
                          $schema: >-
                            https://api.tray.io/core/v1/connectors/operations/input-schema#
                        title: Send Message
                        description: Send a message to a user or channel.
                        outputSchema:
                          $schema: >-
                            https://api.tray.io/core/v1/connectors/operations/output-schema#
                          type: object
                          properties:
                            reminder_id:
                              type: string
                              description: The content of the reminder
                              title: Message
                        hasDynamicOutput: false
                        authScopes:
                          - chat:write:bot
                          - chat:write:user
                          - channels:write
                          - channels:read
                      - title: Send Reminder
                        hasDynamicOutput: false
                        outputSchema:
                          $schema: >-
                            https://api.tray.io/core/v1/connectors/operations/output-schema#
                          type: object
                          properties:
                            reminder_id:
                              type: string
                              description: The content of the reminder
                              title: Message
                        name: send_reminder
                        authScopes:
                          - reminder:send
                        description: Periodically sends a reminder to a channel
                        inputSchema:
                          additionalProperties: false
                          type: object
                          $schema: >-
                            https://api.tray.io/core/v1/connectors/operations/input-schema#
                          advanced:
                            - description
                          required:
                            - message
                            - time
                            - channel_id
                          properties:
                            workspace_id:
                              type: string
                              description: >-
                                The workspace id that has the channel where the
                                reminder will be sent
                              title: Workspace
                              lookup:
                                message: list_workspaces_ddl
                                input: {}
                            channel_id:
                              type: string
                              title: Channel
                              description: >-
                                The ID of the channel where the reminder will be
                                sent
                              lookup:
                                message: list_channels_ddl
                                input:
                                  include_private_channels: false
                                  workspace_id: '{{{workspace_id}}}'
                            time:
                              type: string
                              description: >-
                                When this reminder should happen. Some examples
                                that work: 1458678068, 20, in 5 minutes,
                                tomorrow, at 3:30pm, on Tuesday, or next week.
                              title: Time
                            description:
                              type: string
                              description: The description of the reminder
                              title: Description
                            message:
                              type: string
                              description: The content of the reminder
                              title: Message
                Google Sheets Operations List:
                  value:
                    elements:
                      - name: get_rows
                        description: Get data from a worksheet of a spreadsheet.
                        inputSchema:
                          advanced: []
                          required:
                            - spreadsheet_id
                            - worksheet_name
                            - number_of_rows
                          additionalProperties: false
                          properties:
                            worksheet_name:
                              type: string
                              description: The name of the sheet inside the spreadsheet
                              lookup:
                                operation: list_worksheets_ddl_return_name
                                input:
                                  spreadsheet_id: '{{spreadsheet_id}}'
                              title: Worksheet name
                            spreadsheet_id:
                              type: string
                              description: The ID of the desired spreadsheet
                              title: Spreadsheet ID
                            filter:
                              type: object
                              additionalProperties: false
                              description: >-
                                The conditions that the row should match. If
                                using a filter, all fields must be filled in.
                              advanced: []
                              title: Filter
                              properties:
                                column_heading:
                                  type: string
                                  description: The column heading.
                                  lookup:
                                    operation: list_worksheet_column_headers_ddl
                                    input:
                                      spreadsheet_id: '{{spreadsheet_id}}'
                                      worksheet_name: '{{worksheet_name}}'
                                  title: Column heading
                                operator:
                                  type: string
                                  enum:
                                    - Equal to
                                    - Not equal to
                                    - Greater than
                                    - Less than
                                    - Greater than or equal to
                                    - Less than or equal to
                                    - Text contains
                                    - Text doesn't contain
                                    - Empty cells
                                  description: >-
                                    How should the value in the column validate
                                    against the supplied value. Please check
                                    Tray docs for more information on the
                                    operators used.
                                  title: Operator
                                value:
                                  type:
                                    - string
                                    - number
                                    - boolean
                                  description: The condition value.
                                  title: Value
                                sort_direction:
                                  title: Sort direction
                                  enumLabels:
                                    - Ascending
                                    - Descending
                                  type: string
                                  description: >-
                                    How would you like results to be sorted?
                                    Ascending or Descending. This only works for
                                    numerical fields.
                                  enum:
                                    - ascending
                                    - descending
                              required: []
                            number_of_rows:
                              type: integer
                              default: 100
                              description: The number of the rows you wish to get.
                              title: Number of rows
                            format_response:
                              type: boolean
                              description: >-
                                Use the results of the 1st row as keys
                                ('headers') for values of subsequent rows'
                                results.
                              title: Format response
                          $schema: >-
                            https://api.tray.io/core/v1/connectors/operations/input-schema#
                          type: object
                        hasDynamicOutput: false
                        outputSchema:
                          $schema: >-
                            https://api.tray.io/core/v1/connectors/operations/output-schema#
                          type: object
                          properties:
                            results:
                              type: array
                              items:
                                type: array
                        authScopes: []
                        title: Get Rows
                      - title: Create Row
                        outputSchema:
                          $schema: >-
                            https://api.tray.io/core/v1/connectors/operations/output-schema#
                          type: object
                          properties:
                            spreadsheetId:
                              type: string
                            updates:
                              type: object
                              properties:
                                updatedColumns:
                                  type: number
                                updatedRows:
                                  type: number
                                spreadsheetId:
                                  type: string
                                updatedCells:
                                  type: number
                                updatedRange:
                                  type: string
                        name: create_row
                        inputSchema:
                          advanced: []
                          required:
                            - spreadsheet_id
                            - worksheet_name
                            - data
                            - value_input_option
                          additionalProperties: false
                          properties:
                            spreadsheet_id:
                              type: string
                              description: The ID of the desired spreadsheet
                              title: Spreadsheet ID
                            worksheet_name:
                              type: string
                              description: The name of the sheet inside the spreadsheet
                              lookup:
                                operation: list_worksheets_ddl_return_name
                                input:
                                  spreadsheet_id: '{{spreadsheet_id}}'
                              title: Worksheet name
                            data:
                              type: array
                              additionalItems: true
                              description: The row data to insert.
                              items:
                                title: Field
                                advanced: []
                                properties:
                                  column_heading:
                                    type: string
                                    description: The column heading.
                                    lookup:
                                      operation: list_worksheet_column_headers_ddl
                                      input:
                                        spreadsheet_id: '{{spreadsheet_id}}'
                                        worksheet_name: '{{worksheet_name}}'
                                    title: Column heading
                                  value:
                                    type:
                                      - string
                                      - number
                                      - boolean
                                    description: What value to insert into this cell.
                                    title: Value
                                additionalProperties: false
                                required:
                                  - column_heading
                                  - value
                                type: object
                                description: >-
                                  Select a column by its header, and assign a
                                  value to that cell of your new row.
                              title: Row data
                            value_input_option:
                              enum:
                                - RAW
                                - USER_ENTERED
                              default: RAW
                              title: Value input option
                              type: string
                              description: >-
                                Value Input Option determines how input data
                                should be interpreted. Selecting raw will result
                                in data not being parsed and stored as is,
                                whereas user_entered will result in values being
                                parsed as if the user had typed them directly
                                into a sheet.
                              enumLabels:
                                - Raw value
                                - User entered
                          type: object
                          $schema: >-
                            https://api.tray.io/core/v1/connectors/operations/input-schema#
                        hasDynamicOutput: false
                        authScopes: []
                        description: Add a row to a Google Sheet.
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: >-
            Unauthorized - Verify the token validity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
      parameters:
        - name: connector-name
          in: path
          required: true
          schema:
            type: string
          example: slack
          description: The name of the connector
        - name: connector-version
          in: path
          required: true
          schema:
            type: string
          example: '9.1'
          description: The version of the connector
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
          example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
          description: >-
            You can either pass your <a target="_blank"
            href="https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/">master
            token</a> here or <a target="_blank"
            href="/developer/embedded-apis/users#graphql-create-user-token">user
            token</a> of an end user.
  /core/v1/connectors/{connector-name}/versions/{connector-version}/call:
    post:
      operationId: call-connector
      summary: Call Connector
      description:
        $ref: descriptions/trayapi/endpoints/connectors/callConnector.md
      tags:
        - connectors
      parameters:
        - name: connector-name
          in: path
          required: true
          schema:
            type: string
          example: slack
          description: >-
            The name of the connector retrieved from [Get
            connectors](/developer/platform-apis/connectors#endpoint-get-connectors)
        - name: connector-version
          in: path
          required: true
          schema:
            type: string
          example: '9.1'
          description: >-
            The version of the connector retrieved from [Get
            connectors](/developer/platform-apis/connectors#endpoint-get-connectors)
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
          example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
          description: >-
            This must be a <a target="_blank"
            href="/developer/embedded-apis/users#graphql-create-user-token">user
            token</a> to call the connector on behalf of an end user. Note that authID must belong to the end user whose user token is being used.
            <br/>
            If <a target="_blank"
            href="https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/">master
            token</a> is used, you would essentially be calling the connector from your Tray account. Note that authID must belong to your account.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicConnectorCallPayload'
            examples:
              Slack Send Message:
                value:
                  operation: send_message
                  authId: fe6ce53d-b414-4f24-b0d5-16a0a75544a0
                  input:
                    channel: <aChannel>
                    text: aText
              Slack List Users DDL:
                value:
                  operation: list_users_and_conversations_ddl
                  authId: e9c0224b-0e07-46d8-9328-d9bcd44f94fa
                  input: {}
              Google Sheets Get Rows:
                value:
                  operation: get_rows
                  authId: 32d32790-3a82-4a22-ad9c-fb1ed40aac92
                  input:
                    spreadsheet_id: <aSpreadSheetId>
                    worksheet_name: <aWorksheetName>
                    number_of_rows: 100
        required: true
      responses:
        '200':
          description: >-
            OK - will return either `success` or `error` from the 3rd party.
            <br/>
            A `success` response will include all relevant data including
            pagination tokens etc. if relevant.
            <br/>
            An `error` response will include details of e.g. 429, 401, 404 from 3rd party (note that this
            is not currently in standardized format)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicConnectorCallResult'
              examples:
                Slack Send Message:
                  value:
                    outcome: success
                    output:
                      ok: true
                      channel: <aChannel>
                      ts: '1654555157.195399'
                      message:
                        username: <defaultUsername>
                        text: test
                        type: message
                        ts: '1654555157.195399'
                        app_id: <anAppId>
                        subtype: bot_message
                        bot_id: <aBotId>
                Slack List Users DDL:
                  value:
                    outcome: success
                    output:
                      result:
                        - value: <aUserId>
                          text: A User Name
                        - value: <anotherUserId>
                          text: Another User Name
                Google Sheets Get Rows:
                  value:
                    outcome: success
                    output:
                      results:
                        - row_number: 1
                          result:
                            - value1.1
                            - value1.2
                        - row_number: 2
                          result:
                            - value2.1
                            - value2.2
        '400':
          description: >-
            Invalid input - Use [Get connector
            operations](/developer/platform-apis/connectors#endpoint-get-connector-operations) to
            find correct schema.
            <br/>
            You can also use the [Operations explorer tool](/developer/developer-tools/operations-explorer) to quickly find the input schema.
            <br/>
            Finally, you can use the [Form builder app](/developer/developer-tools/connector-tester) to see input schema getting generated live as you fill the form.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: >-
            Unauthorized - Verify the token validity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: >-
            Not found - Indicates incorrect connector name, connector version, or
            auth id<br/>Use [Get
            Connectors](/developer/platform-apis/connectors#endpoint-get-connectors) to retrieve
            correct service details and <a target="_blank"
            href="/developer/embedded-apis/authentications#graphql-get-authentications">Get
            User Auths</a> to check auth exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /core/v1/authentications:
    post:
      operationId: create-user-authentication
      summary: Create Authentication
      description:
        $ref: descriptions/trayapi/endpoints/authentications/createAuthentication.md
      tags:
        - authentications
      parameters:
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
          example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
          description: >-
            This must be a <a target="_blank"
            href="/developer/embedded-apis/users#graphql-create-user-token">user
            token</a> in order to link the auth to the correct end user.
            <br/>
            If <a target="_blank"
            href="https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/">master
            token</a> is used, it creates the auth in your Tray admin account.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePublicUserAuthentication'
            example:
              name: Example authentication
              serviceEnvironmentId: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
              userData:
                region: us
              credentials:
                token: example_token
              scopes:
                - read
                - write
              onPremAgentGroupId: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
        required: true
      responses:
        '200':
          description: >-
            OK - Returns the authentication id required by the [Call
            connector](/developer/platform-apis/connectors#endpoint-call-connector) endpoint<br
            /><br />Note that Tray only checks input schema and does not
            currently validate auths so e.g. an invalid API key may still return
            a successful result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePublicUserAuthenticationResult'
              example:
                id: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
        '400':
          description: >-
            Invalid input - Use [Get service
            environments](/developer/platform-apis/authentications#endpoint-get-service-environments) to
            check the correct schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: >-
            Unauthorized - Verify the token validity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: >-
            Not found - Use [Get service
            environments](/developer/platform-apis/authentications#endpoint-get-service-environments) to
            check the `serviceEnvironmentId`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /core/v1/authentications/{authentication-id}:
    get:
      operationId: get-user-authentication
      summary: Get Authentication
      description:
        $ref: descriptions/trayapi/endpoints/authentications/getAuthenticationById.md
      tags:
        - authentications
      parameters:
        - name: authentication-id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 497f6eca-xxxx-xxxx-xxxx-53cbbbba6f08
          description: Unique ID of the authentication in Tray
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
          example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
          description: >-
            This can either be a your <a target="_blank"
            href="https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/">master
            token</a> or the <a target="_blank"
            href="/developer/embedded-apis/users#graphql-create-user-token">user token</a> of the end user who owns the auth.
      responses:
        '200':
          description: OK - Returns authentication details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUserAuthenticationResult'
              example:
                id: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
                name: Example authentication
                serviceEnvironmentId: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
                scopes:
                  - read
                  - write
                onPremAgentGroupId: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: >-
            Unauthorized - Verify the token validity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: >-
            Not found - No auth with matching id has been found or user does not
            have access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    put:
      operationId: update-user-authentication
      summary: Update Authentication
      description:
        $ref: descriptions/trayapi/endpoints/authentications/updateAuthenticationById.md
      tags:
        - authentications
      parameters:
        - name: authentication-id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 497f6eca-xxxx-xxxx-xxxx-53cbbbba6f08
          description: Unique ID of the authentication in Tray
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
          example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
          description: >-
            This can either be a your <a target="_blank"
            href="https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/">master
            token</a> or the <a target="_blank"
            href="/developer/embedded-apis/users#graphql-create-user-token">user token</a> of the end user who owns the auth.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePublicUserAuthenticationHttp'
            example:
              name: Example authentication
              userData:
                region: us
              credentials:
                token: example_token
              scopes:
                - read
                - write
              onPremAgentGroupId: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdatePublicUserAuthenticationResult'
              example:
                id: 123exxxx-xxxx-xxxx-xxxx-xxxxxx614174
                name: Example authentication
                serviceEnvironmentId: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
                scopes:
                  - read
                  - write
                onPremAgentGroupId: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    delete:
      operationId: delete-user-authentication
      summary: Delete Authentication
      description:
        $ref: descriptions/trayapi/endpoints/authentications/deleteAuthenticationById.md
      tags:
        - authentications
      parameters:
        - name: authentication-id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 497f6eca-xxxx-xxxx-xxxx-53cbbbba6f08
          description: Unique ID of the authentication in Tray
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
          example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
          description: >-
            This can either be a your <a target="_blank"
            href="https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/">master
            token</a> or the <a target="_blank"
            href="/developer/embedded-apis/users#graphql-create-user-token">user token</a> of the end user who owns the auth.
      responses:
        '204':
          description: No content - The authentication was deleted successfully
          content:
            text/html:
              example: ''
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: >-
            Unauthorized - Verify the token validity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: >-
            Not found - No auth with matching id has been found or user does not
            have access to delete
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /core/v1/authentications/{authentication-id}/full:
    get:
      operationId: get-full-authentication
      summary: Get Full Authentication
      description:
        $ref: descriptions/trayapi/endpoints/authentications/getFullAuthenticationById.md
      tags:
        - authentications
      parameters:
        - name: authentication-id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 497f6eca-xxxx-xxxx-xxxx-53cbbbba6f08
          description: Unique ID of the authentication in Tray
        - name: forceRefresh
          in: query
          required: false
          schema:
            type: boolean
          example: true
          description: >-
            If set to true, an attempt will be made to refresh the authentication before the credentials are returned.
            Enabling this will result in slower API calls, so it should only be used if the existing credentials have expired.
            For many authentications, Tray.ai will refresh them automatically.
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
          example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
          description: >-
            This should be the <a target="_blank"
            href="/developer/embedded-apis/users#graphql-create-user-token">user token</a> of the end user who owns the auth.
      responses:
        '200':
          description: OK - Returns full authentication details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetFullUserAuthenticationResult'
              example:
                id: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
                name: Example authentication
                serviceEnvironmentId: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
                userData:
                  userId: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
                credentials:
                  accessToken: XXXXX
                  tokenType: Bearer
                  expiresIn: 3600
                scopes:
                  - read
                  - write
                onPremAgentGroupId: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: >-
            Unauthorized - Verify the token validity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: >-
            Not found - No auth with matching id has been found or user does not
            have access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /core/v1/services/{service-name}/versions/{service-version}/environments:
    get:
      operationId: get-service-environments
      summary: List Service Environments
      description:
        $ref: descriptions/trayapi/endpoints/services/getServiceEnvironments.md
      tags:
        - authentications
      parameters:
        - name: service-name
          in: path
          required: true
          schema:
            type: string
          example: trello
          description: >-
            Name of the service as obtained from [Get
            connectors](/developer/platform-apis/connectors#endpoint-get-connectors)
        - name: service-version
          in: path
          required: true
          schema:
            type: integer
            format: int32
          example: 2
          description: >-
            Version of the service as obtained from [Get
            connectors](/developer/platform-apis/connectors#endpoint-get-connectors)<br />Note that
            this is the **single int 'service' version not the decimal
            'connector' version**
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
          example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
          description: >-
            You can either pass your <a target="_blank"
            href="https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/">master
            token</a> here or <a target="_blank"
            href="/developer/embedded-apis/users#graphql-create-user-token">user
            token</a> of an end user.
      responses:
        '200':
          description: >-
            OK - Returns an `elements` array which contains the input schema for
            [Create user
            authentication](/developer/platform-apis/authentications#endpoint-create-user-authentication)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicServiceEnvironmentList'
              examples:
                Slack v4 Service Enviroment:
                  value:
                    elements:
                      - id: 228axxxx-xxxx-xxxx-xxxx-xxxxxxa244c1
                        title: Production
                        authenticationType: oauth2
                        userDataSchema:
                          advanced: []
                          additionalProperties: false
                          type: object
                          properties:
                            signing_secret:
                              format: password
                              description: >-
                                Used in the slack trigger version 5.0 and later
                                to verify slash commands
                              type: string
                              title: Slash command signing secret
                        credentialsSchema: {}
                        scopes:
                          - scope: calls:read
                            description: >-
                              Allow apps to access information about ongoing and
                              past Calls
                          - scope: channels:history
                            description: Access user’s public channels
                          - scope: channels:read
                            description: Access information about user’s public channels
                          - scope: channels:write
                            description: Modify your public channels
                          - scope: chat:write:bot
                            description: Send messages as tray.io
                Netsuite v1 Service Enviroment:
                  value:
                    elements:
                      - id: b541xxxx-xxxx-xxxx-xxxx-xxxxxxb7434e
                        title: Production
                        authenticationType: token
                        userDataSchema: {}
                        credentialsSchema:
                          id: http://jsonschema.net
                          type: object
                          schema: http://json-schema.org/draft-03/schema
                          properties:
                            email:
                              id: http://jsonschema.net/key
                              title: Email
                              type: string
                              description: The user email of the account.
                            password:
                              id: http://jsonschema.net/password
                              title: Password
                              type: string
                              description: The user password of the account.
                              format: password
                            account:
                              title: Account
                              tytpe: string
                              description: The account ID.
                            role:
                              title: Role
                              type: integer
                              description: The role ID.
                          additionalProperties: false
                          required:
                            - email
                            - password
                            - account
                            - role
                        scopes: []
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: >-
            Unauthorized - Verify the token validity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: >-
            Not found - Service name or version not found or user does not have
            access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'

  /core/v1/triggers:
    get:
      operationId: get-triggers
      summary: List Triggers
      description:
        $ref: descriptions/trayapi/endpoints/triggers/getTriggers.md
      tags:
        - triggers
      responses:
        '200':
          description: >-
            OK - returns an `elements` array which contains the `name` and
            `version` <br />(required for [Get service
            environments](/developer/platform-apis/authentications#endpoint-get-service-environments) [Get
            trigger
            operations](/developer/platform-apis/triggers#endpoint-get-trigger-operations) and
            [Create subscription](/developer/platform-apis/triggers#endpoint-create-subscription))
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicConnectorEventsTriggerList'
              examples:
                trigger-list:
                  summary: Trigger List
                  value:
                    elements:
                      - name: slack-trigger
                        description: >-
                          Slack brings all your communication together in one place. It's real-time messaging, archiving and search for modern teams.
                        service:
                          id: 3e21b055-xxxx-xxxx-xxxx-72af0843b283
                          name: slack
                          version: 4
                        version: '7.0'
                        title: Slack trigger
                      - name: shopify-trigger
                        service:
                          id: e0b2cbd7-xxxx-xxxx-xxxx-31d028968e0b
                          name: shopify
                          version: 4
                        title: Shopify
                        version: '4.1'
                        description: >-
                          Shopify gives you everything you need to build a
                          successful online business.
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: >-
            Unauthorized - Verify the token validity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
      parameters:
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
          example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
          description: >-
            You can either pass your <a target="_blank"
            href="https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/">master
            token</a> here or <a target="_blank"
            href="/developer/embedded-apis/users#graphql-create-user-token">user
            token</a> of an end user.
  /core/v1/triggers/{trigger-name}/versions/{trigger-version}/operations:
    get:
      operationId: get-trigger-operations
      summary: List Trigger Operations
      description:
        $ref: descriptions/trayapi/endpoints/triggers/getOperations.md
      tags:
        - triggers
      parameters:
        - name: trigger-name
          in: path
          required: true
          schema:
            type: string
          example: slack
          description: The name of the trigger
        - name: trigger-version
          in: path
          required: true
          schema:
            type: string
          example: '9.1'
          description: The version of the trigger
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
          example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
          description: >-
            You can either pass your <a target="_blank"
            href="https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/">master
            token</a> here or <a target="_blank"
            href="/developer/embedded-apis/users#graphql-create-user-token">user
            token</a> of an end user.
      responses:
        '200':
          description: >-
            OK - Returns an `elements` array which contains the input schema for
            [Create subscription](/developer/platform-apis/triggers#endpoint-create-subscription)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicConnectorEventsTriggerOperationList'
              examples:
                slack-trigger-operations-list:
                  summary: Slack trigger operations list
                  value:
                    $ref: 'examples/triggers/getTriggerOperations.json'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: >-
            Unauthorized - Verify the token validity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /core/v1/subscriptions:
    post:
      operationId: create-subscription
      summary: Create Subscription
      description:
        $ref: descriptions/trayapi/endpoints/triggers/createSubscription.md
      tags:
        - triggers
      parameters:
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
          example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
          description: >-
            This must be a <a target="_blank"
            href="/developer/embedded-apis/users#graphql-create-user-token">user
            token</a> to call the connector on behalf of an end user. Note that authID must belong to the end user whose user token is being used.
            <br/>
            If <a target="_blank"
            href="https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/">master
            token</a> is used, you would essentially be calling the connector from your Tray account. Note that authID must belong to your account.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicCreateConnectorEventsSubscription'
            examples:
              typeform-create-subscription-request:
                summary: Typeform create webhook request
                value:
                  $ref: 'examples/triggers/typeformCreateSubscription.json'
      responses:
        '200':
          description: >-
            Ok - Returns the deatils of the Subscription object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePublicConnectorEventsSubscriptionResult'
              examples:
                create-subscription-success:
                  summary: Create Subscription (Success)
                  value:
                    $ref: 'examples/triggers/createSubscriptionSuccess.json'
                create-subscription-failure:
                  summary: Create Subscription (Failure)
                  value:
                    $ref: 'examples/triggers/createSubscriptionFailure.json'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: >-
            Unauthorized - Verify the token validity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    get:
      operationId: get-subscriptions
      summary: List Subscriptions
      description:
        $ref: descriptions/trayapi/endpoints/triggers/getSubscriptions.md
      tags:
        - triggers
      parameters:
        - name: first
          in: query
          required: false
          schema:
            type: integer
            format: int32
          example: 1
        - name: last
          in: query
          required: false
          schema:
            type: integer
            format: int32
          example: 10
        - name: cursor
          in: query
          required: false
          schema:
            type: string
          example: slack25052023
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
          example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
          description: >-
            You can either pass your <a target="_blank"
            href="https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/">master
            token</a> here or <a target="_blank"
            href="/developer/embedded-apis/users#graphql-create-user-token">user
            token</a> of an end user.
      responses:
        '200':
          description: >-
            OK - Returns an `elements` array of all the trigger subscriptions and pageInfo for pagination
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicConnectorEventsSubscriptionPage'
              examples:
                get-subcriptions:
                  summary: Get Subscriptions
                  value:
                    $ref: examples/triggers/getSubscriptions.json
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: >-
            Unauthorized - Verify the token validity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /core/v1/subscriptions/{subscription-id}:
    get:
      operationId: get-subscription-by-id
      summary: Get Subscription
      description:
        $ref: descriptions/trayapi/endpoints/triggers/getSubscriptionById.md
      tags:
        - triggers
      parameters:
        - name: subscription-id
          in: path
          schema:
            type: string
            format: uuid
          required: true
          example: 1a71daf1-XXXX-XXXX-XXXX-dbb4ab325a55
          description: ''
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
          example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
          description: >-
            You can either pass your <a target="_blank"
            href="https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/">master
            token</a> here or <a target="_blank"
            href="/developer/embedded-apis/users#graphql-create-user-token">user
            token</a> of an end user.
      responses:
        '200':
          description: >-
            OK - Returns a `Subscription` object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicConnectorEventsSubscription'
              examples:
                get-subcription-by-id:
                  summary: Get Subscription by Id
                  value:
                    $ref: examples/triggers/getSubscriptionById.json
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: >-
            Unauthorized - Verify the token validity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    delete:
      operationId: delete-connector-events-subscription
      summary: Delete Subscription
      description:
        $ref: descriptions/trayapi/endpoints/triggers/deleteSubscriptionById.md
      tags:
        - triggers
      parameters:
        - name: subscription-id
          in: path
          schema:
            type: string
            format: uuid
          required: true
          example: 1a71daf1-XXXX-XXXX-XXXX-dbb4ab325a55
          description: ''
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
          example: Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521
          description: >-
            You can either pass your <a target="_blank"
            href="https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/">master
            token</a> here or <a target="_blank"
            href="/developer/embedded-apis/users#graphql-create-user-token">user
            token</a> of an end user.
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '429':
          description: Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '204':
          description: No content - The subscription was deleted successfully
          content:
            text/html:
              example: ''

  /cdk/v1/deployments/connectors/{connector-name}/versions/{connector-version}/deploy-connector-from-source:
    post:
      operationId: create-deployment
      summary: Deploy Connector
      description:
        $ref: descriptions/trayapi/endpoints/deployments/createDeployment.md
      tags:
        - deployments
      parameters:
        - in: 'header'
          name: 'Authorization'
          required: true
          schema:
            type: 'string'
          description: 'The RBAC token. Follow this [page](https://docs.tray.ai/platform/enterprise-core/organisation-management/api-users-tokens) to know how to generate one.'
          example: 'Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521'
        - in: 'path'
          name: 'connector-name'
          required: true
          schema:
            type: 'string'
          description: 'The hypenated name of the connector being deployed.'
          example: 'my-connector'
        - in: 'path'
          name: 'connector-version'
          required: true
          schema:
            type: 'string'
          description: 'The version of the connector being deployed.'
          example: '1.0'
      responses:
        200:
          description: 'OK - Connector deployment request recieved, your connector deployment will now be in progress unless you recieved `repeatDeployment` with a value of `true` in your response, which indicates a skipped deployment because there is already a deployment in progress for this connector.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeployConnectorFromSourceResponse'
              example:
                id: '3c5exxx-xxxx-xxxx-xxxx-xxxxxxxx2387'
                deploymentStatus: 'Deploying'
                connectorName: 'my-connector'
                connectorVersion: '1.0'
        400:
          description: 'Invalid input'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'
        401:
          description: 'Unauthorized - Verify the token validity'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'
        403:
          description: 'Forbidden'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'
        404:
          description: 'Not found'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'
        429:
          description: 'Limit exceeded'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'
        500:
          description: 'Internal error'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'
  /cdk/v1/deployments/connectors/{connector-name}/versions/{connector-version}/{id}:
    get:
      operationId: get-deployment-status
      summary: Check status
      description:
        $ref: descriptions/trayapi/endpoints/deployments/getDeploymentStatus.md
      tags:
        - deployments
      parameters:
        - in: 'header'
          name: 'Authorization'
          required: true
          schema:
            type: 'string'
          description: 'The RBAC token. Follow this [page](https://docs.tray.ai/platform/enterprise-core/organisation-management/api-users-tokens) to know how to generate one.'
          example: 'Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521'
        - in: 'path'
          name: 'connector-name'
          required: true
          schema:
            type: 'string'
          description: 'The hypenated name of the connector being deployed.'
          example: 'my-connector'
        - in: 'path'
          name: 'connector-version'
          required: true
          schema:
            type: 'string'
          description: 'The version of the connector being deployed.'
          example: '1.0'
        - in: 'path'
          name: 'id'
          required: true
          schema:
            type: 'string'
          description: The deployment id given to you in the response from the original deployment request. <br /> You can also pass `latest` to retrive status of last deployment of the connector.
          examples:
            For status of a particular deployment:
              value: '3c5exxx-xxxx-xxxx-xxxx-xxxxxxxx2387'
            For status of the latest deployment:
              value: latest
      responses:
        200:
          description: 'OK - Returns the deployment status for the connector version.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetConnectorDeploymentResponse'
              example:
                id: '3c5exxx-xxxx-xxxx-xxxx-xxxxxxxx2387'
                deploymentStatus: 'Deploying'
                connectorName: 'my-connector'
                connectorVersion: '1.0'
        400:
          description: 'Invalid input'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'
        401:
          description: 'Unauthorized - Verify the token validity'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'
        403:
          description: 'Forbidden'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'
        404:
          description: 'Not found'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'
        429:
          description: 'Limit exceeded'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'
        500:
          description: 'Internal error'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'
  /cdk/v1/permissions/connectors/{connector-name}/versions/{connector-version}/share-with-emails:
    post:
      operationId: share-with-emails
      summary: Share with emails
      description:
        $ref: descriptions/trayapi/endpoints/permissions/shareWithEmails.md
      tags:
        - permissions
      parameters:
        - in: 'header'
          name: 'Authorization'
          required: true
          schema:
            type: 'string'
          description: 'The RBAC token. Follow this [page](https://docs.tray.ai/platform/enterprise-core/organisation-management/api-users-tokens) to know how to generate one.'
          example: 'Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521'
        - in: 'path'
          name: 'connector-name'
          required: true
          schema:
            type: 'string'
          description: 'The hypenated name of the connector being deployed.'
          example: 'my-connector'
        - in: 'path'
          name: 'connector-version'
          required: true
          schema:
            type: 'string'
          description: 'The version of the connector being deployed.'
          example: '1.0'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShareWithEmailsRequest'
            example:
              emails: ['john.doe@domain.com', 'jane.doe@domain.com']
      responses:
        200:
          description: 'OK - Connector version was succesfully shared with users.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShareWithEmailsResponse'
              example:
                message: '2 permissions added'
        400:
          description: 'Invalid input'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'
        401:
          description: 'Unauthorized - Verify the token validity'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'
        403:
          description: 'Forbidden'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'
        404:
          description: 'Not found'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'
        429:
          description: 'Limit exceeded'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'
        500:
          description: 'Internal error'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailed'

  /core/v1/workspaces:
    get:
      operationId: get-workspaces
      summary: List Workspaces
      description: Lists all workspaces the token has access to i.e. will return all workspaces from the Tray Organization if the Org scope token is used, a single workspace for the workspace scoped token.
      tags:
        - workspaces
      parameters:
        - name: 'Authorization'
          in: 'header'
          required: true
          schema:
            type: 'string'
          description: 'The authorization token.'
          example: 'Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521'
        - name: cursor
          in: query
          description: The cursor token for page starting point
          required: false
          schema:
            type: string
        - name: first
          in: query
          description:
            The page size, in a forwards direction, with a maximum of 100.
            Default direction if last not defined
          required: false
          schema:
            type: integer
            format: int32
            exclusiveMinimum: 0
        - name: last
          in: query
          description: ''
          required: false
          schema:
            type: integer
            format: int32
            exclusiveMinimum: 0
        - name: type
          in: query
          description: Filter by workspace type
          required: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/WorkspaceType'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalApiDataPage_ENT'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /core/v1/workspaces/{workspaceId}:
    get:
      operationId: get-workspace-by-id
      summary: Get Workspace
      description: Gets a workspace by Id.
      tags:
        - workspaces
      parameters:
        - name: 'Authorization'
          in: 'header'
          required: true
          schema:
            type: 'string'
          description: 'The authorization token. You must use either an org scoped token or a token that has viewer or higher permission in the workspace you are trying to access.'
          example: 'Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521'
        - name: workspaceId
          in: path
          description: The id of a workspace
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9-]+$
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceExternalApiModel'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /core/v1/workspaces/{workspaceId}/users:
    get:
      operationId: list-users-in-workspace
      summary: List Users from a Workspace
      description: List all users in the workspace
      tags:
        - workspaces
      parameters:
        - name: 'Authorization'
          in: 'header'
          required: true
          schema:
            type: 'string'
          description: 'The authorization token. You must use either an org scoped token or a token that has viewer or higher permission in the given workspace.'
          example: 'Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521'
        - name: cursor
          in: query
          description: The cursor token for page starting point
          required: false
          schema:
            type: string
        - name: first
          in: query
          description:
            The page size, in a forwards direction, with a maximum of 100.
            Default direction if last not defined
          required: false
          schema:
            type: integer
            format: int32
            exclusiveMinimum: 0
        - name: last
          in: query
          description: ''
          required: false
          schema:
            type: integer
            format: int32
            exclusiveMinimum: 0
        - name: workspaceId
          in: path
          description: The id of a workspace to list users
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9-]+$
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalApiDataPage_ENT'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    post:
      operationId: add-user-to-workspace
      summary: Add User to Workspace
      description: Adds a user to a workspace
      tags:
        - workspaces
      parameters:
        - name: 'Authorization'
          in: 'header'
          required: true
          schema:
            type: 'string'
          description: 'The authorization token. You must use either an org admin/owner token or a token that has Admin or higher permission in the workspace you are trying to access.'
          example: 'Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521'
        - name: workspaceId
          in: path
          description: The id of a workspace to add a user to
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9-]+$
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddUserToWorkspaceExternalApiBody'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /core/v1/workspaces/{workspaceId}/users/{userId}:
    get:
      operationId: get-workspace-user-by-id
      summary: Get Workspace User by id
      description: Get workspace user by id
      tags:
        - workspaces
      parameters:
        - name: workspaceId
          in: path
          description: The id of a workspace
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9-]+$
        - name: userId
          in: path
          description: The id of the user
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9-]+$
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceUserExternalApiModel'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    put:
      operationId: update-user-workspace-role
      summary: Update User's Workspace Role
      description: Updates the role of a user in a workspace
      tags:
        - workspaces
      parameters:
        - name: 'Authorization'
          in: 'header'
          required: true
          schema:
            type: 'string'
          description: 'The authorization token. You must use either an org admin/owner token or a token that has admin or higher permission in the given workspace.'
          example: 'Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521'
        - name: workspaceId
          in: path
          description: The id of the workspace to update the users role
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9-]+$
        - name: userId
          in: path
          description: The id of a user to update the role for
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9-]+$
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserWorkspaceRoleExternalEndpointBody'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    delete:
      operationId: remove-user-from-a-Workspace
      summary: Remove User from Workspace
      description: Removes a user from a workspace
      tags:
        - workspaces
      parameters:
        - name: 'Authorization'
          in: 'header'
          required: true
          schema:
            type: 'string'
          description: 'The authorization token. You must use either an org admin/owner token or a token that has admin or higher permission in the given workspace.'
          example: 'Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521'
        - name: workspaceId
          in: path
          description: The id of a workspace to add a user to
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9-]+$
        - name: userId
          in: path
          description: The id of a user to remove from a workspace
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9-]+$
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /core/v1/workspaces/{workspaceId}/roles:
    get:
      operationId: get-workspace-roles
      summary: List Workspace Roles
      description: Get Workspace Roles
      tags:
        - workspaces
      parameters:
        - name: 'Authorization'
          in: 'header'
          required: true
          schema:
            type: 'string'
          description: 'The authorization token. You must use either an org admin/owner token or a token that has admin or higher permission in the given workspace.'
          example: 'Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521'
        - name: cursor
          in: query
          description: The cursor token for page starting point
          required: false
          schema:
            type: string
        - name: first
          in: query
          description:
            The page size, in a forwards direction, with a maximum of 100.
            Default direction if last not defined
          required: false
          schema:
            type: integer
            format: int32
            exclusiveMinimum: 0
        - name: last
          in: query
          description: ''
          required: false
          schema:
            type: integer
            format: int32
            exclusiveMinimum: 0
        - name: workspaceId
          in: path
          description: The id of a workspace to list roles for
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9-]+$
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalApiDataPage_ENT'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /core/v1/invites:
    post:
      operationId: invite-user-to-organization
      summary: Invite User to Organization Workspace
      description: Invites a user to the organization. <br /><br />This will send an email to the user with a link to create an account.<br /><br />If your organization has SSO configured and you do not wish an invitation to be sent, make use of the [Create User](/developer/platform-apis/users#endpoint-create-user) endpoint.<br /><br />This endpoint is **rate limited to 100 user invites per day per organization**.
      tags:
        - users
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteUserExternalEndpointBody'
        required: true
      responses:
        '200':
          description: 'Indicates invite has been sent successfully'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InviteCreatedExternalApiModel'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'

  /core/v1/roles:
    get:
      operationId: list-organization-roles
      summary: List Organization Roles
      description: List all roles in the organization. <br />When managing APIs you would want to take full control of how your endpoints are accessed. <br />Role-based policies allow you to build clear and consistent access control.<br />Read [this page](https://tray.ai/documentation/tray-uac/api-management/roles-policies-clients-tokens/) for details on creating roles and issuing tokens.
      tags:
        - users
      parameters:
        - name: 'Authorization'
          in: 'header'
          required: true
          schema:
            type: 'string'
          description: 'The authorization token. You must use either an org admin/owner or a [master token](https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/#master-token)'
          example: 'Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521'
        - name: cursor
          in: query
          description: The cursor token for page starting point
          required: false
          schema:
            type: string
        - name: first
          in: query
          description:
            The page size, in a forwards direction, with a maximum of 1000.
            Default direction if last not defined
          required: false
          schema:
            type: integer
            format: int32
            exclusiveMinimum: 0
        - name: last
          in: query
          description: ''
          required: false
          schema:
            type: integer
            format: int32
            exclusiveMinimum: 0
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalApiDataPage_ENT'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'

  /core/v1/users:
    get:
      operationId: list-users-in-organization
      summary: List Users
      description: List all users in the organization
      tags:
        - users
      parameters:
        - name: 'Authorization'
          in: 'header'
          required: true
          schema:
            type: 'string'
          description: 'The authorization token. You must use either an org admin token OR a [master token](https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/#master-token)'
          example: 'Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521'
        - name: cursor
          in: query
          description: The cursor token for page starting point
          required: false
          schema:
            type: string
        - name: first
          in: query
          description:
            The page size, in a forwards direction, with a maximum of 1000.
            Default direction if last not defined
          required: false
          schema:
            type: integer
            format: int32
            exclusiveMinimum: 0
        - name: last
          in: query
          description: ''
          required: false
          schema:
            type: integer
            format: int32
            exclusiveMinimum: 0
        - name: email
          in: query
          description: Filter by email address
          required: false
          schema:
            type: string
            pattern: ^[a-zA-Z0-9\.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalApiDataPage_ENT'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    post:
      operationId: create-user
      summary: Create User
      description: Creates a user in the organization.<br /><br />This endpoint should be used when you have SSO configured as it will not send an invitation to set up an account.<br /><br />If an invitation is required, make use of the [Invite user to organization workspace](/developer/platform-apis/users#endpoint-invite-user-to-organization) endpoint.
      tags:
        - users
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUserEndpointBody'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserExternalApiModel'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /core/v1/users/{userId}:
    get:
      operationId: get-user-by-id
      summary: Get User
      description: Get user by id
      tags:
        - users
      parameters:
        - name: 'Authorization'
          in: 'header'
          required: true
          schema:
            type: 'string'
          description: 'The authorization token. You must use either an org level token (viewer or higher) OR a [master token](https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/#master-token)'
          example: 'Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521'
        - name: userId
          in: path
          description: The id of an user
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9-]+$
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserExternalApiModel'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    delete:
      operationId: delete-user-by-id
      summary: Delete User
      description: Delete user by id
      tags:
        - users
      parameters:
        - name: 'Authorization'
          in: 'header'
          required: true
          schema:
            type: 'string'
          description: 'The authorization token. You must use either an org admin token OR a [master token](https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/#master-token)'
          example: 'Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521'
        - name: userId
          in: path
          description: The id of an user
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9-]+$
      responses:
        '204':
          description: ''
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /core/v1/users/{userId}/roles:
    put:
      operationId: update-user-organization-role
      summary: Update User Role
      description: Updates the role of a user in the organization
      tags:
        - users
      parameters:
        - name: 'Authorization'
          in: 'header'
          required: true
          schema:
            type: 'string'
          description: 'The authorization token. You must use either an org admin token OR a [master token](https://tray.ai/documentation/tray-uac/embedded-integrations/setup-notes/#master-token)'
          example: 'Bearer 3fd74d349xxxxxxxxxxxxxxxxxxxxxxxxd90df521'
        - name: userId
          in: path
          description: The id of a user to update the role for
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9-]+$
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserOrganizationRoleExternalEndpointBody'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'

  /core/v1/workspaces/{workspace-id}/on-prem-agent-groups:
    get:
      operationId: getCoreV1WorkspacesWorkspace-idOn-prem-agent-groups
      summary: Retrieve Agent Groups
      description: Returns paginated list of agent groups from a workspace using `workspace-id`
      tags:
        - agent-groups
      parameters:
        - name: workspace-id
          in: path
          required: true
          schema:
            type: string
        - name: first
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: last
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: cursor
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasePage_PublicOnPremAgentGroupHttpResponse'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '408':
          description: Request Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Timeout'
        '409':
          description: Concurrency Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConcurrencyConflict'
        '413':
          description: Content Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentTooLarge'
        '429':
          description: Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    post:
      operationId: postCoreV1WorkspacesWorkspace-idOn-prem-agent-groups
      summary: Create Agent Group
      description: Creates an agent group in the specified workspace
      tags:
        - agent-groups
      parameters:
        - name: workspace-id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewPublicCreateOnPremAgentGroupHttpRequest'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicOnPremAgentGroupHttpResponse'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '408':
          description: Request Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Timeout'
        '409':
          description: Concurrency Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConcurrencyConflict'
        '413':
          description: Content Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentTooLarge'
        '429':
          description: Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /core/v1/workspaces/{workspace-id}/on-prem-agent-groups/{agent-group-id}:
    delete:
      operationId: deleteCoreV1WorkspacesWorkspace-idOn-prem-agent-groupsAgent-group-id
      summary: Delete Agent Group
      description: Deletes an agent group using `agent-group-id` and `workspace-id`
      tags:
        - agent-groups
      parameters:
        - name: workspace-id
          in: path
          required: true
          schema:
            type: string
        - name: agent-group-id
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: ''
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '408':
          description: Request Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Timeout'
        '409':
          description: Concurrency Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConcurrencyConflict'
        '413':
          description: Content Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentTooLarge'
        '429':
          description: Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /core/v1/workspaces/{workspace-id}/on-prem-agent-groups/{agent-group-id}/agents:
    get:
      operationId: getCoreV1WorkspacesWorkspace-idOn-prem-agent-groupsAgent-group-idAgents
      summary: List Agents
      description: Returns paginated list of agent instances from an agent group using `agent-group-id` and `workspace-id`
      tags:
        - agent-instances
      parameters:
        - name: workspace-id
          in: path
          required: true
          schema:
            type: string
        - name: agent-group-id
          in: path
          required: true
          schema:
            type: string
        - name: first
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: last
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: cursor
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasePage_PublicOnPremAgentInstanceHttpResponse'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '408':
          description: Request Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Timeout'
        '409':
          description: Concurrency Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConcurrencyConflict'
        '413':
          description: Content Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentTooLarge'
        '429':
          description: Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    post:
      operationId: postCoreV1WorkspacesWorkspace-idOn-prem-agent-groupsAgent-group-idAgents
      summary: Create Agent
      description: Adds an agent instance under an agent group using `agent-group-id` and `workspace-id`
      tags:
        - agent-instances
      parameters:
        - name: workspace-id
          in: path
          required: true
          schema:
            type: string
        - name: agent-group-id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicCreateOnPremAgentInstanceHttpRequest'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCreateOnPremAgentInstanceHttpResponse'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '408':
          description: Request Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Timeout'
        '409':
          description: Concurrency Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConcurrencyConflict'
        '413':
          description: Content Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentTooLarge'
        '429':
          description: Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /core/v1/workspaces/{workspace-id}/on-prem-agent-groups/{agent-group-id}/agents/{agent-id}:
    get:
      operationId: getCoreV1WorkspacesWorkspace-idOn-prem-agent-groupsAgent-group-idAgentsAgent-id
      summary: Retrieve Agent
      description: Get details of an agent instance using `agent-id`
      tags:
        - agent-instances
      parameters:
        - name: workspace-id
          in: path
          required: true
          schema:
            type: string
        - name: agent-group-id
          in: path
          required: true
          schema:
            type: string
        - name: agent-id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicOnPremAgentInstanceHttpResponse'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '408':
          description: Request Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Timeout'
        '409':
          description: Concurrency Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConcurrencyConflict'
        '413':
          description: Content Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentTooLarge'
        '429':
          description: Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    patch:
      operationId: patchCoreV1WorkspacesWorkspace-idOn-prem-agent-groupsAgent-group-idAgentsAgent-id
      summary: Update Agent
      description: Updates an agent instance using `agent-id`
      tags:
        - agent-instances
      parameters:
        - name: workspace-id
          in: path
          required: true
          schema:
            type: string
        - name: agent-group-id
          in: path
          required: true
          schema:
            type: string
        - name: agent-id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicUpdateOnPremAgentInstanceHttpRequest'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicOnPremAgentInstanceHttpResponse'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '408':
          description: Request Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Timeout'
        '409':
          description: Concurrency Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConcurrencyConflict'
        '413':
          description: Content Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentTooLarge'
        '429':
          description: Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    delete:
      operationId: deleteCoreV1WorkspacesWorkspace-idOn-prem-agent-groupsAgent-group-idAgentsAgent-id
      summary: Delete Agent
      description: Delete an agent instance using `agent-id`
      tags:
        - agent-instances
      parameters:
        - name: workspace-id
          in: path
          required: true
          schema:
            type: string
        - name: agent-group-id
          in: path
          required: true
          schema:
            type: string
        - name: agent-id
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: ''
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '408':
          description: Request Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Timeout'
        '409':
          description: Concurrency Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConcurrencyConflict'
        '413':
          description: Content Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentTooLarge'
        '429':
          description: Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitExceeded'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  ##################################################################################################################
  # SDLC PATHS START ***********************************************************************************************
  ##################################################################################################################
  /core/v1/projects/{projectId}/versions/{versionNumber}:
    post:
      operationId: PublicApiProjectController.createProjectVersion
      tags:
        - projects
      summary: Create project version
      description: Save a specific state of the project as version so that it can be later retrieved for release (or rollback)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProjectVersionInput'
      responses:
        '201':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectVersionResponse'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
      parameters:
        - in: path
          name: projectId
          required: true
          description: ID of the project
          schema:
            type: string
            format: uuid
        - in: path
          name: versionNumber
          description: Version number of the project version
          required: true
          schema:
            type: string
            format: string
  /core/v1/projects/{projectId}/versions:
    get:
      operationId: listProjectVersions
      tags:
        - projects
      summary: List project versions
      description: Retrieve a list of saved versions of the project
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageResponse-ProjectVersionResponse'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
      parameters:
        - in: path
          name: projectId
          description: ID of the project
          required: true
          schema:
            type: string
            format: uuid
        - in: query
          name: first
          description:
            The page size, in a forwards direction, with a maximum of 1000.
            Default direction if last not defined
          required: false
          schema:
            type: integer
            format: int32
        - in: query
          name: last
          description: The page size, in a backwards direction, with a maximum of 1000.
          required: false
          schema:
            type: integer
            format: int32
        - in: query
          name: cursor
          description: The cursor token for page starting point
          required: false
          schema:
            type: string
  /core/v1/projects/{projectId}/versions/{versionNumber}/export:
    get:
      operationId: exportAProjectVersion
      tags:
        - projects
      summary: Export project from version
      description: Retrieve a specific project version JSON
      responses:
        '200':
          description: Json document containing project export
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
      parameters:
        - in: path
          name: projectId
          description: ID of the project
          required: true
          schema:
            type: string
            format: uuid
        - in: path
          name: versionNumber
          description: Version number of the project version
          required: true
          schema:
            type: string
            format: string
  /core/v1/projects/{projectId}/imports/requirements:
    post:
      operationId: PublicApiProjectController.getProjectImportRequirements
      tags:
        - projects
      summary: Get import requirements
      description: Returns information describing required authentications and config mappings needed to complete an import
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/importexport.PrepareProjectImportInput'
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/importexport.PrepareProjectImportResponse'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
              examples:
                $ref: examples/projects/project_import_400_error_examples.yaml
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
      parameters:
        - in: path
          name: projectId
          description: ID of the destination project
          required: true
          schema:
            type: string
            format: uuid
  /core/v1/projects/{projectId}/imports/previews:
    post:
      operationId: PublicApiProjectController.previewProjectImport
      tags:
        - projects
      summary: Get import preview
      description: Returns potential changes and impacts on the project and the solution (if applicable) if the import is applied.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/importexport.ProjectImportInput'
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/importexport.ProjectImportPreviewResponse'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
              examples:
                $ref: examples/projects/project_import_400_error_examples.yaml
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
      parameters:
        - in: path
          name: projectId
          description: ID of the destination project for which the import preview should be returned
          required: true
          schema:
            type: string
            format: uuid
  /core/v1/projects/{projectId}/imports:
    post:
      operationId: PublicApiProjectController.importProject
      tags:
        - projects
      summary: Import project
      description: Import project with desired dependencies mappings (config, authentication, services, connectors can be specified)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/importexport.ProjectImportInput'
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/importexport.ProjectImportResponse'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
              examples:
                $ref: examples/projects/project_import_400_error_examples.yaml
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
      parameters:
        - in: path
          name: projectId
          description: ID of the destination project
          required: true
          schema:
            type: string
            format: uuid
  /core/v1/solutions/{solutionId}/releases/previews:
    post:
      operationId: PublicApiSolutionController.previewSolutionRelease
      tags:
        - solutions
      summary: Get publish preview
      description: Check impact on destination solution ahead of publishing
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/solution.release.PublishSolutionImpactView'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
      parameters:
        - in: path
          name: solutionId
          description: ID of the solution for which the release is meant to be previewed
          required: true
          schema:
            type: string
            format: uuid
  /core/v1/solutions/{solutionId}/releases:
    post:
      operationId: PublicApiSolutionController.createSolutionRelease
      tags:
        - solutions
      summary: Publish solution
      description: Publishes the draft solution. If no breaking changes are detected, solution instances are automatically upgraded to the published version. Otherwise, a manual upgrade is required.
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/solution.release.PublishSolutionImpactView'
        '400':
          description: Invalid Input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidInput'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '429':
          description: Limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
      parameters:
        - in: path
          name: solutionId
          description: ID of the solution to publish
          required: true
          schema:
            type: string
            format: uuid
################################################################################################################
# SDLC PATHS END ***********************************************************************************************
################################################################################################################
components:
  schemas:
    ResourceNotFound:
      title: ResourceNotFound
      type: object
      required:
        - message
      properties:
        message:
          type: string
        code:
          type: string
    Unauthorized:
      title: Unauthorized
      type: object
      required:
        - message
      properties:
        message:
          type: string
        code:
          type: string
    TooManyRequestsError:
      title: TooManyRequestsError
      type: object
      required:
        - message
      properties:
        message:
          type: string
    Forbidden:
      title: Forbidden
      type: object
      required:
        - message
      properties:
        message:
          type: string
        code:
          type: string
    InternalError:
      title: InternalError
      type: object
      required:
        - message
      properties:
        message:
          type: string
        code:
          type: string
    InvalidInput:
      title: InvalidInput
      type: object
      required:
        - message
      properties:
        message:
          type: string
        code:
          type: string
    LimitExceeded:
      title: LimitExceeded
      type: object
      required:
        - message
      properties:
        message:
          type: string
        code:
          type: string
    ConcurrencyConflict:
      title: ConcurrencyConflict
      type: object
      required:
        - message
      properties:
        message:
          type: string
        code:
          type: string
    ContentTooLarge:
      title: ContentTooLarge
      type: object
      required:
        - message
      properties:
        message:
          type: string
        code:
          type: string
    Timeout:
      title: Timeout
      type: object
      required:
        - message
      properties:
        message:
          type: string
        code:
          type: string

    AuthenticationType:
      title: AuthenticationType
      type: string
      enum:
        - token
        - oauth1
        - oauth2
        - oauth2password
        - oauth2client_credentials
        - builtin
    CreatePublicUserAuthentication:
      title: CreatePublicUserAuthentication
      type: object
      required:
        - name
        - serviceEnvironmentId
      properties:
        name:
          type: string
          description: Name for the auth which identifies End User, service, test, dev etc.
        serviceEnvironmentId:
          type: string
          description: >-
            Obtained using the [Get
            service environments](/developer/platform-apis/authentications#endpoint-get-service-environments) endpoint
        userData:
          type: object
          description: >-
            Data regarding base url, company id, table id etc.<br />Input schema
            obtained using the [Get
            service environments](/developer/platform-apis/authentications#endpoint-get-service-environments) endpoint
          additionalProperties:
            oneOf:
              - type: array
                items:
                  type: object
              - type: boolean
              - type: integer
              - type: object
                additionalProperties:
                  type: object
              - type: string
        credentials:
          type: object
          additionalProperties:
            oneOf:
              - type: array
                items:
                  type: object
              - type: boolean
              - type: integer
              - type: object
                additionalProperties:
                  type: object
              - type: string
          description: >-
            Auth data (token, secret etc.) required to complete the auth<br
            />Input schema obtained using the [Get
            service environments](/developer/platform-apis/authentications#endpoint-get-service-environments) endpoint
        scopes:
          type: array
          items:
            type: string
          uniqueItems: true
          description: >-
            Example: `"scopes": ["chat:write", "channels:read"]` or `"scopes":
            ["chatter_api,", "openid"]`</br>List of the scopes required for the
            auth to function<br />Available scopes can be retrieved with [Get
            service
            environments](/developer/platform-apis/authentications#endpoint-get-service-environments)
        onPremAgentGroupId:
          type: string
          format: uuid
          example: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
    CreatePublicUserAuthenticationResult:
      title: CreatePublicUserAuthenticationResult
      type: object
      required:
        - id
      properties:
        id:
          type: string
          format: uuid
          description: 'Authentication Id in Tray for the newly created auth'
    GetUserAuthenticationResult:
      title: GetUserAuthenticationResult
      type: object
      required:
        - id
        - name
        - serviceEnvironmentId
      properties:
        id:
          type: string
          format: uuid
          description: >-
            Unique id of the authentication - required by the [Call
            connector](/developer/platform-apis/connectors#endpoint-call-connector) endpoint
        name:
          type: string
          description: Name for the auth which identifies End User, service, test, dev etc.
        serviceEnvironmentId:
          type: string
          description: >-
            Identifies the service and environment the auth is for (e.g. Tray
            Slack OAuth app or your own Custom Slack OAuth app)
        scopes:
          type: array
          items:
            type: string
          uniqueItems: true
          description: >-
            The permission scopes which describe the level of access this auth
            has to the service
        onPremAgentGroupId:
          description: The on-prem agent group this authentication is associated with, if any.
          type: string
          format: uuid
          example: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
    GetFullUserAuthenticationResult:
      title: GetFullUserAuthenticationResult
      type: object
      required:
        - id
        - name
        - serviceEnvironmentId
        - userData
        - credentials
      properties:
        id:
          type: string
          format: uuid
          description: >-
            Unique id of the authentication - required by the [Call
            connector](/developer/platform-apis/connectors#endpoint-call-connector) endpoint
        name:
          type: string
          description: Name for the auth which identifies End User, service, test, dev etc.
        serviceEnvironmentId:
          type: string
          description: >-
            Identifies the service and environment the auth is for (e.g. Tray
            Slack OAuth app or your own Custom Slack OAuth app)
        userData:
          description: >-
            For OAuth-based authentications, this field contains data that
            is provided by the user, rather than by the OAuth flow. This may include
            subdomains or regions, for example.
          type: object
          additionalProperties:
            oneOf:
              - type: array
                items:
                  type: object
              - type: boolean
              - type: integer
              - type: object
                additionalProperties:
                  type: object
              - type: string
        credentials:
          description: The authentication credentials.
          type: object
          additionalProperties:
            oneOf:
              - type: array
                items:
                  type: object
              - type: boolean
              - type: integer
              - type: object
                additionalProperties:
                  type: object
              - type: string
        scopes:
          type: array
          items:
            type: string
          uniqueItems: true
          description: >-
            The permission scopes which describe the level of access this auth
            has to the service
        onPremAgentGroupId:
          description: The on-prem agent group this authentication is associated with, if any.
          type: string
          format: uuid
          example: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
    UpdatePublicUserAuthenticationHttp:
      title: UpdatePublicUserAuthenticationHttp
      type: object
      required:
        - name
        - credentials
      properties:
        name:
          type: string
          description: Name of the auth in Tray (e.g. `John Doe's Slack Auth 10th Oct`)
        userData:
          type: object
          description: >-
            Data regarding base url, company id, table id etc.<br />Input schema
            obtained using the [Get
            service environments](/developer/platform-apis/authentications#endpoint-get-service-environments) endpoint
          additionalProperties:
            oneOf:
              - type: array
                items:
                  type: object
              - type: boolean
              - type: integer
              - type: object
                additionalProperties:
                  type: object
              - type: string
        credentials:
          type: object
          description: >-
            Auth data (token, secret etc.) required to complete the auth<br
            />Input schema obtained using the [Get
            service environments](/developer/platform-apis/authentications#endpoint-get-service-environments) endpoint
          additionalProperties:
            oneOf:
              - type: array
                items:
                  type: object
              - type: boolean
              - type: integer
              - type: object
                additionalProperties:
                  type: object
              - type: string
        scopes:
          type: array
          items:
            type: string
          uniqueItems: true
          description: >-
            Example: `"scopes": ["chat:write", "channels:read"]` or `"scopes":
            ["chatter_api,", "openid"]`</br>List of the scopes required for the
            auth to function<br />Available scopes can be retrieved with [Get
            service
            environments](/developer/platform-apis/authentications#endpoint-get-service-environments)
        onPremAgentGroupId:
          type: string
          format: uuid
          example: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
    UpdatePublicUserAuthenticationResult:
      title: UpdatePublicUserAuthenticationResult
      type: object
      required:
        - id
        - name
        - serviceEnvironmentId
      properties:
        id:
          type: string
          format: uuid
          description: Authentication Id in Tray for the updated auth
        name:
          type: string
          description: Authentication Id in Tray for the updated auth
        serviceEnvironmentId:
          type: string
          description: Authentication Id in Tray for the updated auth
        scopes:
          type: array
          items:
            type: string
          uniqueItems: true
          description: Applicable for OAuth services only. An array of scopes attached to this auth are returned.
        onPremAgentGroupId:
          type: string
          format: uuid
          example: 123e4567-aaaa-aaaa-aaaa-aaaaaa614174
    PublicServiceEnvironment:
      required:
        - id
        - title
        - authenticationType
        - userDataSchema
        - credentialsSchema
        - scopes
      type: object
      properties:
        id:
          type: string
          description: >-
            Identifies the service and its environment <br /> e.g. Tray Slack
            OAuth app and your custom Slack OAuth app will have different ids
        title:
          type: string
          description: >-
            Will reflect the title given to your OAuth app when it was created
            in the Tray builder
        authenticationType:
          $ref: '#/components/schemas/AuthenticationType'
          description: >-
            Enum: `"token"` `"oauth1"` `"oauth2"` `"oauth2password"`
            `"oauth2client_credentials"` `"builtin"`
        userDataSchema:
          type: object
          additionalProperties:
            oneOf:
              - type: array
                items:
                  type: object
              - type: boolean
              - type: integer
              - type: object
                additionalProperties:
                  type: object
              - type: string
          description: Input schema for data regarding base url, company id, table id etc.
        credentialsSchema:
          type: object
          additionalProperties:
            oneOf:
              - type: array
                items:
                  type: object
              - type: boolean
              - type: integer
              - type: object
                additionalProperties:
                  type: object
              - type: string
          description: >-
            Input schema for auth data (token, secret etc.) required to complete
            the auth
        scopes:
          type: array
          items:
            oneOf:
              - type: array
                items:
                  type: object
              - type: boolean
              - type: integer
              - type: object
                additionalProperties:
                  type: object
              - type: string
          description: >-
            All available scopes to control the level of access given to any
            authentications
      description: ''
    PublicServiceEnvironmentList:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/PublicServiceEnvironment'
      description: ''

    PublicConnectorOperationList:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/PublicConnectorOperation'
          description: ''
      description: ''
    PublicConnectorOperation:
      required:
        - name
        - title
        - description
        - inputSchema
        - outputSchema
        - hasDynamicOutput
      type: object
      properties:
        title:
          type: string
          description: >-
            The full title of the operation - not required for any other
            endpoints
        authScopes:
          type: array
          items:
            type: string
          description: 'Array of Auth Scopes if the underlying service uses OAuth'
        description:
          type: string
          description: Brief description of what the operation does
        name:
          type: string
          description: >-
            The programmatic name of the operation to be used as input for [Call
            connector](/developer/platform-apis/connectors#endpoint-call-connector)
        hasDynamicOutput:
          type: boolean
          description: >-
            A boolean which indicates that the structure of the output depends
            on the input. Please see our <a
            href='/developer/getting-started/calling-connectors/dynamic-outputs'
            target='_blank'>Dynamic outputs documentation</a> for more details
        outputSchema:
          type: object
          additionalProperties:
            oneOf:
              - type: array
                items:
                  type: object
              - type: boolean
              - type: integer
              - type: object
                additionalProperties:
                  type: object
              - type: string
          description: All potential fields returned by the operation
        inputSchema:
          type: object
          additionalProperties:
            oneOf:
              - type: array
                items:
                  type: object
              - type: boolean
              - type: integer
              - type: object
                additionalProperties:
                  type: object
              - type: string
          description: >-
            All available input fields for the operation<br />Key properties
            include:<br />**required**: a list of the mandatory fields<br
            />**lookup**: indicates a field which is dependent on the result of
            another operation e.g. a channel selected from a list. Please see
            our <a
            href='/developer/getting-started/calling-connectors/ddl-operations'
            target='_blank'>DDL documentation</a> for more details<br
            />**enumLabels**: some fields have a set array of enum values which
            you can allow the user to choose from
      description: ''
    PublicConnectorCallResult:
      required:
        - outcome
        - output
      type: object
      properties:
        outcome:
          $ref: '#/components/schemas/PublicConnectorCallResultOutcome'
        output:
          type: object
          additionalProperties:
            oneOf:
              - type: array
                items:
                  type: object
              - type: boolean
              - type: integer
              - type: object
                additionalProperties:
                  type: object
              - type: string
          description: ''
      description: ''
    PublicConnector:
      required:
        - name
        - version
        - title
        - description
        - service
      type: object
      properties:
        description:
          type: string
          description: ''
        name:
          type: string
          description: The programmatic name of the connector
        service:
          $ref: '#/components/schemas/ConnectorServiceReference'
        title:
          type: string
          description: ''
        version:
          type: string
          description: >-
            The connector version required by [Get Connector
            Operations](/developer/platform-apis/connectors#endpoint-get-connector-operations) and
            [Call Connector](/developer/platform-apis/connectors#endpoint-call-connector)
      description: Array of connector objects
    PublicConnectorList:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/PublicConnector'
          description: Contains all connector details
    PublicConnectorCallResultOutcome:
      type: string
      enum:
        - success
        - error
      description: ''
    ConnectorServiceReference:
      required:
        - id
        - name
        - version
      type: object
      properties:
        id:
          type: string
          description: The `serviceId` required for the auth-only dialog url
        name:
          type: string
          description: >-
            Name of the service in Tray. Can be used in combination with service
            version below to get `serviceEnvironmentId` using <a
            href="/developer/platform-apis/authentications#endpoint-get-service-environments">GET service
            environments</a>
        version:
          type: integer
          format: int32
          description: >-
            Version of the service in Tray. Can be used in combination with
            service name above to get `serviceEnvironmentId` using <a
            href="/developer/platform-apis/authentications#endpoint-get-service-environments">GET service
            environments</a>
      description: 'Contains underlying Tray service details.'
    PublicConnectorCallPayload:
      required:
        - operation
        - input
      type: object
      properties:
        operation:
          type: string
          description: >-
            The name of the operation obtained using [Get connector
            operations](/developer/platform-apis/connectors#endpoint-get-connector-operations)
        authId:
          type: string
          format: uuid
          description: >-
            The End User-specific auth id obtained when using [Create user
            authentication](/developer/platform-apis/authentications#endpoint-create-user-authentication)
        input:
          type: object
          additionalProperties:
            oneOf:
              - type: array
                items:
                  type: object
              - type: boolean
              - type: integer
              - type: object
                additionalProperties:
                  type: object
              - type: string
          description: >-
            The exact schema of inputs must be retrieved from [Get connector
            operations](/developer/platform-apis/connectors#endpoint-get-connector-operations)
        returnOutputSchema:
          type: boolean
          description: >-
            Only applicable if [Get connector
            operations](/developer/platform-apis/connectors#endpoint-get-connector-operations) has
            returned true for `hasDynamicOutput` - indicating that the output
            changes depending on the input
      description: ''

    PublicConnectorEventsTrigger:
      required:
        - name
        - version
        - title
        - description
        - service
      type: object
      properties:
        service:
          $ref: '#/components/schemas/ConnectorServiceReference'
        version:
          type: string
          description: 'The connector version required by [Get Trigger operations](/developer/platform-apis/triggers#endpoint-get-trigger-operations) and [Create Subscription](/developer/platform-apis/triggers#endpoint-create-subscription)'
        name:
          type: string
          description: 'The programmatic name of the Trigger'
        title:
          type: string
          description: ''
        description:
          type: string
          description: ''
    SubscriptionState:
      type: string
      description: Indicated current state of the Subscription
      enum:
        - creating
        - creation_failed
        - deleted
        - active
    PublicConnectorEventsTriggerList:
      type: object
      description: List of available Triggers
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/PublicConnectorEventsTrigger'
    PublicConnectorEventsTriggerReference:
      required:
        - name
        - version
      type: object
      description: Reference to link the Trigger
      properties:
        name:
          type: string
          description: programmatic name of the Trigger
        version:
          type: string
          description: version of the Trigger
    PublicConnectorEventsSubscriptionPage:
      required:
        - pageInfo
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/PublicConnectorEventsSubscription'
        pageInfo:
          $ref: '#/components/schemas/PublicPageInfo'
    PublicPageInfo:
      required:
        - hasNextPage
      type: object
      properties:
        startCursor:
          type: string
          description: pagination parameter that can be passed in `cursor` query parameter
        endCursor:
          type: string
          description: pagination parameter that can be passed in `cursor` query parameter
        hasNextPage:
          type: boolean
          description: indicates the existence of another page of response that can be obtained by passing endCursor value in `cursor` query parameter
        hasPreviousPage:
          type: boolean
          description: indicates the existence of another page of response that can be obtained by passing startCursor value in `cursor` query parameter
    PublicCreateConnectorEventsSubscription:
      required:
        - name
        - trigger
        - operation
        - input
        - endpoint
      type: object
      properties:
        trigger:
          $ref: '#/components/schemas/PublicConnectorEventsTriggerReference'
        operation:
          type: string
          description: programmatic name of the Trigger operation. Obtained using [Get Trigger operations](/developer/platform-apis/triggers#endpoint-get-trigger-operations)
        authenticationId:
          type: string
          format: uuid
          description: Unique id of the auth returned by [Create Authentication](/developer/platform-apis/authentications#endpoint-create-user-authentication)
        input:
          type: object
          additionalProperties:
            oneOf:
              - type: array
                items:
                  type: object
              - type: boolean
              - type: integer
              - type: object
                additionalProperties:
                  type: object
              - type: string
        externalId:
          type: string
          description: Unique identifier for the subscription in your database.
        endpoint:
          type: string
          description: The URL where you want to receive the payloads from the Subscription.
        name:
          type: string
          description: Name of the Subscription. Can be used to display in the UI.
    PublicConnectorEventsTriggerOperation:
      required:
        - name
        - title
        - description
        - inputSchema
        - outputSchema
        - hasDynamicOutput
      type: object
      properties:
        name:
          type: string
          description: 'The programmatic name of the Trigger'
        title:
          type: string
        authScopes:
          type: array
          description: 'Array of Auth Scopes if the underlying service uses OAuth'
          items:
            type: string
        inputSchema:
          type: object
          description: >-
            All available input fields for the operation<br />Key properties
            include:<br />**required**: a list of the mandatory fields<br
            />**lookup**: indicates a field which is dependent on the result of
            another operation e.g. a channel selected from a list. Please see
            our <a
            href='https://developer.tray.io/developer/getting-started/calling-connectors/ddl-operations'
            target='_blank'>DDL documentation</a> for more details<br
            />**enumLabels**: some fields have a set array of enum values which
            you can allow the user to choose from
          additionalProperties:
            oneOf:
              - type: array
                items:
                  type: object
              - type: boolean
              - type: integer
              - type: object
                additionalProperties:
                  type: object
              - type: string
        hasDynamicOutput:
          type: boolean
          description: >-
            A boolean which indicates that the structure of the output depends
            on the input. Please see our <a
            href='/developer/getting-started/calling-connectors/dynamic-outputs'
            target='_blank'>Dynamic outputs documentation</a> for more details
        outputSchema:
          type: object
          additionalProperties:
            oneOf:
              - type: array
                items:
                  type: object
              - type: boolean
              - type: integer
              - type: object
                additionalProperties:
                  type: object
              - type: string
          description: All potential fields returned by the operation
        description:
          type: string
          description: Brief description of what the operation does
    PublicConnectorEventsTriggerOperationList:
      type: object
      description: List of Operations that can be used for this Trigger
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/PublicConnectorEventsTriggerOperation'
    CreatePublicConnectorEventsSubscriptionResult:
      properties:
        authenticationId:
          format: uuid
          type: string
          description: Unique id of the auth returned by [Create Authentication](/developer/platform-apis/authentications#endpoint-create-user-authentication)
        endpoint:
          type: string
          description: The URL where you want to receive the payloads from the Subscription.
        error:
          properties:
            code:
              $ref: '#/components/schemas/SubscriptionErrorCode'
            message:
              type: string
          required:
            - code
            - message
          type: object
          description: This is returned when subscripton creation fails on the third party service. `state` will be 'creation_failed'.
        externalId:
          type: string
          description: Unique identifier for the subscription in your database. Will only be returned if you passed it in the request.
        id:
          type: string
          description: Unique ID of the subscription in Tray's database.
        input:
          additionalProperties:
            oneOf:
              - items:
                  type: object
                type: array
              - type: boolean
              - type: integer
              - additionalProperties:
                  type: object
                type: object
              - type: string
          type: object
        name:
          type: string
          description: Name of the subcription
        operation:
          type: string
          description: Trigger operation used to create subscription
        signingKey:
          type: string
          description: Unique key that can be used to verify the source of payload was Tray. Read the guide [here](/developer/getting-started/using-triggers/creating-subscriptions) for explanation.
        state:
          $ref: '#/components/schemas/SubscriptionState'
          description: Current state of the subcription
        trigger:
          $ref: '#/components/schemas/PublicConnectorEventsTriggerReference'
          description: Details about the trigger name and version
      required:
        - id
        - name
        - trigger
        - operation
        - endpoint
        - input
        - state
        - signingKey
      type: object
    PublicConnectorEventsSubscription:
      type: object
      required:
        - id
        - name
        - trigger
        - operation
        - endpoint
        - input
        - state
      properties:
        externalId:
          type: string
          description: Unique ID of the Subscription on your end that you can use to query Subscriptions using [Get Subscriptions](/developer/platform-apis/triggers#endpoint-get-subscriptions)
        id:
          type: string
          description: Unique ID of the Subscription on Tray's end
        trigger:
          $ref: '#/components/schemas/PublicConnectorEventsTriggerReference'
        state:
          $ref: '#/components/schemas/SubscriptionState'
        error:
          required:
            - code
            - message
          type: object
          description: Details about error if any in creating the subscription
          properties:
            code:
              $ref: '#/components/schemas/SubscriptionErrorCode'
            message:
              type: string
        authenticationId:
          type: string
          format: uuid
          description: Unique id of the auth returned by [Create Authentication](/developer/platform-apis/authentications#endpoint-create-user-authentication)
        operation:
          type: string
          description: Programmatic name of the Trigger operation. Obtained using [Get Trigger operations](/developer/platform-apis/triggers#endpoint-get-trigger-operations)
        input:
          type: object
          description: A JSON object that follows that input schema of the above operation returned by [Get Trigger operations](/developer/platform-apis/triggers#endpoint-get-trigger-operations)
          additionalProperties:
            oneOf:
              - type: array
                items:
                  type: object
              - type: boolean
              - type: integer
              - type: object
                additionalProperties:
                  type: object
              - type: string
        name:
          type: string
          description: Name of the Subscription e.g. `Slack subscription USER_832782`
        endpoint:
          type: string
          description: Your URL where Tray would post events
    SubscriptionErrorCode:
      type: string
      enum:
        - user_input_error
        - api_error
        - timeout_error
        - oauth_refresh
        - no_trigger
        - internal_error

    Embedded:
      title: Embedded
      type: object
    Organization:
      title: Organization
      type: object
    Personal:
      title: Personal
      type: object
    PersonalExternal:
      title: PersonalExternal
      type: object
    Shared:
      title: Shared
      type: object
    WorkspaceType:
      title: WorkspaceType
      oneOf:
        - $ref: '#/components/schemas/Embedded'
        - $ref: '#/components/schemas/Organization'
        - $ref: '#/components/schemas/Personal'
        - $ref: '#/components/schemas/PersonalExternal'
        - $ref: '#/components/schemas/Shared'

    API:
      title: API
      type: object
    External:
      title: External
      type: object
    Integration:
      title: Integration
      type: object
    Partner:
      title: Partner
      type: object
    Regular:
      title: Regular
      type: object
    System:
      title: System
      type: object
    AccountType:
      title: AccountType
      oneOf:
        - $ref: '#/components/schemas/API'
        - $ref: '#/components/schemas/External'
        - $ref: '#/components/schemas/Integration'
        - $ref: '#/components/schemas/Partner'
        - $ref: '#/components/schemas/Regular'
        - $ref: '#/components/schemas/System'

    AddUserToWorkspaceExternalApiBody:
      title: AddUserToWorkspaceExternalApiBody
      type: object
      required:
        - userId
        - roleId
      properties:
        userId:
          type: string
          pattern: ^[a-zA-Z0-9-]+$
        roleId:
          type: string
          format: uuid
    ExternalApiDataPage_ENT:
      title: ExternalApiDataPage_ENT
      type: object
      required:
        - pageInfo
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/WorkspaceExternalApiModel'
        pageInfo:
          $ref: '#/components/schemas/ExternalApiPageInfoModel'
    ExternalApiPageInfoModel:
      title: ExternalApiPageInfoModel
      type: object
      required:
        - hasNextPage
        - hasPreviousPage
      properties:
        startCursor:
          type: string
        endCursor:
          type: string
        hasNextPage:
          type: boolean
        hasPreviousPage:
          type: boolean
    RoleExternalApiModel:
      title: RoleExternalApiModel
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
    UpdateUserOrganizationRoleExternalEndpointBody:
      title: UpdateUserOrganizationRoleExternalEndpointBody
      type: object
      required:
        - roleId
      properties:
        roleId:
          type: string
          format: uuid
    UpdateUserWorkspaceRoleExternalEndpointBody:
      title: UpdateUserWorkspaceRoleExternalEndpointBody
      type: object
      required:
        - roleId
      properties:
        roleId:
          type: string
          format: uuid
    UserExternalApiModel:
      title: UserExternalApiModel
      type: object
      required:
        - id
        - email
        - name
        - accountType
        - role
      properties:
        id:
          type: string
        email:
          type: string
        name:
          type: string
        accountType:
          $ref: '#/components/schemas/AccountType'
        role:
          $ref: '#/components/schemas/RoleExternalApiModel'
    WorkspaceExternalApiModel:
      title: WorkspaceExternalApiModel
      type: object
      required:
        - id
        - name
        - type
      properties:
        id:
          type: string
        name:
          type: string
        type:
          $ref: '#/components/schemas/WorkspaceType'
        description:
          type: string
        monthlyTaskLimit:
          type: integer
          format: int64

    WorkspaceUserExternalApiModel:
      title: WorkspaceUserExternalApiModel
      type: object
      required:
        - workspaceId
        - id
        - accountType
        - role
      properties:
        workspaceId:
          type: string
        id:
          type: string
        email:
          type: string
        accountType:
          $ref: '#/components/schemas/AccountType'
        role:
          $ref: '#/components/schemas/RoleExternalApiModel'
    CreateUserEndpointBody:
      title: CreateUserEndpointBody
      type: object
      required:
        - name
        - email
        - organizationRoleId
      properties:
        name:
          type: string
        email:
          type: string
          pattern: ^[a-zA-Z0-9\.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$
        organizationRoleId:
          type: string
          format: uuid
    InviteUserExternalEndpointBody:
      title: InviteUserExternalEndpointBody
      type: object
      required:
        - email
        - organizationRoleId
      properties:
        email:
          type: string
          pattern: ^[a-zA-Z0-9\.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$
        organizationRoleId:
          type: string
          format: uuid
    InviteCreatedExternalApiModel:
      title: InviteCreatedExternalApiModel
      type: object
      required:
        - inviteId
        - expires
      properties:
        inviteId:
          type: string
          format: uuid
        expires:
          type: string
          format: date-time

    DeployConnectorFromSourceResponse:
      type: 'object'
      properties:
        id:
          type: 'string'
          description: 'The deployment id of the connector deployment request.'
        repeatDeployment:
          type: 'boolean'
          description: 'Indicates that the deployment request was skipped because there is already a deployment in progress for this connector.'
        deploymentStatus:
          type: 'string'
          description: 'The status of the deployment request.'
          enum:
            - 'Deployed'
            - 'Failed'
            - 'Deploying'
        connectorName:
          type: 'string'
          description: 'The name of the connector being deployed.'
        connectorVersion:
          type: 'string'
          description: 'The version of the connector being deployed.'
    RequestFailed:
      type: 'object'
      properties:
        message:
          type: 'string'
        code:
          type: 'string'
    GetConnectorDeploymentResponse:
      type: 'object'
      properties:
        id:
          type: 'string'
          description: 'The deployment id of the connector deployment request.'
        deploymentStatus:
          type: 'string'
          description: 'The status of the deployment request.'
          enum:
            - 'Deployed'
            - 'Failed'
            - 'Deploying'
        connectorName:
          type: 'string'
          description: 'The name of the connector being deployed.'
        connectorVersion:
          type: 'string'
          description: 'The version of the connector being deployed.'
    ShareWithEmailsRequest:
      title: ShareWithEmailsRequest
      type: object
      required:
        - emails
      properties:
        emails:
          type: array
          items:
            type: string
    ShareWithEmailsResponse:
      title: ShareWithEmailsResponse
      type: object
      required:
        - message
      properties:
        message:
          type: string

    BasePageInfo_PublicOnPremAgentGroupHttpResponse:
      title: BasePageInfo_PublicOnPremAgentGroupHttpResponse
      type: object
      properties:
        startCursor:
          type: string
        endCursor:
          type: string
        hasNextPage:
          type: boolean
        hasPreviousPage:
          type: boolean
    BasePageInfo_PublicOnPremAgentInstanceHttpResponse:
      title: BasePageInfo_PublicOnPremAgentInstanceHttpResponse
      type: object
      properties:
        startCursor:
          type: string
        endCursor:
          type: string
        hasNextPage:
          type: boolean
        hasPreviousPage:
          type: boolean
    BasePage_PublicOnPremAgentGroupHttpResponse:
      title: BasePage_PublicOnPremAgentGroupHttpResponse
      type: object
      required:
        - pageInfo
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/PublicOnPremAgentGroupHttpResponse'
        pageInfo:
          $ref: '#/components/schemas/BasePageInfo_PublicOnPremAgentGroupHttpResponse'
    BasePage_PublicOnPremAgentInstanceHttpResponse:
      title: BasePage_PublicOnPremAgentInstanceHttpResponse
      type: object
      required:
        - pageInfo
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/PublicOnPremAgentInstanceHttpResponse'
        pageInfo:
          $ref: '#/components/schemas/BasePageInfo_PublicOnPremAgentInstanceHttpResponse'
    NewPublicCreateOnPremAgentGroupHttpRequest:
      title: NewPublicCreateOnPremAgentGroupHttpRequest
      type: object
      required:
        - name
      properties:
        name:
          type: string
    PublicCreateOnPremAgentInstanceHttpRequest:
      title: PublicCreateOnPremAgentInstanceHttpRequest
      type: object
      required:
        - name
      properties:
        name:
          type: string
    PublicCreateOnPremAgentInstanceHttpResponse:
      title: PublicCreateOnPremAgentInstanceHttpResponse
      type: object
      required:
        - id
        - agentGroupId
        - name
        - registrationToken
      properties:
        id:
          type: string
        agentGroupId:
          type: string
        name:
          type: string
        registrationToken:
          type: string
    PublicOnPremAgentGroupHttpResponse:
      title: PublicOnPremAgentGroupHttpResponse
      type: object
      required:
        - id
        - name
        - workspaceId
      properties:
        id:
          type: string
        name:
          type: string
        workspaceId:
          type: string
    PublicOnPremAgentInstanceHttpResponse:
      title: PublicOnPremAgentInstanceHttpResponse
      type: object
      required:
        - id
        - agentGroupId
        - name
        - registered
        - connected
        - enabled
      properties:
        id:
          type: string
        agentGroupId:
          type: string
        name:
          type: string
        registered:
          type: boolean
        connected:
          type: boolean
        enabled:
          type: boolean
    PublicUpdateOnPremAgentInstanceHttpRequest:
      title: PublicUpdateOnPremAgentInstanceHttpRequest
      type: object
      properties:
        enabled:
          type: boolean
    #######################################################################################################################
    # SDLC COMPONENTS START ***********************************************************************************************
    #######################################################################################################################
    solution.release.PublishSolutionImpactView.ConfigSlotChangesView.ConfigSlotView:
      properties:
        id:
          type: string
          format: uuid
          description: ID of the slot
        key:
          type: string
          description: Project config key for which slot corresponds
        title:
          type: string
          description: Title of the slot
        description:
          type: string
          description: Description of the slot
        externalId:
          type: string
          description: Custom external identifier for the slot set in Tray UI
        valueType:
          type: string
          description: type of value that can be stored in the slot
        ddl:
          type: boolean
          description: Whether the slot is a dropdown list with dynamically loaded values
        ddlConfiguration:
          $ref: '#/components/schemas/solution.release.PublishSolutionImpactView.ConfigSlotChangesView.ConfigSlotDDLConfigurationView'
        required:
          type: boolean
          description: Whether the slot value is required to be collected from an end user
        useDefaultValue:
          type: boolean
          description: Whether the default value should be used if a value has not been collected from an end user
        defaultValue:
          description: A default value which can be a string, number, object, array, boolean, null
          oneOf:
            - type: string
            - type: number
            - type: object
            - type: array
            - type: boolean
        referencedAuthSlotId:
          type: string
          format: uuid
          description: ID of the auth slot that this config slot uses for DDL operations
        static:
          type: boolean
          description: Whether the slot is static and its value is shared between all solution instances
        hidden:
          type: boolean
          description: Whether the slot is hidden from an end user
        hasCustomJs:
          type: boolean
          description: Whether the slot UI has custom JavaScript logic
        hasDataMapping:
          type: boolean
          description: Whether the slot uses data mapping UI
        disabledResetType:
          type: boolean
          description: Whether the slot UI allows to set a value to null (applies for string type values)
      required:
        - id
        - key
        - title
        - description
        - valueType
        - ddl
        - required
        - useDefaultValue
        - defaultValue
        - static
        - hidden
        - hasCustomJs
        - hasDataMapping
        - disabledResetType
    solution.release.PublishSolutionImpactView.ConfigSlotChangesView.UpdatedConfigSlotView:
      properties:
        id:
          type: string
          format: uuid
          description: ID of the slot
        key:
          type: string
          description: Project config key for which slot corresponds
        title:
          type: string
          description: Title of the slot
        description:
          type: string
          description: Description of the slot
        externalId:
          type: string
          description: Custom external identifier for the slot set in Tray UI
        valueType:
          type: string
          description: type of value that can be stored in the slot
        ddl:
          type: boolean
          description: Whether the slot is a dropdown list with dynamically loaded values
        ddlConfiguration:
          $ref: '#/components/schemas/solution.release.PublishSolutionImpactView.ConfigSlotChangesView.ConfigSlotDDLConfigurationView'
        required:
          type: boolean
          description: Whether the slot value is required to be collected from an end user
        useDefaultValue:
          type: boolean
          description: Whether the default value should be used if a value has not been collected from an end user
        defaultValue:
          description: A default value which can be a string, number, object, array, boolean, null
          oneOf:
            - type: string
            - type: number
            - type: object
            - type: array
            - type: boolean
        referencedAuthSlotId:
          type: string
          format: uuid
          description: ID of the auth slot that this config slot uses for DDL operations
        static:
          type: boolean
          description: Whether the slot is static and its value is shared between all solution instances
        hidden:
          type: boolean
          description: Whether the slot is hidden from an end user
        hasCustomJs:
          type: boolean
          description: Whether the slot UI has custom JavaScript logic
        hasDataMapping:
          type: boolean
          description: Whether the slot uses data mapping UI
        disabledResetType:
          type: boolean
          description: Whether the slot UI allows to set a value to null (applies for string type values)
        hasBreakingChange:
          type: boolean
          description: Informs if new slot version is introducing breaking changes
        changes:
          type: array
          description: Changes between previously published slot and the current one
          items:
            $ref: '#/components/schemas/solution.release.slot.ConfigSlotChangeView'
        previously:
          description: Slot values previously
          $ref: '#/components/schemas/solution.release.PublishSolutionImpactView.ConfigSlotChangesView.ConfigSlotView'
      required:
        - id
        - key
        - title
        - description
        - valueType
        - ddl
        - required
        - useDefaultValue
        - defaultValue
        - static
        - hidden
        - hasCustomJs
        - hasDataMapping
        - disabledResetType
        - hasBreakingChange
        - changes
        - previously
    solution.release.PublishSolutionImpactView.ConfigSlotChangesView.ConfigSlotRecreationReasonView:
      properties:
        code:
          description: Code that can be used by clients to recognize specific recreation reasons
          type: string
          enum:
            - ConfigVariableKeyChanged
            - ConfigVariableTypeChanged
            - AuthSlotReferencedByDLLFieldChanged
            - IncompatibleDDLChanged
        message:
          type: string
          description: Message explaining the recreation reason
      required:
        - code
        - message
    solution.release.slot.ConfigSlotChangeView:
      properties:
        message:
          type: string
          description: Human readable description of the change
        code:
          description: Code that can be used by clients to recognize specific changes
          type: string
          enum:
            - CreatedMandatorySlot
            - CreatedOptionalSlot
            - SlotMadeMandatory
            - SlotMadeOptional
            - DefaultValueUpdated
            - CustomJavascriptAdded
            - CustomJavascriptRemoved
            - CustomJavascriptUpdated
            - DataMappingAdded
            - DataMappingRemoved
            - DataMappingUpdated
            - KeyUpdated
            - ValueTypeUpdated
            - TitleUpdated
            - DescriptionUpdated
            - ExternalIdUpdated
            - ReferencedAuthSlotIdUpdated
            - ReferenceToAuthSlotIdAdded
            - ReferenceToAuthSlotIdRemoved
            - SlotMadeToAllowSetCustomValueInDDL
            - SlotMadeToNotAllowSetCustomValueInDDL
            - SlotMadeDDL
            - SlotMadeNotDDL
            - SlotMadeStatic
            - SlotMadeNotStatic
            - SlotMadeRequired
            - SlotMadeNotRequired
            - SlotMadeToUseDefaultValue
            - SlotMadeToNotUseDefaultValue
            - SlotMadeHidden
            - SlotMadeNotHidden
            - DisabledResetType
            - EnabledResetType
        breakingChange:
          type: boolean
          description: Whether the change is a breaking change
      required:
        - message
        - code
        - breakingChange
    solution.release.PublishSolutionImpactView.ConfigSlotChangesView.ConfigSlotDDLConfigurationView:
      properties:
        allowSetCustomValue:
          type: boolean
          description: Whether the slot allows to set a custom value for a dropdown list field
      required:
        - allowSetCustomValue
    solution.release.PublishSolutionImpactView.ConfigSlotChangesView.CreatedConfigSlotView:
      properties:
        id:
          type: string
          format: uuid
          description: ID of the slot
        key:
          type: string
          description: Project config key for which slot corresponds
        title:
          type: string
          description: Title of the slot
        description:
          type: string
          description: Description of the slot
        externalId:
          type: string
          description: Custom external identifier for the slot set in Tray UI
        valueType:
          type: string
          description: type of value that can be stored in the slot
        ddl:
          type: boolean
          description: Whether the slot is a dropdown list with dynamically loaded values
        ddlConfiguration:
          $ref: '#/components/schemas/solution.release.PublishSolutionImpactView.ConfigSlotChangesView.ConfigSlotDDLConfigurationView'
        required:
          type: boolean
          description: Whether the slot value is required to be collected from an end user
        useDefaultValue:
          type: boolean
          description: Whether the default value should be used if a value has not been collected from an end user
        defaultValue:
          description: A default value which can be a string, number, object, array, boolean, null
          oneOf:
            - type: string
            - type: number
            - type: object
            - type: array
            - type: boolean
        referencedAuthSlotId:
          type: string
          format: uuid
          description: ID of the auth slot that this config slot uses for DDL operations
        static:
          type: boolean
          description: Whether the slot is static and its value is shared between all solution instances
        hidden:
          type: boolean
          description: Whether the slot is hidden from an end user
        hasCustomJs:
          type: boolean
          description: Whether the slot UI has custom JavaScript logic
        hasDataMapping:
          type: boolean
          description: Whether the slot uses data mapping UI
        disabledResetType:
          type: boolean
          description: Whether the slot UI allows to set a value to null (applies for string type values)
        hasBreakingChange:
          type: boolean
          description: Informs if new slot version is introducing breaking changes
        changes:
          type: array
          description: Changes between previously published slot and the current one
          items:
            $ref: '#/components/schemas/solution.release.slot.ConfigSlotChangeView'
        recreated:
          type: boolean
          description: Informs if the slot has been recreated
        slotRecreationReasons:
          type: array
          description: Reasons why the slot has been recreated (present only if recreated is true)
          items:
            $ref: '#/components/schemas/solution.release.PublishSolutionImpactView.ConfigSlotChangesView.ConfigSlotRecreationReasonView'
        recreatedFromSlotId:
          type: string
          format: uuid
          description: ID of the removed slot that this slot is replacing (present only if recreated is true)
      required:
        - id
        - key
        - title
        - description
        - valueType
        - ddl
        - required
        - useDefaultValue
        - defaultValue
        - static
        - hidden
        - hasCustomJs
        - hasDataMapping
        - disabledResetType
        - hasBreakingChange
        - changes
        - recreated
    solution.release.PublishSolutionImpactView.ConfigSlotChangesView:
      properties:
        created:
          type: array
          description: Slots that have been added compare to the previously published solution
          items:
            $ref: '#/components/schemas/solution.release.PublishSolutionImpactView.ConfigSlotChangesView.CreatedConfigSlotView'
        updated:
          type: array
          description: Slots that have been updated compare to the previously published solution
          items:
            $ref: '#/components/schemas/solution.release.PublishSolutionImpactView.ConfigSlotChangesView.UpdatedConfigSlotView'
        removed:
          type: array
          description: Slots that have been removed compare to the previously published solution
          items:
            $ref: '#/components/schemas/solution.release.PublishSolutionImpactView.ConfigSlotChangesView.ConfigSlotView'
      required:
        - created
        - updated
        - removed
    solution.release.PublishSolutionImpactView.AuthSlotChangesView.AuthSlotView:
      properties:
        id:
          type: string
          format: uuid
          description: ID of the slot
        title:
          type: string
          description: Title of the slot
        description:
          type: string
          description: Description of the slot
        authenticationId:
          type: string
          format: uuid
          description: ID of the authentication based on which the slot has been created
        serviceId:
          type: string
          format: uuid
          description: ID of the 3rd party service for which the slot has been created
        serviceEnvironmentId:
          type: string
          format: uuid
          description: ID of the service environment for which the slot has been created
        scopes:
          type: array
          description: Authentication scopes that the slot requires
          items:
            type: string
        externalId:
          type: string
          description: Custom external identifier for the slot set in Tray UI
        static:
          type: boolean
          description: Whether the slot is static and its value is shared between all solution instances
        hidden:
          type: boolean
          description: Whether the slot is hidden from an end user
        skipCTA:
          type: boolean
          description: Whether the UI should skip call to action button for the slot
        requireUnique:
          type: boolean
          description: Whether the authentication used to fulfill the slot should be unique
      required:
        - id
        - title
        - description
        - authenticationId
        - scopes
        - static
        - hidden
        - skipCTA
        - requireUnique
    solution.release.PublishSolutionImpactView.AuthSlotChangesView.UpdatedAuthSlotView:
      properties:
        id:
          type: string
          format: uuid
          description: ID of the slot
        title:
          type: string
          description: Title of the slot
        description:
          type: string
          description: Description of the slot
        authenticationId:
          type: string
          format: uuid
          description: ID of the authentication based on which the slot has been created
        serviceId:
          type: string
          format: uuid
          description: ID of the 3rd party service for which the slot has been created
        serviceEnvironmentId:
          type: string
          format: uuid
          description: ID of the service environment for which the slot has been created
        scopes:
          type: array
          description: Authentication scopes that the slot requires
          items:
            type: string
        externalId:
          type: string
          description: Custom external identifier for the slot set in Tray UI
        static:
          type: boolean
          description: Whether the slot is static and its value is shared between all solution instances
        hidden:
          type: boolean
          description: Whether the slot is hidden from an end user
        skipCTA:
          type: boolean
          description: Whether the UI should skip call to action button for the slot
        requireUnique:
          type: boolean
          description: Whether the authentication used to fulfill the slot should be unique
        hasBreakingChange:
          type: boolean
          description: Informs if new slot version is introducing breaking changes
        changes:
          type: array
          description: Changes between previously published slot and the current one
          items:
            $ref: '#/components/schemas/solution.release.slot.AuthSlotChangeView'
        previously:
          description: Slot values previously
          $ref: '#/components/schemas/solution.release.PublishSolutionImpactView.AuthSlotChangesView.AuthSlotView'
      required:
        - id
        - title
        - description
        - authenticationId
        - scopes
        - static
        - hidden
        - skipCTA
        - requireUnique
        - hasBreakingChange
        - changes
        - previously
    solution.release.PublishSolutionImpactView.AuthSlotChangesView.AuthSlotRecreationReasonView:
      properties:
        code:
          description: Code that can be used by clients to recognize specific recreation reasons
          type: string
          enum:
            - AuthenticationIdChanged
            - ScopesIncreased
            - ScopesDecreased
            - ServiceEnvironmentChanged
        message:
          type: string
          description: Message explaining the recreation reason
      required:
        - code
        - message
    solution.release.slot.AuthSlotChangeView:
      properties:
        message:
          type: string
          description: Human readable description of the change
        code:
          description: Code that can be used by clients to recognize specific changes
          type: string
          enum:
            - CreatedMandatorySlot
            - CreatedOptionalSlot
            - SlotMadeMandatory
            - SlotMadeOptional
            - ScopesIncreased
            - ScopesDecreased
            - TitleUpdated
            - DescriptionUpdated
            - ExternalIdUpdated
            - ServiceIdUpdated
            - ServiceEnvironmentIdUpdated
            - AuthenticationIdUpdated
            - SlotMadeStatic
            - SlotMadeNotStatic
            - SlotMadeHidden
            - SlotMadeNotHidden
            - SlotMadeToSkipCTA
            - SlotMadeToNotSkipCTA
            - SlotMadeToRequireUnique
            - SlotMadeToNotRequireUnique
        breakingChange:
          type: boolean
          description: Whether the change is a breaking change
      required:
        - message
        - code
        - breakingChange
    solution.release.PublishSolutionImpactView.AuthSlotChangesView.CreatedAuthSlotView:
      properties:
        id:
          type: string
          format: uuid
          description: ID of the slot
        authenticationId:
          type: string
          format: uuid
          description: ID of the authentication based on which the slot has been created
        title:
          type: string
          description: Title of the slot
        description:
          type: string
          description: Description of the slot
        serviceId:
          type: string
          format: uuid
          description: ID of the 3rd party service for which the slot has been created
        serviceEnvironmentId:
          type: string
          format: uuid
          description: ID of the service environment for which the slot has been created
        scopes:
          type: array
          description: Authentication scopes that the slot requires
          items:
            type: string
        externalId:
          type: string
          description: Custom external identifier for the slot set in Tray UI
        static:
          type: boolean
          description: Whether the slot is static and its value is shared between all solution instances
        hidden:
          type: boolean
          description: Whether the slot is hidden from an end user
        skipCTA:
          type: boolean
          description: Whether the UI should skip call to action button for the slot
        requireUnique:
          type: boolean
          description: Whether the authentication used to fulfill the slot should be unique
        hasBreakingChange:
          type: boolean
          description: Informs if new slot version is introducing breaking changes
        changes:
          type: array
          description: Changes between previously published slot and the current one
          items:
            $ref: '#/components/schemas/solution.release.slot.AuthSlotChangeView'
        recreated:
          type: boolean
          description: Informs if the slot has been recreated
        slotRecreationReasons:
          type: array
          description: Reasons why the slot has been recreated (present only if recreated is true)
          items:
            $ref: '#/components/schemas/solution.release.PublishSolutionImpactView.AuthSlotChangesView.AuthSlotRecreationReasonView'
        recreatedFromSlotId:
          type: string
          format: uuid
          description: ID of the removed slot that this slot is replacing (present only if recreated is true)
      required:
        - id
        - authenticationId
        - title
        - description
        - scopes
        - static
        - hidden
        - skipCTA
        - requireUnique
        - hasBreakingChange
        - changes
        - recreated
    solution.release.PublishSolutionImpactView.AuthSlotChangesView:
      properties:
        created:
          type: array
          description: Slots that have been added compare to the previously published solution
          items:
            $ref: '#/components/schemas/solution.release.PublishSolutionImpactView.AuthSlotChangesView.CreatedAuthSlotView'
        updated:
          type: array
          description: Slots that have been updated compare to the previously published solution
          items:
            $ref: '#/components/schemas/solution.release.PublishSolutionImpactView.AuthSlotChangesView.UpdatedAuthSlotView'
        removed:
          type: array
          description: Slots that have been removed compare to the previously published solution
          items:
            $ref: '#/components/schemas/solution.release.PublishSolutionImpactView.AuthSlotChangesView.AuthSlotView'
      required:
        - created
        - updated
        - removed
    solution.release.PublishSolutionImpactView:
      properties:
        releaseId:
          type: string
          format: uuid
          description: ID of the solution release (not present in case of preview endpoint)
        breakingChanges:
          type: boolean
          description: Informs if new version of the solution is introducing breaking changes
        requiresNewUserInput:
          type: boolean
          description: Informs if new version of the solution required new end user input
        requiresNewSystemInput:
          type: boolean
          description: Informs if new version of the solution required new system input
        authSlots:
          description: Auth slots changes
          $ref: '#/components/schemas/solution.release.PublishSolutionImpactView.AuthSlotChangesView'
        configSlots:
          description: Config slots changes
          $ref: '#/components/schemas/solution.release.PublishSolutionImpactView.ConfigSlotChangesView'
      required:
        - breakingChanges
        - requiresNewUserInput
        - requiresNewSystemInput
        - authSlots
        - configSlots
    importexport.slot.CreatedConfigSlotView:
      properties:
        id:
          type: string
          format: uuid
          description: ID of the slot
        key:
          type: string
          description: Project config key for which slot corresponds
        title:
          type: string
          description: Title of the slot
        description:
          type: string
          description: Description of the slot
        externalId:
          type: string
          description: Custom external identifier for the slot set in Tray UI
        valueType:
          type: string
          description: type of value that can be stored in the slot
        ddl:
          type: boolean
          description: Whether the slot is a dropdown list with dynamically loaded values
        ddlConfiguration:
          $ref: '#/components/schemas/importexport.slot.ConfigSlotDDLConfigurationView'
        required:
          type: boolean
          description: Whether the slot value is required to be collected from an end user
        useDefaultValue:
          type: boolean
          description: Whether the default value should be used if a value has not been collected from an end user
        defaultValue:
          description: A default value which can be a string, number, object, array, boolean, null
          oneOf:
            - type: string
            - type: number
            - type: object
            - type: array
            - type: boolean
        referencedAuthSlotId:
          type: string
          format: uuid
          description: ID of the auth slot that this config slot uses for DDL operations
        static:
          type: boolean
          description: Whether the slot is static and its value is shared between all solution instances
        hidden:
          type: boolean
          description: Whether the slot is hidden from an end user
        hasCustomJs:
          type: boolean
          description: Whether the slot UI has custom JavaScript logic
        hasDataMapping:
          type: boolean
          description: Whether the slot uses data mapping UI
        disabledResetType:
          type: boolean
          description: Whether the slot UI allows to set a value to null (applies for string type values)
        hasBreakingChange:
          type: boolean
          description: Informs if new slot version is introducing breaking changes
        changes:
          type: array
          description: The slot changes introduced by import
          items:
            $ref: '#/components/schemas/importexport.slot.ConfigSlotChangeView'
        recreated:
          type: boolean
          description: Informs if the slot has been recreated
        slotRecreationReasons:
          type: array
          description: Reasons why the slot has been recreated (present only if recreated is true)
          items:
            $ref: '#/components/schemas/importexport.slot.ConfigSlotRecreationReasonView'
        recreatedFromSlotId:
          type: string
          format: uuid
          description: ID of the removed slot that this slot is replacing (present only if recreated is true)
      required:
        - id
        - key
        - title
        - description
        - valueType
        - ddl
        - required
        - useDefaultValue
        - defaultValue
        - static
        - hidden
        - hasCustomJs
        - hasDataMapping
        - disabledResetType
        - hasBreakingChange
        - changes
        - recreated
    importexport.slot.ConfigSlotChangesView:
      properties:
        created:
          type: array
          description: Slots that have been added as result of import
          items:
            $ref: '#/components/schemas/importexport.slot.CreatedConfigSlotView'
        updated:
          type: array
          description: Slots that have been updated as result of import
          items:
            $ref: '#/components/schemas/importexport.slot.UpdatedConfigSlotView'
        removed:
          type: array
          description: Slots that have been removed as result of import
          items:
            $ref: '#/components/schemas/importexport.slot.ConfigSlotView'
      required:
        - created
        - updated
        - removed
    importexport.slot.CreatedAuthSlotView:
      properties:
        id:
          type: string
          format: uuid
          description: ID of the slot
        authenticationId:
          type: string
          format: uuid
          description: ID of the authentication based on which the slot has been created
        title:
          type: string
          description: Title of the slot
        description:
          type: string
          description: Description of the slot
        serviceId:
          type: string
          format: uuid
          description: ID of the 3rd party service for which the slot has been created
        serviceEnvironmentId:
          type: string
          format: uuid
          description: ID of the service environment for which the slot has been created
        scopes:
          type: array
          description: Authentication scopes that the slot requires
          items:
            type: string
        externalId:
          type: string
          description: Custom external identifier for the slot set in Tray UI
        static:
          type: boolean
          description: Whether the slot is static and its value is shared between all solution instances
        hidden:
          type: boolean
          description: Whether the slot is hidden from an end user
        skipCTA:
          type: boolean
          description: Whether the UI should skip call to action button for the slot
        requireUnique:
          type: boolean
          description: Whether the authentication used to fulfill the slot should be unique
        hasBreakingChange:
          type: boolean
          description: Informs if new slot version is introducing breaking changes
        changes:
          type: array
          description: The slot changes introduced by import
          items:
            $ref: '#/components/schemas/importexport.slot.AuthSlotChangeView'
        recreated:
          type: boolean
          description: Informs if the slot has been recreated
        slotRecreationReasons:
          type: array
          description: Reasons why the slot has been recreated (present only if recreated is true)
          items:
            $ref: '#/components/schemas/importexport.slot.AuthSlotRecreationReasonView'
        recreatedFromSlotId:
          type: string
          format: uuid
          description: ID of the removed slot that this slot is replacing (present only if recreated is true)
      required:
        - id
        - authenticationId
        - title
        - description
        - scopes
        - static
        - hidden
        - skipCTA
        - requireUnique
        - hasBreakingChange
        - changes
        - recreated
    importexport.slot.AuthSlotChangesView:
      properties:
        created:
          type: array
          description: Slots that have been added as result of import
          items:
            $ref: '#/components/schemas/importexport.slot.CreatedAuthSlotView'
        updated:
          type: array
          description: Slots that have been updated as result of import
          items:
            $ref: '#/components/schemas/importexport.slot.UpdatedAuthSlotView'
        removed:
          type: array
          description: Slots that have been removed as result of import
          items:
            $ref: '#/components/schemas/importexport.slot.AuthSlotView'
      required:
        - created
        - updated
        - removed
    importexport.SolutionImportImpactView:
      description: Impact of the solution import. Applies only for embedded solutions import.
      properties:
        solutionId:
          type: string
          format: uuid
        changeType:
          type: string
          enum:
            - Created
            - Updated
            - Deleted
        breakingChanges:
          type: boolean
          description: Informs if import introduced breaking changes to the solution
        requiresNewUserInput:
          type: boolean
          description: Informs if new version of the solution required new end user input
        requiresNewSystemInput:
          type: boolean
          description: Informs if new version of the solution required new system input
        authSlots:
          description: Auth slots changes
          $ref: '#/components/schemas/importexport.slot.AuthSlotChangesView'
        configSlots:
          description: Config slots changes
          $ref: '#/components/schemas/importexport.slot.ConfigSlotChangesView'
      required:
        - changeType
        - breakingChanges
        - requiresNewUserInput
        - requiresNewSystemInput
        - authSlots
        - configSlots
    importexport.CreatedWorkflowSummaryView:
      properties:
        id:
          type: string
          format: uuid
          description: ID of the created workflow
        name:
          type: string
        importedFromId:
          type: string
          format: uuid
          description: ID of the workflow from which the created workflow has been imported
      required:
        - id
        - name
        - importedFromId
    importexport.WorkflowChangesView:
      properties:
        created:
          type: array
          description: Workflows that have been added as result of import
          items:
            $ref: '#/components/schemas/importexport.CreatedWorkflowSummaryView'
        updated:
          type: array
          description: Workflows that have been updated as result of import
          items:
            $ref: '#/components/schemas/importexport.UpdatedWorkflowSummaryView'
        removed:
          type: array
          description: Workflows that have been removed as result of import
          items:
            $ref: '#/components/schemas/importexport.RemovedWorkflowSummaryView'
      required:
        - created
        - updated
        - removed
    importexport.ProjectImportImpactView:
      description: Impact of the project import.
      properties:
        config:
          description: Project configuration changes
          $ref: '#/components/schemas/importexport.ProjectConfigChangesView'
        workflows:
          description: Project workflows changes
          $ref: '#/components/schemas/importexport.WorkflowChangesView'
      required:
        - config
        - workflows
    importexport.ProjectImportResponse:
      properties:
        importMetadata:
          description: Metadata of the import
          $ref: '#/components/schemas/importexport.ImportMetadataView'
        projectImpact:
          description: Impact of the import on the project
          $ref: '#/components/schemas/importexport.ProjectImportImpactView'
        solutionImpact:
          description: Impact of the import on the solution (present only if importing a project with embedded solution)
          $ref: '#/components/schemas/importexport.SolutionImportImpactView'
      required:
        - importMetadata
        - projectImpact
    importexport.slot.ConfigSlotView:
      properties:
        id:
          type: string
          format: uuid
          description: ID of the slot
        key:
          type: string
          description: Project config key for which slot corresponds
        title:
          type: string
          description: Title of the slot
        description:
          type: string
          description: Description of the slot
        externalId:
          type: string
          description: Custom external identifier for the slot set in Tray UI
        valueType:
          type: string
          description: type of value that can be stored in the slot
        ddl:
          type: boolean
          description: Whether the slot is a dropdown list with dynamically loaded values
        ddlConfiguration:
          $ref: '#/components/schemas/importexport.slot.ConfigSlotDDLConfigurationView'
        required:
          type: boolean
          description: Whether the slot value is required to be collected from an end user
        useDefaultValue:
          type: boolean
          description: Whether the default value should be used if a value has not been collected from an end user
        defaultValue:
          description: A default value which can be a string, number, object, array, boolean, null
          oneOf:
            - type: string
            - type: number
            - type: object
            - type: array
            - type: boolean
        referencedAuthSlotId:
          type: string
          format: uuid
          description: ID of the auth slot that this config slot uses for DDL operations
        static:
          type: boolean
          description: Whether the slot is static and its value is shared between all solution instances
        hidden:
          type: boolean
          description: Whether the slot is hidden from an end user
        hasCustomJs:
          type: boolean
          description: Whether the slot UI has custom JavaScript logic
        hasDataMapping:
          type: boolean
          description: Whether the slot uses data mapping UI
        disabledResetType:
          type: boolean
          description: Whether the slot UI allows to set a value to null (applies for string type values)
      required:
        - id
        - key
        - title
        - description
        - valueType
        - ddl
        - required
        - useDefaultValue
        - defaultValue
        - static
        - hidden
        - hasCustomJs
        - hasDataMapping
        - disabledResetType
    importexport.slot.UpdatedConfigSlotView:
      properties:
        id:
          type: string
          format: uuid
          description: ID of the slot
        key:
          type: string
          description: Project config key for which slot corresponds
        title:
          type: string
          description: Title of the slot
        description:
          type: string
          description: Description of the slot
        externalId:
          type: string
          description: Custom external identifier for the slot set in Tray UI
        valueType:
          type: string
          description: type of value that can be stored in the slot
        ddl:
          type: boolean
          description: Whether the slot is a dropdown list with dynamically loaded values
        ddlConfiguration:
          $ref: '#/components/schemas/importexport.slot.ConfigSlotDDLConfigurationView'
        required:
          type: boolean
          description: Whether the slot value is required to be collected from an end user
        useDefaultValue:
          type: boolean
          description: Whether the default value should be used if a value has not been collected from an end user
        defaultValue:
          description: A default value which can be a string, number, object, array, boolean, null
          oneOf:
            - type: string
            - type: number
            - type: object
            - type: array
            - type: boolean
        referencedAuthSlotId:
          type: string
          format: uuid
          description: ID of the auth slot that this config slot uses for DDL operations
        static:
          type: boolean
          description: Whether the slot is static and its value is shared between all solution instances
        hidden:
          type: boolean
          description: Whether the slot is hidden from an end user
        hasCustomJs:
          type: boolean
          description: Whether the slot UI has custom JavaScript logic
        hasDataMapping:
          type: boolean
          description: Whether the slot uses data mapping UI
        disabledResetType:
          type: boolean
          description: Whether the slot UI allows to set a value to null (applies for string type values)
        hasBreakingChange:
          type: boolean
          description: Informs if new slot version is introducing breaking changes
        changes:
          type: array
          description: The slot changes introduced by import
          items:
            $ref: '#/components/schemas/importexport.slot.ConfigSlotChangeView'
        previously:
          description: Slot values previously
          $ref: '#/components/schemas/importexport.slot.ConfigSlotView'
      required:
        - id
        - key
        - title
        - description
        - valueType
        - ddl
        - required
        - useDefaultValue
        - defaultValue
        - static
        - hidden
        - hasCustomJs
        - hasDataMapping
        - disabledResetType
        - hasBreakingChange
        - changes
        - previously
    importexport.slot.ConfigSlotRecreationReasonView:
      properties:
        code:
          type: string
          enum:
            - ConfigVariableKeyChanged
            - ConfigVariableTypeChanged
            - AuthSlotReferencedByDLLFieldChanged
            - IncompatibleDDLChanged
        message:
          type: string
          description: Message explaining the recreation reason
      required:
        - code
        - message
    importexport.slot.ConfigSlotChangeView:
      properties:
        message:
          type: string
          description: Human readable description of the change
        code:
          description: Code that can be used by clients to recognize specific changes
          type: string
          enum:
            - CreatedMandatorySlot
            - CreatedOptionalSlot
            - SlotMadeMandatory
            - SlotMadeOptional
            - DefaultValueUpdated
            - CustomJavascriptAdded
            - CustomJavascriptRemoved
            - CustomJavascriptUpdated
            - DataMappingAdded
            - DataMappingRemoved
            - DataMappingUpdated
            - KeyUpdated
            - ValueTypeUpdated
            - TitleUpdated
            - DescriptionUpdated
            - ExternalIdUpdated
            - ReferencedAuthSlotIdUpdated
            - ReferenceToAuthSlotIdAdded
            - ReferenceToAuthSlotIdRemoved
            - SlotMadeToAllowSetCustomValueInDDL
            - SlotMadeToNotAllowSetCustomValueInDDL
            - SlotMadeDDL
            - SlotMadeNotDDL
            - SlotMadeStatic
            - SlotMadeNotStatic
            - SlotMadeRequired
            - SlotMadeNotRequired
            - SlotMadeToUseDefaultValue
            - SlotMadeToNotUseDefaultValue
            - SlotMadeHidden
            - SlotMadeNotHidden
            - DisabledResetType
            - EnabledResetType
        breakingChange:
          type: boolean
          description: Whether the change is a breaking change
      required:
        - message
        - code
        - breakingChange
    importexport.slot.ConfigSlotDDLConfigurationView:
      properties:
        allowSetCustomValue:
          type: boolean
          description: Whether the slot allows to set a custom value for a dropdown list field
      required:
        - allowSetCustomValue
    importexport.slot.CreatedConfigSlotViewForPreview:
      properties:
        key:
          type: string
          description: Project config key for which slot corresponds
        title:
          type: string
          description: Title of the slot
        description:
          type: string
          description: Description of the slot
        externalId:
          type: string
          description: Custom external identifier for the slot set in Tray UI
        valueType:
          type: string
          description: type of value that can be stored in the slot
        ddl:
          type: boolean
          description: Whether the slot is a dropdown list with dynamically loaded values
        ddlConfiguration:
          $ref: '#/components/schemas/importexport.slot.ConfigSlotDDLConfigurationView'
        required:
          type: boolean
          description: Whether the slot value is required to be collected from an end user
        useDefaultValue:
          type: boolean
          description: Whether the default value should be used if a value has not been collected from an end user
        defaultValue:
          description: A default value which can be a string, number, object, array, boolean, null
          oneOf:
            - type: string
            - type: number
            - type: object
            - type: array
            - type: boolean
        referencedAuthSlotId:
          type: string
          format: uuid
          description: ID of the auth slot that this config slot uses for DDL operations
        static:
          type: boolean
          description: Whether the slot is static and its value is shared between all solution instances
        hidden:
          type: boolean
          description: Whether the slot is hidden from an end user
        hasCustomJs:
          type: boolean
          description: Whether the slot UI has custom JavaScript logic
        hasDataMapping:
          type: boolean
          description: Whether the slot uses data mapping UI
        disabledResetType:
          type: boolean
          description: Whether the slot UI allows to set a value to null (applies for string type values)
        hasBreakingChange:
          type: boolean
          description: Informs if new slot version is introducing breaking changes
        changes:
          type: array
          description: The slot changes introduced by import
          items:
            $ref: '#/components/schemas/importexport.slot.ConfigSlotChangeView'
        recreated:
          type: boolean
          description: Informs if the slot has been recreated
        slotRecreationReasons:
          type: array
          description: Reasons why the slot has been recreated (present only if recreated is true)
          items:
            $ref: '#/components/schemas/importexport.slot.ConfigSlotRecreationReasonView'
        recreatedFromSlotId:
          type: string
          format: uuid
          description: ID of the removed slot that this slot is replacing (present only if recreated is true)
      required:
        - key
        - title
        - description
        - valueType
        - ddl
        - required
        - useDefaultValue
        - defaultValue
        - static
        - hidden
        - hasCustomJs
        - hasDataMapping
        - disabledResetType
        - hasBreakingChange
        - changes
        - recreated
    importexport.slot.ConfigSlotChangesViewForPreview:
      properties:
        created:
          type: array
          description: Slots that would be added as result of import
          items:
            $ref: '#/components/schemas/importexport.slot.CreatedConfigSlotViewForPreview'
        updated:
          type: array
          description: Slots that would be updated as result of import
          items:
            $ref: '#/components/schemas/importexport.slot.UpdatedConfigSlotView'
        removed:
          type: array
          description: Slots that would be removed as result of import
          items:
            $ref: '#/components/schemas/importexport.slot.ConfigSlotView'
      required:
        - created
        - updated
        - removed
    importexport.slot.AuthSlotView:
      properties:
        id:
          type: string
          format: uuid
          description: ID of the slot
        title:
          type: string
          description: Title of the slot
        description:
          type: string
          description: Description of the slot
        authenticationId:
          type: string
          format: uuid
          description: ID of the authentication based on which the slot has been created
        serviceId:
          type: string
          format: uuid
          description: ID of the 3rd party service for which the slot has been created
        serviceEnvironmentId:
          type: string
          format: uuid
          description: ID of the service environment for which the slot has been created
        scopes:
          type: array
          description: Authentication scopes that the slot requires
          items:
            type: string
        externalId:
          type: string
          description: Custom external identifier for the slot set in Tray UI
        static:
          type: boolean
          description: Whether the slot is static and its value is shared between all solution instances
        hidden:
          type: boolean
          description: Whether the slot is hidden from an end user
        skipCTA:
          type: boolean
          description: Whether the UI should skip call to action button for the slot
        requireUnique:
          type: boolean
          description: Whether the authentication used to fulfill the slot should be unique
      required:
        - id
        - title
        - description
        - authenticationId
        - scopes
        - static
        - hidden
        - skipCTA
        - requireUnique
    importexport.slot.UpdatedAuthSlotView:
      properties:
        id:
          type: string
          format: uuid
          description: ID of the slot
        title:
          type: string
          description: Title of the slot
        description:
          type: string
          description: Description of the slot
        authenticationId:
          type: string
          format: uuid
          description: ID of the authentication based on which the slot has been created
        serviceId:
          type: string
          format: uuid
          description: ID of the 3rd party service for which the slot has been created
        serviceEnvironmentId:
          type: string
          format: uuid
          description: ID of the service environment for which the slot has been created
        scopes:
          type: array
          description: Authentication scopes that the slot requires
          items:
            type: string
        externalId:
          type: string
          description: Custom external identifier for the slot set in Tray UI
        static:
          type: boolean
          description: Whether the slot is static and its value is shared between all solution instances
        hidden:
          type: boolean
          description: Whether the slot is hidden from an end user
        skipCTA:
          type: boolean
          description: Whether the UI should skip call to action button for the slot
        requireUnique:
          type: boolean
          description: Whether the authentication used to fulfill the slot should be unique
        hasBreakingChange:
          type: boolean
          description: Informs if new slot version is introducing breaking changes
        changes:
          type: array
          description: The slot changes introduced by import
          items:
            $ref: '#/components/schemas/importexport.slot.AuthSlotChangeView'
        previously:
          description: Slot values previously
          $ref: '#/components/schemas/importexport.slot.AuthSlotView'
      required:
        - id
        - title
        - description
        - authenticationId
        - scopes
        - static
        - hidden
        - skipCTA
        - requireUnique
        - hasBreakingChange
        - changes
        - previously
    importexport.slot.AuthSlotRecreationReasonView:
      properties:
        code:
          type: string
          enum:
            - AuthenticationIdChanged
            - ScopesIncreased
            - ScopesDecreased
            - ServiceEnvironmentChanged
        message:
          type: string
          description: Message explaining the recreation reason
      required:
        - code
        - message
    importexport.slot.AuthSlotChangeView:
      properties:
        message:
          type: string
          description: Human readable description of the change
        code:
          description: Code that can be used by clients to recognize specific changes
          type: string
          enum:
            - CreatedMandatorySlot
            - CreatedOptionalSlot
            - SlotMadeMandatory
            - SlotMadeOptional
            - ScopesIncreased
            - ScopesDecreased
            - TitleUpdated
            - DescriptionUpdated
            - ExternalIdUpdated
            - ServiceIdUpdated
            - ServiceEnvironmentIdUpdated
            - AuthenticationIdUpdated
            - SlotMadeStatic
            - SlotMadeNotStatic
            - SlotMadeHidden
            - SlotMadeNotHidden
            - SlotMadeToSkipCTA
            - SlotMadeToNotSkipCTA
            - SlotMadeToRequireUnique
            - SlotMadeToNotRequireUnique
        breakingChange:
          type: boolean
          description: Whether the change is a breaking change
      required:
        - message
        - code
        - breakingChange
    importexport.slot.CreatedAuthSlotViewForPreview:
      properties:
        authenticationId:
          type: string
          format: uuid
          description: ID of the authentication based on which the slot has been created
        title:
          type: string
          description: Title of the slot
        description:
          type: string
          description: Description of the slot
        serviceId:
          type: string
          format: uuid
          description: ID of the 3rd party service for which the slot has been created
        serviceEnvironmentId:
          type: string
          format: uuid
          description: ID of the service environment for which the slot has been created
        scopes:
          type: array
          description: Authentication scopes that the slot requires
          items:
            type: string
        externalId:
          type: string
          description: Custom external identifier for the slot set in Tray UI
        static:
          type: boolean
          description: Whether the slot is static and its value is shared between all solution instances
        hidden:
          type: boolean
          description: Whether the slot is hidden from an end user
        skipCTA:
          type: boolean
          description: Whether the UI should skip call to action button for the slot
        requireUnique:
          type: boolean
          description: Whether the authentication used to fulfill the slot should be unique
        hasBreakingChange:
          type: boolean
          description: Informs if new slot version is introducing breaking changes
        changes:
          type: array
          description: The slot changes introduced by import
          items:
            $ref: '#/components/schemas/importexport.slot.AuthSlotChangeView'
        recreated:
          type: boolean
          description: Informs if the slot has been recreated
        slotRecreationReasons:
          type: array
          description: Reasons why the slot has been recreated (present only if recreated is true)
          items:
            $ref: '#/components/schemas/importexport.slot.AuthSlotRecreationReasonView'
        recreatedFromSlotId:
          type: string
          format: uuid
          description: ID of the removed slot that this slot is replacing (present only if recreated is true)
      required:
        - authenticationId
        - title
        - description
        - scopes
        - static
        - hidden
        - skipCTA
        - requireUnique
        - hasBreakingChange
        - changes
        - recreated
    importexport.slot.AuthSlotChangesViewForPreview:
      properties:
        created:
          type: array
          description: Slots that would be added as result of import
          items:
            $ref: '#/components/schemas/importexport.slot.CreatedAuthSlotViewForPreview'
        updated:
          type: array
          description: Slots that would be updated as result of import
          items:
            $ref: '#/components/schemas/importexport.slot.UpdatedAuthSlotView'
        removed:
          type: array
          description: Slots that would be removed as result of import
          items:
            $ref: '#/components/schemas/importexport.slot.AuthSlotView'
      required:
        - created
        - updated
        - removed
    importexport.SolutionImportImpactViewForPreview:
      description: Preview of an impact of the solution import. Applies only for embedded solutions import.
      properties:
        changeType:
          type: string
          enum:
            - Created
            - Updated
            - Deleted
        breakingChanges:
          type: boolean
          description: Informs if import would introduce breaking changes to the solution
        requiresNewUserInput:
          type: boolean
          description: Informs if new version of the solution required new end user input
        requiresNewSystemInput:
          type: boolean
          description: Informs if new version of the solution required new system input
        authSlots:
          description: Auth slots changes
          $ref: '#/components/schemas/importexport.slot.AuthSlotChangesViewForPreview'
        configSlots:
          description: Config slots changes
          $ref: '#/components/schemas/importexport.slot.ConfigSlotChangesViewForPreview'
      required:
        - changeType
        - breakingChanges
        - requiresNewUserInput
        - requiresNewSystemInput
        - authSlots
        - configSlots
    importexport.RemovedWorkflowSummaryView:
      properties:
        id:
          type: string
          format: uuid
          description: ID of the removed workflow
        name:
          type: string
          description: Name of the removed workflow
      required:
        - id
        - name
    importexport.UpdatedWorkflowSummaryView:
      properties:
        id:
          type: string
          format: uuid
          description: ID of the updated workflow
        name:
          type: string
          description: Name of the updated workflow
        importedFromId:
          type: string
          format: uuid
          description: ID of the workflow from which the updated workflow has been imported
      required:
        - id
        - name
        - importedFromId
    importexport.CreatedWorkflowSummaryViewForPreview:
      properties:
        name:
          type: string
          description: Name of the created workflow
        importedFromId:
          type: string
          format: uuid
          description: ID of the workflow from which the created workflow has been imported
      required:
        - name
        - importedFromId
    importexport.WorkflowChangesViewForPreview:
      properties:
        created:
          type: array
          description: Workflows that would added as result of import
          items:
            $ref: '#/components/schemas/importexport.CreatedWorkflowSummaryViewForPreview'
        updated:
          type: array
          description: Workflows that would updated as result of import
          items:
            $ref: '#/components/schemas/importexport.UpdatedWorkflowSummaryView'
        removed:
          type: array
          description: Workflows that would removed as result of import
          items:
            $ref: '#/components/schemas/importexport.RemovedWorkflowSummaryView'
      required:
        - created
        - updated
        - removed
    importexport.ModifiedProjectConfigItemView:
      properties:
        key:
          type: string
          description: Project config key for which slot corresponds
        oldValue:
          description: A JSON value which can be a string, number, object, array, boolean, null
          oneOf:
            - type: string
            - type: number
            - type: object
            - type: array
            - type: boolean
        newValue:
          description: A JSON value which can be a string, number, object, array, boolean, null
          oneOf:
            - type: string
            - type: number
            - type: object
            - type: array
            - type: boolean
      required:
        - key
        - oldValue
        - newValue
    importexport.ProjectConfigItemView:
      properties:
        key:
          type: string
          description: Project config key for which slot corresponds
        value:
          description: A JSON value which can be a string, number, object, array, boolean, null
          oneOf:
            - type: string
            - type: number
            - type: object
            - type: array
            - type: boolean
      required:
        - key
        - value
    importexport.ProjectConfigChangesView:
      properties:
        created:
          type: array
          description: Added project configuration items
          items:
            $ref: '#/components/schemas/importexport.ProjectConfigItemView'
        updated:
          type: array
          description: Updated project configuration items
          items:
            $ref: '#/components/schemas/importexport.ModifiedProjectConfigItemView'
        removed:
          type: array
          description: Removed project configuration items
          items:
            $ref: '#/components/schemas/importexport.ProjectConfigItemView'
      required:
        - created
        - updated
        - removed
    importexport.ProjectImportImpactViewForPreview:
      description: Preview of an impact of the project import.
      properties:
        config:
          description: Project configuration changes
          $ref: '#/components/schemas/importexport.ProjectConfigChangesView'
        workflows:
          description: Project workflows changes
          $ref: '#/components/schemas/importexport.WorkflowChangesViewForPreview'
      required:
        - config
        - workflows
    importexport.ImportedFromMetadataView:
      properties:
        projectId:
          type: string
          format: uuid
        projectVersion:
          type: string
        projectName:
          type: string
      required:
        - projectId
        - projectName
    importexport.ImportMetadataView:
      properties:
        importedFrom:
          $ref: '#/components/schemas/importexport.ImportedFromMetadataView'
        projectId:
          type: string
          format: uuid
        projectName:
          type: string
      required:
        - importedFrom
        - projectId
        - projectName
    importexport.ProjectImportPreviewResponse:
      properties:
        importMetadata:
          description: Metadata of the import
          $ref: '#/components/schemas/importexport.ImportMetadataView'
        projectImpact:
          description: Preview of an impact of the import on the project
          $ref: '#/components/schemas/importexport.ProjectImportImpactViewForPreview'
        solutionImpact:
          description: Preview of an impact of the import on the solution (present only if importing a project with embedded solution)
          $ref: '#/components/schemas/importexport.SolutionImportImpactViewForPreview'
      required:
        - importMetadata
        - projectImpact
    importexport.AuthImportInput:
      properties:
        authExportId:
          type: string
          description: Export identifier of a source authentication
        authenticationId:
          type: string
          format: uuid
          description: ID of the authentication selected to be used for authExportId during the project import
      required:
        - authExportId
        - authenticationId
    importexport.ProjectImportInput:
      properties:
        authenticationResolution:
          type: array
          description: Mapping of exported authentications to the authentications available for the target project
          items:
            $ref: '#/components/schemas/importexport.AuthImportInput'
        configOverride:
          type: object
          description: A JSON object that should override existing project configuration. The object must contain the same set of keys and types of values as the exported project configuration. Only config values are allowed to be overriden.
        exportedProjectJson:
          type: object
          description: A json document representing the exported project
        connectorMapping:
          type: array
          description: Mapping of connectors that should be used during the project import. Allows to map connectors from the exported project to the connectors in the target project.
          items:
            $ref: '#/components/schemas/importexport.ConnectorMappingInput'
        serviceMapping:
          type: array
          description: Mapping of services that should be used during the project import. Allows to map services from the exported project to the services in the target project.
          items:
            $ref: '#/components/schemas/importexport.ServiceMappingInput'
      required:
        - authenticationResolution
        - exportedProjectJson
        - connectorMapping
        - serviceMapping
    importexport.ServiceEnvironmentView:
      properties:
        id:
          type: string
          format: uuid
          description: ID of the service environment
      required:
        - id
    importexport.ResolvedAuthenticationRequirementView:
      properties:
        id:
          type: string
          format: uuid
          description: ID of the resolved authentication
        title:
          type: string
          description: Title of the resolved authentication
        service:
          description: Object representing the 3rd party service related to resolved authentication
          $ref: '#/components/schemas/importexport.ServiceNameAndVersionView'
        serviceEnvironment:
          description: Object representing the service environment related to resolved authentication
          $ref: '#/components/schemas/importexport.ServiceEnvironmentView'
        scopes:
          type: array
          description: Scopes of the resolved authentication
          items:
            type: string
      required:
        - id
        - title
        - service
        - serviceEnvironment
        - scopes
    importexport.ServiceNameAndVersionView:
      properties:
        name:
          type: string
          description: Name of the entity in Tray system representing 3rd party service
        version:
          type: string
          description: Version of the service
      required:
        - name
        - version
    importexport.AuthenticationRequirementView:
      properties:
        authExportId:
          type: string
          description: Export identifier of a source authentication
        title:
          type: string
          description: Title of the authentication used in exported project
        service:
          description: Object representing the 3rd party service related to the authentication
          $ref: '#/components/schemas/importexport.ServiceNameAndVersionView'
        scopes:
          type: array
          description: Required authentication scopes
          items:
            type: string
        resolvedAuthentication:
          description: List of resolved authentications that can be used during the project import
          $ref: '#/components/schemas/importexport.ResolvedAuthenticationRequirementView'
      required:
        - authExportId
        - title
        - service
        - scopes
    importexport.ConfigSpecificationView:
      properties:
        source:
          type: object
          description: A JSON object which can contain key-value pairs of JSON values (exported project configuration)
        target:
          type: object
          description: A JSON object which can contain key-value pairs of JSON values (current target project configuration)
      required:
        - source
        - target
    importexport.PrepareProjectImportResponse:
      properties:
        unresolvedAuthentications:
          type: boolean
          description: Whether there are unresolved authentications
        newConfigKeys:
          type: boolean
          description: Whether there are new config keys
        config:
          description: Exported project configuration and current target project configurations
          $ref: '#/components/schemas/importexport.ConfigSpecificationView'
        authenticationsRequirements:
          type: array
          description: List of requirements for authentications required by the project import
          items:
            $ref: '#/components/schemas/importexport.AuthenticationRequirementView'
      required:
        - unresolvedAuthentications
        - newConfigKeys
        - config
        - authenticationsRequirements
    importexport.TargetServiceInput:
      properties:
        name:
          type: string
          description: Name of the entity in Tray system representing 3rd party service
        version:
          type: string
          description: 'Version of the service. For example: "1", "2", "3"'
      required:
        - name
        - version
    importexport.SourceServiceInput:
      properties:
        name:
          type: string
          description: Name of the entity in Tray system representing 3rd party service
        version:
          type: string
          description: 'Version of the service. For example: "1", "2", "3"'
      required:
        - name
        - version
    importexport.ServiceMappingInput:
      properties:
        from:
          description: Source service that should be mapped to the target service
          $ref: '#/components/schemas/importexport.SourceServiceInput'
        to:
          description: Target service that should be used during the project import
          $ref: '#/components/schemas/importexport.TargetServiceInput'
      required:
        - from
        - to
    importexport.TargetConnectorInput:
      properties:
        name:
          type: string
          description: Name of the connector
        version:
          type: string
          description: 'Version of the connector. For example: "1.0", "1.1", "1.2"'
      required:
        - name
        - version
    importexport.SourceConnectorInput:
      properties:
        name:
          type: string
          description: Name of the connector
        version:
          type: string
          description: 'Version of the connector. For example: "1.0", "1.1", "1.2"'
      required:
        - name
        - version
    importexport.ConnectorMappingInput:
      properties:
        from:
          description: Source connector that should be mapped to the target connector
          $ref: '#/components/schemas/importexport.SourceConnectorInput'
        to:
          description: Target connector that should be used during the project import
          $ref: '#/components/schemas/importexport.TargetConnectorInput'
      required:
        - from
        - to
    importexport.PrepareProjectImportInput:
      properties:
        exportedProjectJson:
          type: object
          description: A json document representing the exported project
        connectorMapping:
          type: array
          description: Mapping of connectors that should be used during the project import. Allows to map connectors from the exported project to the connectors in the target project.
          items:
            $ref: '#/components/schemas/importexport.ConnectorMappingInput'
        serviceMapping:
          type: array
          description: Mapping of services that should be used during the project import. Allows to map services from the exported project to the services in the target project.
          items:
            $ref: '#/components/schemas/importexport.ServiceMappingInput'
      required:
        - exportedProjectJson
        - connectorMapping
        - serviceMapping
    PageInfoResponse:
      properties:
        startCursor:
          type: string
          description: pagination parameter that can be passed in `cursor` query parameter
        endCursor:
          type: string
          description: pagination parameter that can be passed in `cursor` query parameter
        hasNextPage:
          type: boolean
          description: indicates the existence of another page of response that can be obtained by passing endCursor value in `cursor` query parameter
        hasPreviousPage:
          type: boolean
          description: indicates the existence of another page of response that can be obtained by passing startCursor value in `cursor` query parameter
      required:
        - hasNextPage
        - hasPreviousPage
    ProjectVersionResponse:
      properties:
        projectId:
          type: string
          format: uuid
          description: ID of the project
        versionNumber:
          type: string
          description: Version number of the project version
        title:
          type: string
          description: Title of the project version
        description:
          type: string
          description: Description of the project version
        created:
          type: string
          format: date-time
          description: Date and time when the project version was created ( example 2024-05-25T18:56:09Z )
        creator:
          type: string
          description: ID of the user who created the project version
      required:
        - projectId
        - versionNumber
        - title
        - description
        - created
        - creator
    PageResponse-ProjectVersionResponse:
      properties:
        elements:
          type: array
          description: List of project versions, based on request criteria
          items:
            $ref: '#/components/schemas/ProjectVersionResponse'
        pageInfo:
          description: Information about the current page. Allows to navigate through the paginated results.
          $ref: '#/components/schemas/PageInfoResponse'
      required:
        - elements
        - pageInfo
    CreateProjectVersionInput:
      properties:
        title:
          type: string
          description: Title of the project version that is going to be created
        description:
          type: string
          description: Description of the project version that is going to be created
      required:
        - title
  #####################################################################################################################
  # SDLC COMPONENTS END ***********************************************************************************************
  #######################################################################################################################

  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

security:
  - bearerAuth: []

servers:
  - url: https://api.tray.io
    description: US
  - url: https://api.eu1.tray.io
    description: EU
  - url: https://api.ap1.tray.io
    description: APAC

tags:
  - name: overview
    x-displayName: Overview
    description:
      $ref: descriptions/trayapi/tags/overview.md
  - name: authentication
    x-displayName: How to Authenticate
    description:
      $ref: descriptions/trayapi/tags/howToAuth.md
  - name: rate-limits
    x-displayName: Rate limits
    description:
      $ref: descriptions/trayapi/tags/rateLimits.md
  - name: collection
    x-displayName: Use our Postman collection
    description:
      $ref: descriptions/trayapi/tags/howToUseApiCollection.md
  - name: regionality
    x-displayName: Regionality
    description:
      $ref: descriptions/trayapi/tags/regionality.md
  - name: connectors
    x-displayName: Connectors
    description:
      $ref: descriptions/trayapi/tags/connectors.md
  - name: authentications
    x-displayName: Authentications
    description:
      $ref: descriptions/trayapi/tags/authentications.md
  - name: projects
    x-displayName: Projects
    description:
      $ref: descriptions/trayapi/tags/projects.md
  - name: solutions
    x-displayName: Solutions
    description:
      $ref: descriptions/trayapi/tags/solutions.md
  - name: triggers
    x-displayName: Triggers
    description:
      $ref: descriptions/trayapi/tags/triggers.md
  - name: workspaces
    x-displayName: Workspaces
    description:
      $ref: descriptions/trayapi/tags/workspaces.md
  - name: users
    x-displayName: Users
    description:
      $ref: descriptions/trayapi/tags/users.md
  - name: deployments
    x-displayName: Deployments
    description:
      $ref: descriptions/trayapi/tags/deployments.md
  - name: permissions
    x-displayName: Permissions
    description:
      $ref: descriptions/trayapi/tags/permissions.md
  - name: agent-groups
    x-displayName: Agent Groups
    description:
      $ref: descriptions/trayapi/tags/agent-groups.md
  - name: agent-instances
    x-displayName: Agent Instances
    description:
      $ref: descriptions/trayapi/tags/agent-instances.md

x-tagGroups:
  - name: Introduction
    tags:
      - overview
      - authentication
      - regionality
      - collection
      - rate-limits
  - name: Core
    tags:
      - authentications
      - connectors
      - triggers
      - workspaces
      - users
      - projects
      - solutions
  - name: CDK
    tags:
      - deployments
      - permissions
  - name: On Premise
    tags:
      - agent-groups
      - agent-instances
