# Process Traces

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /be/v1/trigger:
    post:
      summary: Process Traces
      deprecated: false
      description: >-
        This endpoint triggers traces processing for a given App. Traces
        collected from the users will be used to determine whether a new DxF
        image should be build by checking whether the quality or the preload has
        improved for your users.


        ### Required Permissions


        `trigger.create`


        See [Roles](https://edge.api.cloud.rockitplay.com/roles-3618377f0.md)
        for more details.
      tags:
        - ROCKIT Edge - Backend API/Triggers
      parameters:
        - name: Authorization
          in: header
          description: >-
            Use the access token obtained from [`POST
            /be/v1/login`](https://edge.api.cloud.rockitplay.com/user-login-org-11611254e0.md)
            or [`POST
            /be/v1/refresh`](https://edge.api.cloud.rockitplay.com/refresh-11630082e0.md)
            as Bearer token. <br>Mutually excluded with `x-rockit-api-key`.
          required: true
          example: Bearer {{_edge_org_admin_access_token}}
          schema:
            type: string
        - name: x-rockit-tenant
          in: header
          description: >
            Unique and immutable tenancy identifier obtained from the ROCKIT
            Edge administrator. <br>Requires `x-rockit-username`,
            `x-rockit-orgname` and `x-rockit-api-key`.
          required: true
          example: '{{EDGE_TENANT_NAME}}'
          schema:
            type: string
        - name: x-rockit-orgname
          in: header
          description: >
            Unique and immutable organization identifier obtained from the
            ROCKIT Edge administrator. <br>Requires `x-rockit-tenant`,
            `x-rockit-username` and `x-rockit-api-key`.
          required: true
          example: '{{EDGE_ORG_NAME}}'
          schema:
            type: string
        - name: x-rockit-username
          in: header
          description: >
            Unique and immutable username which is associated with the apikey.
            <br>Requires `x-rockit-tenant`, `x-rockit-orgname` and
            `x-rockit-api-key`.
          required: true
          example: adminPrincipal
          schema:
            type: string
        - name: x-rockit-api-key
          in: header
          description: >-
            Unique and immutable apikey which is associated with an machine
            user. <br>Mutually excluded with `Authorization` header. Requires
            `x-rockit-tenant`, `x-rockit-username` and `x-rockit-orgname`.
          required: true
          example: '{{_adminPrincipal_apiKey}}'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                traces:
                  type: object
                  properties:
                    appName:
                      type: string
                      x-apidog-mock: '{{appName}}'
                      description: Identifier of the App
                    reset:
                      type: boolean
                      x-apidog-mock: 'false'
                      description: >-
                        Reset the training state of the App prior to trace
                        processing
                  x-apidog-orders:
                    - appName
                    - reset
                  description: >-
                    Type of event, here: 'traces' for triggering trace
                    processing
                  required:
                    - appName
                  x-apidog-ignore-properties: []
              required:
                - traces
              x-apidog-orders:
                - traces
              x-apidog-ignore-properties: []
            example:
              traces:
                appName: '{{appName}}'
                reset: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
                x-apidog-orders: []
                x-apidog-ignore-properties: []
              examples:
                '1':
                  summary: Success
                  value:
                    statusCode: 423
                    error: locked
                    status: failed
                    message: The app has is currently processing other tasks
                    detail: the app cannot be locked
                '2':
                  summary: Example 1
                  value:
                    statusCode: 423
                    error: locked
                    status: failed
                    message: The app has is currently processing other tasks
          headers: {}
          x-apidog-name: Success
        '400':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      Reflects that the creation failed due to one or more
                      invalid or missing parameters in the request.
                  error:
                    type: string
                    description: Contains an error identifier.  (e.g., "invalid-param")
                  message:
                    type: string
                    description: >-
                      Explains the nature of the invalid input (for example,
                      "name invalid").
                  detail:
                    type: string
                    description: >-
                      Offers further context on the error. (e.g., expected
                      pattern for the organization name)
                x-apidog-orders:
                  - 01JQNHR7YZQ3Y9J78KHFZSMDWR
                required:
                  - status
                  - error
                  - message
                  - detail
                x-apidog-refs:
                  01JQNHR7YZQ3Y9J78KHFZSMDWR:
                    $ref: '#/components/schemas/Invalid%20Param'
                x-apidog-ignore-properties:
                  - status
                  - error
                  - message
                  - detail
          headers: {}
          x-apidog-name: Invalid Param
        '401':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      Indicates that the organization creation request was
                      rejected because of authentication problems.
                  error:
                    type: string
                    description: Contains an error identifier. (e.g."unauthorized")
                  message:
                    type: string
                    description: >-
                      Provides details such as "invalid token" to help diagnose
                      the failure.
                x-apidog-orders:
                  - 01JQNHQNMNPHTD5A16568GF12M
                required:
                  - status
                  - error
                  - message
                x-apidog-refs:
                  01JQNHQNMNPHTD5A16568GF12M:
                    $ref: '#/components/schemas/unauthorized'
                x-apidog-ignore-properties:
                  - status
                  - error
                  - message
          headers: {}
          x-apidog-name: Unauthorized
        '409':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: >-
                      Indicates the HTTP status code, which is 423 for a locked
                      resource or operation.
                  error:
                    type: string
                    description: Contains a short error identifier, such as "locked".
                  status:
                    type: string
                    description: >-
                      Describes the high-level status of the request, such as
                      "failed".
                  message:
                    type: string
                    description: >-
                      Provides a human-readable explanation for the lock, such
                      as "The app has is currently processing other tasks."
                required:
                  - statusCode
                  - error
                  - status
                  - message
                x-apidog-orders:
                  - statusCode
                  - error
                  - status
                  - message
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Item Locked
      security: []
      x-apidog-folder: ROCKIT Edge - Backend API/Triggers
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/732774/apis/api-12373257-run
components:
  schemas:
    unauthorized:
      type: object
      properties:
        status:
          type: string
          description: >-
            Indicates that the organization creation request was rejected
            because of authentication problems.
        error:
          type: string
          description: Contains an error identifier. (e.g."unauthorized")
        message:
          type: string
          description: >-
            Provides details such as "invalid token" to help diagnose the
            failure.
      required:
        - status
        - error
        - message
      x-apidog-orders:
        - status
        - error
        - message
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Invalid Param:
      type: object
      properties:
        status:
          type: string
          description: >-
            Reflects that the creation failed due to one or more invalid or
            missing parameters in the request.
        error:
          type: string
          description: Contains an error identifier.  (e.g., "invalid-param")
        message:
          type: string
          description: >-
            Explains the nature of the invalid input (for example, "name
            invalid").
        detail:
          type: string
          description: >-
            Offers further context on the error. (e.g., expected pattern for the
            organization name)
      required:
        - status
        - error
        - message
        - detail
      x-apidog-orders:
        - status
        - error
        - message
        - detail
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    Bearer token:
      type: bearer
      scheme: bearer
      description: >-
        Enter your Access Token. You can obtain this by calling the /be/v1/login
        endpoint. Use the Refresh token to get a new Access token when it
        expires.
servers:
  - url: https://Example-Server.com
    description: Default
security: []

```
