---
openapi: 3.0.1
info:
  title: Integration Hub API 3.0
  version: '3.0'
  description: This API allows for the integration and management of files within
    the Adra Suite, supporting both upload and download operations.
  contact:
    name: API Support
    url: https://success.adra.com/s/
    email: support@adra.com
  license:
    name: Propietary License
    url: https://www.trintech.com/terms-and-conditions/adra/
  x-feedbackLink:
    url: https://success.adra.com/s/resources/ideas
    label: Give Feedback
servers:
- url: https://integrationhub.adra.com
  description: Production server
- url: https://integrationhub.adrastage.com
  description: Stage server
- url: https://integrationhub.adratest.com
  description: Test server
- url: https://integrationhub.adradev.com
  description: Dev server
tags:
- name: Files
  description: Operations related to file management in the Adra Suite.
externalDocs:
  description: Adra Success Center
  url: https://success.adra.com/s/article/Setup-User-Access-Page
paths:
  "/api/v3.0/{engagementSid}/files/{inboundFileCategory}/{suggestedFileName}":
    post:
      tags:
      - Files
      summary: Data upload endpoint for inbound files to Adra Suite
      description: |-
        Upload a file to the Integration Hub for processing in Adra Suite. This endpoint supports various file types depending on the inboundFileCategory.

        ### File Size Limits
        - Maximum file size: 100 MB

        ### Required Headers
        - `Authorization`: Bearer token for authentication
        - `User-Agent`: Client identifier
        - `Content-Length`: File size in bytes

        ### Optional Headers
        - `Content-Type`: File MIME type
        - `Last-Modified`: File's last modification timestamp

        ### Processing
        After upload, the file will be:
        1. Validated for format and content
        2. Queued for processing
        3. Processed according to the inboundFileCategory

        Use the status endpoint to track the processing status using the returned uniqueFileName.
      operationId: UploadInboundFile
      parameters:
      - name: engagementSid
        in: path
        description: Short identifier for engagement (as in URLs)
        required: true
        schema:
          type: string
      - name: inboundFileCategory
        in: path
        required: true
        schema:
          "$ref": "#/components/schemas/InboundFileCategory"
      - name: suggestedFileName
        in: path
        description: The name of the file with extension. Must not exceed 380 characters.
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        description: A string that enables identifying the client. Logic-Apps, Boomi,
          Postman, and other integration tools add this automatically. (required)
        required: true
        schema:
          type: string
      - name: Content-Length
        in: header
        description: The number of bytes for the file being uploaded (required)
        required: true
        schema:
          type: integer
          format: int64
      - name: X-State
        in: header
        description: Optional HTTP header to denote state of the file.
        schema:
          type: string
      - name: X-Gw-Stloc-Hint
        in: header
        description: 'Optional HTTP header to optimize request routing and reduce
          latency. Possible values: EUWE-01 (West Europe), AUEA-01 (Australia East),
          USEA-01 (East US), NO01 (Norway East).'
        schema:
          type: string
      - name: Content-Type
        in: header
        description: Upload file's content-type (optional)
        schema:
          type: string
      - name: Last-Modified
        in: header
        description: Upload file's last modified date (optional)
        schema:
          type: string
          format: date-time
      requestBody:
        content:
          "*/*":
            schema:
              type: string
              format: binary
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/FileUploadResponse"
        '400':
          description: 'Bad Request: see problem details for more information'
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
        '401':
          description: 'Unauthorized: Missing an authorization header or token, or
            the token has expired'
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
        '403':
          description: 'Forbidden: You don''t have access to the engagement, the engagement
            doesn''t have IH or you don''t have IH access on the engagement, or the
            client is trying to access an unauthorized tenant resource'
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
              examples:
                noAccess:
                  summary: No access to engagement
                  value:
                    type: https://adra.com/errors/forbidden
                    title: Forbidden
                    status: 403
                    detail: You don't have access to the engagement, the engagement
                      doesn't have IH or you don't have IH access on the engagement
                unauthorizedTenant:
                  summary: Unauthorized tenant access
                  value:
                    type: https://adra.com/errors/forbidden
                    title: Forbidden
                    status: 403
                    detail: The client is trying to access an unauthorized tenant
                      resource
        '411':
          description: 'Length Required: The file length information needs to be provided'
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
        '413':
          description: 'Payload Too Large: The file is too big, needs to be under
            100 MB'
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
        '500':
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
      security:
      - adra_personal_access_token:
        - integrationhub_api.upload
        adra_oauth_code_pkce:
        - integrationhub_api.upload
        adra_oauth_client_cred:
        - integrationhub_api.upload
      x-codeSamples:
      - lang: curl
        source: |-
          curl --http1.1 -X POST \
            'https://integrationhub.adra.com/api/v3.0/{engagementSid}/files/{inboundFileCategory}/example.xlsx' \
            -H 'Authorization: Bearer YOUR_TOKEN' \
            -H 'User-Agent: MyAgent/1.1' \
            -H 'Content-Type: */*' \
            -H 'Content-Length: 1234' \
            --data-binary '@/path/to/your/file.xlsx' \
            -k \
            -v
      - lang: python
        source: |-
          import requests

          url = 'https://integrationhub.adra.com/api/v3.0/{engagementSid}/files/{inboundFileCategory}/example.xlsx'
          headers = {
              'Authorization': 'Bearer YOUR_TOKEN',
              'User-Agent': 'MyAgent/1.1',
              'Content-Type': '*/*'
          }

          with open('/path/to/your/file.xlsx', 'rb') as f:
              response = requests.post(url, headers=headers, data=f, verify=False)

          print(response.json())
      - lang: csharp
        label: C# HttpClient
        source: |-
          using System.Net.Http.Headers;
          using System.Text.Json;
          using IdentityModel.Client;

          var baseAddress = "https://integrationhub.adra.com/api/v3.0/";
          var engagementSid = "YOUR_ENGAGEMENT_SID";
          var suggestedFileName = "YOUR_FILE_NAME.txt";
          var fileCategory = "BalancerBalanceUpload";
          var mediaTypeHeaderValue = "text/plain";
          var uploadServiceUrl = "{engagementSid}/files/{fileCategory}/{fileName}";
          var token = "YOUR_TOKEN";
          var filePath = Path.Combine("TestData", suggestedFileName);

          using HttpClient httpClient = new()
          {
              BaseAddress = new Uri(baseAddress)
          };
          httpClient.SetBearerToken(token);
          httpClient.DefaultRequestHeaders.Add("User-Agent", "integrationtest.agent");

          var uploadUrl = uploadServiceUrl
              .Replace("{engagementSid}", engagementSid, StringComparison.InvariantCulture)
              .Replace("{fileCategory}", fileCategory, StringComparison.InvariantCulture)
              .Replace("{fileName}", suggestedFileName, StringComparison.InvariantCulture);

          Stream fileStream = new FileStream(filePath, FileMode.Open);
          using var streamContent = new StreamContent(fileStream);
          streamContent.Headers.ContentType = new MediaTypeHeaderValue(mediaTypeHeaderValue);

          HttpResponseMessage response = await httpClient.PostAsync(uploadUrl, streamContent);
          response.EnsureSuccessStatusCode();
          var responseString = await response.Content.ReadAsStringAsync();
          Console.WriteLine(responseString);
      - lang: powershell
        label: PowerShell
        source: |-
          Invoke-WebRequest -Method 'POST' `
            -Uri 'https://integrationhub.adra.com/api/v3.0/{engagementSid}/files/{inboundFileCategory}/example.xlsx' `
            -Headers @{
              'Authorization' = 'Bearer YOUR_TOKEN'
              'User-Agent' = 'MyAgent/1.1'
              'Content-Type' = '*/*'
            } `
            -InFile '/path/to/your/file.xlsx' `
            -Verbose
  "/api/v3.0/{engagementSid}/files/{outboundFileCategory}/{uniqueFileName}":
    get:
      tags:
      - Files
      summary: Data download endpoint for outbound files
      description: "Download a file from Integration Hub. This endpoint allows you
        to retrieve files that have been created by Adra.\n\n### Response Format\n-
        Returns file as binary stream\n- Content-Type matches the original file format\n-
        Headers include:\n  - `Content-Length`: File size in bytes\n  - `Content-Type`:
        File MIME type\n  - `Last-Modified`: Timestamp of last modification\n  - `ETag`:
        File version identifier\n\n### Common Use Cases\n1. Downloading created reports\n2.
        Retrieving journal entries \n\n### Error Handling\n- 404: File not found or
        deleted\n- 403: Insufficient permissions\n- 401: Invalid or expired token\n\n###
        Best Practices\n- Cache files using ETag header\n- Implement retry logic with
        exponential backoff\n- Handle large files with streaming"
      operationId: GetFileStream
      parameters:
      - name: engagementSid
        in: path
        description: Short identifier for engagement (as in URLs)
        required: true
        schema:
          type: string
      - name: outboundFileCategory
        in: path
        required: true
        schema:
          "$ref": "#/components/schemas/OutboundFileCategory"
      - name: uniqueFileName
        in: path
        description: The name of the file
        required: true
        schema:
          type: string
      - name: X-Gw-Stloc-Hint
        in: header
        description: 'Optional HTTP header to optimize request routing and reduce
          latency. Possible values: EUWE-01 (West Europe), AUEA-01 (Australia East),
          USEA-01 (East US), NO01 (Norway East).'
        schema:
          type: string
      - name: If-Modified-Since
        in: header
        description: Browser cache instruction (optional)
        schema:
          type: string
          format: date-time
      - name: If-None-Match
        in: header
        description: Browser cache instruction (optional).
        schema:
          type: string
      - name: If-Unmodified-Since
        in: header
        description: Browser cache instruction (optional).
        schema:
          type: string
          format: date-time
      - name: If-Match
        in: header
        description: Browser cache instruction (optional).
        schema:
          type: string
      responses:
        '200':
          description: Success
          headers:
            ETag:
              description: The file's ETag (hash)
              schema:
                type: string
            Last-Modified:
              description: The file's modified date
              schema:
                type: string
                format: date-time
          content:
            "*/*":
              schema:
                type: string
                format: binary
        '304':
          description: Not modified
          headers:
            ETag:
              description: The file's ETag (hash)
              schema:
                type: string
            Last-Modified:
              description: The file's modified date
              schema:
                type: string
                format: date-time
        '400':
          description: 'Bad Request: see problem details for more information'
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
        '401':
          description: 'Unauthorized: Missing an authorization header or token, or
            the token has expired'
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
        '403':
          description: 'Forbidden: You don''t have access to the engagement, the engagement
            doesn''t have IH or you don''t have IH access on the engagement, or the
            client is trying to access an unauthorized tenant resource'
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
              examples:
                noAccess:
                  summary: No access to engagement
                  value:
                    type: https://adra.com/errors/forbidden
                    title: Forbidden
                    status: 403
                    detail: You don't have access to the engagement, the engagement
                      doesn't have IH or you don't have IH access on the engagement
                unauthorizedTenant:
                  summary: Unauthorized tenant access
                  value:
                    type: https://adra.com/errors/forbidden
                    title: Forbidden
                    status: 403
                    detail: The client is trying to access an unauthorized tenant
                      resource
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
        '412':
          description: 'Precondition Failed: Access control list (ACL) validation
            failed'
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
        '500':
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
      security:
      - adra_personal_access_token:
        - integrationhub_api.download
        adra_oauth_code_pkce:
        - integrationhub_api.download
        adra_oauth_client_cred:
        - integrationhub_api.download
  "/api/v3.0/{engagementSid}/files/{inboundFileCategory}/{uniqueFileName}/status":
    get:
      tags:
      - Files
      summary: Endpoint for getting the status for inbound files
      description: |-
        Check the processing status of a file previously uploaded to Integration Hub. This endpoint allows you to track the progress of file processing.

        ### Status Flow
        Files progress through the following states:
        1. `Receiving`: Initial upload in progress
        2. `Queued`: File received and waiting for processing
        3. `Processing`: File is being validated and processed
        4. `WaitingInteraction`: Processing paused, waiting for user input
        5. `PartiallySucceeded`: Some records processed with errors
        6. `Succeeded`: All records processed successfully
        7. `Failed`: Processing failed
        8. `Discarded`: File processing was cancelled or discarded
        9. `Unknown`: Status cannot be determined

        ### Response Details
        Returns a JSON object containing:
        - `uniqueFileName`: The file identifier
        - `status`: Current processing state
        - `submittedTime`: When the file was uploaded
        - `finishedTime`: When processing completed (null if not finished)

        ### Common Use Cases
        - Polling for completion status
        - Error checking before retry
        - Monitoring processing progress

        ### Best Practices
        - Poll at reasonable intervals
        - Implement exponential backoff
        - Handle all possible status values

        ### Error Responses
        - 404: File not found
        - 403: Insufficient permissions
        - 401: Invalid authentication

        Note: Files are typically processed within 5 minutes, depending on size and complexity.
      operationId: GetInboundFileStatus
      parameters:
      - name: engagementSid
        in: path
        description: Short identifier for engagement (as in URLs)
        required: true
        schema:
          type: string
      - name: inboundFileCategory
        in: path
        required: true
        schema:
          "$ref": "#/components/schemas/InboundFileCategory"
      - name: uniqueFileName
        in: path
        description: The name of the file
        required: true
        schema:
          type: string
      - name: X-Gw-Stloc-Hint
        in: header
        description: 'Optional HTTP header to optimize request routing and reduce
          latency. Possible values: EUWE-01 (West Europe), AUEA-01 (Australia East),
          USEA-01 (East US), NO01 (Norway East).'
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/FileStatusResponse"
        '400':
          description: 'Bad Request: see problem details for more information'
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
        '401':
          description: 'Unauthorized: Missing an authorization header or token, or
            the token has expired'
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
        '403':
          description: 'Forbidden: You don''t have access to the engagement, the engagement
            doesn''t have IH or you don''t have IH access on the engagement'
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
        '500':
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
      security:
      - adra_personal_access_token:
        - integrationhub_api.upload
        adra_oauth_code_pkce:
        - integrationhub_api.upload
        adra_oauth_client_cred:
        - integrationhub_api.upload
webhooks:
  BalancerBalanceJobCompletedEvent:
    post:
      tags:
      - Job Completed
      x-state: Technical Preview
      summary: Receive Balancer Balance Job Completed Event
      description: Webhook event triggered when a Balancer Balance job has completed
        processing
      operationId: ReceiveBalancerBalanceJobCompletedEvent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/BalancerBalanceJobCompletedEvent"
      responses:
        '200':
          description: Webhook received successfully
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
  BalancerTransactionJobCompletedEvent:
    post:
      tags:
      - Job Completed
      x-state: Technical Preview
      summary: Receive Balancer Transaction Job Completed Event
      description: Webhook event triggered when a Balancer Transaction job has completed
        processing
      operationId: ReceiveBalancerTransactionJobCompletedEvent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/BalancerTransactionJobCompletedEvent"
      responses:
        '200':
          description: Webhook received successfully
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
  LegalEntityJobCompletedEvent:
    post:
      tags:
      - Job Completed
      summary: Receive Legal Entity Job Completed Event
      description: Webhook event triggered when a Legal Entity job has completed processing
      operationId: ReceiveLegalEntityJobCompletedEvent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/LegalEntityJobCompletedEvent"
      responses:
        '200':
          description: Webhook received successfully
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
  MatcherTransactionJobCompletedEvent:
    post:
      tags:
      - Job Completed
      summary: Receive Matcher Transaction Job Completed Event
      description: Webhook event triggered when a Matcher Transaction job has completed
        processing
      operationId: ReceiveMatcherTransactionJobCompletedEvent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/MatcherTransactionJobCompletedEvent"
      responses:
        '200':
          description: Webhook received successfully
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
  MatcherReportPublishedEvent:
    post:
      tags:
      - Outbound File Available
      summary: Receive Matcher Report Published Event
      description: Webhook event triggered when a matcher report has been published
      operationId: ReceiveMatcherReportPublishedEvent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/MatcherReportPublishedEvent"
      responses:
        '200':
          description: Webhook received successfully
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                "$ref": "#/components/schemas/ProblemDetails"
components:
  schemas:
    FileStatusResponse:
      required:
      - uniqueFileName
      - status
      - submittedTime
      type: object
      properties:
        uniqueFileName:
          type: string
        status:
          "$ref": "#/components/schemas/JobStatus"
        submittedTime:
          type: string
          format: date-time
        finishedTime:
          type: string
          format: date-time
          nullable: true
      additionalProperties: false
    FileUploadResponse:
      required:
      - uniqueFileName
      type: object
      properties:
        uniqueFileName:
          type: string
      additionalProperties: false
      example:
        uniqueFileName: uploaded_file_2024timestamp1234.csv
    InboundFileCategory:
      enum:
      - BalancerBalanceUpload
      - BalancerTransactionsUpload
      - MatcherTransactionUpload
      - LegalEntityUpload
      type: string
      description: Specifies the category of the inbound file. Each category corresponds
        to a specific type of data being uploaded.
    JobStatus:
      enum:
      - Receiving
      - Queued
      - Processing
      - PartiallySucceeded
      - Succeeded
      - Failed
      - Rejected
      - WaitingInteraction
      - Discarded
      - Deleted
      - Unknown
      type: string
    OutboundFileCategory:
      enum:
      - MatcherReport
      type: string
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: false
    LegalEntityJobCompletedEvent:
      type: object
      properties:
        EventId:
          type: string
          format: uuid
          description: Unique Event Identifier
        CorrelationId:
          type: string
          format: uuid
          description: Correlation identifier
        EventType:
          type: string
          description: Event type
        EventMessage:
          type: string
          description: Human-readable event description
        CreatedDate:
          type: string
          format: date-time
          description: Time of the event
        Payload:
          "$ref": "#/components/schemas/LegalEntityJobCompleted"
      required:
      - EventId
      - EventType
      - EventMessage
      - CreatedDate
      - Payload
    LegalEntityJobCompleted:
      type: object
      properties:
        Engagement:
          type: string
          description: Engagement
        UniqueFileName:
          type: string
          description: Unique file name
        Result:
          "$ref": "#/components/schemas/JobResult"
      required:
      - Engagement
      - UniqueFileName
      - Result
    MatcherTransactionJobCompletedEvent:
      type: object
      properties:
        EventId:
          type: string
          format: uuid
          description: Unique Event Identifier
        CorrelationId:
          type: string
          format: uuid
          description: Correlation identifier
        EventType:
          type: string
          description: Event type
        EventMessage:
          type: string
          description: Human-readable event description
        CreatedDate:
          type: string
          format: date-time
          description: Time of the event
        Payload:
          "$ref": "#/components/schemas/MatcherTransactionJobCompleted"
      required:
      - EventId
      - EventType
      - EventMessage
      - CreatedDate
      - Payload
    MatcherTransactionJobCompleted:
      type: object
      properties:
        Engagement:
          type: string
          description: Engagement
        UniqueFileName:
          type: string
          description: Unique file name
        Result:
          "$ref": "#/components/schemas/JobResult"
      required:
      - Engagement
      - UniqueFileName
      - Result
    BalancerBalanceJobCompletedEvent:
      type: object
      properties:
        EventId:
          type: string
          format: uuid
          description: Unique Event Identifier
        CorrelationId:
          type: string
          format: uuid
          description: Correlation identifier
        EventType:
          type: string
          description: Event type
        EventMessage:
          type: string
          description: Human-readable event description
        CreatedDate:
          type: string
          format: date-time
          description: Time of the event
        Payload:
          "$ref": "#/components/schemas/BalancerBalanceJobCompleted"
      required:
      - EventId
      - EventType
      - EventMessage
      - CreatedDate
      - Payload
    BalancerBalanceJobCompleted:
      type: object
      properties:
        Engagement:
          type: string
          description: Engagement
        UniqueFileName:
          type: string
          description: Unique file name
        Result:
          "$ref": "#/components/schemas/JobResult"
      required:
      - Engagement
      - UniqueFileName
      - Result
    BalancerTransactionJobCompletedEvent:
      type: object
      properties:
        EventId:
          type: string
          format: uuid
          description: Unique Event Identifier
        CorrelationId:
          type: string
          format: uuid
          description: Correlation identifier
        EventType:
          type: string
          description: Event type
        EventMessage:
          type: string
          description: Human-readable event description
        CreatedDate:
          type: string
          format: date-time
          description: Time of the event
        Payload:
          "$ref": "#/components/schemas/BalancerTransactionJobCompleted"
      required:
      - EventId
      - EventType
      - EventMessage
      - CreatedDate
      - Payload
    BalancerTransactionJobCompleted:
      type: object
      properties:
        Engagement:
          type: string
          description: Engagement
        UniqueFileName:
          type: string
          description: Unique file name
        Result:
          "$ref": "#/components/schemas/JobResult"
      required:
      - Engagement
      - UniqueFileName
      - Result
    JobResult:
      type: string
      description: |-
        The result of the job processing. Possible values:
        - Succeeded: All records processed successfully
        - PartiallySucceeded: Some records processed with errors
        - Failed: Processing failed
        - Rejected: File was rejected (e.g., malware)
        - WaitingInteraction: Waiting for user input
        - Discarded: Processing was cancelled or discarded
        - Deleted: File was deleted
      enum:
      - Succeeded
      - PartiallySucceeded
      - Failed
      - Rejected
      - WaitingInteraction
      - Discarded
      - Deleted
    MatcherReportPublishedEvent:
      type: object
      properties:
        EventId:
          type: string
          format: uuid
          description: Unique Event Identifier
        CorrelationId:
          type: string
          format: uuid
          description: Correlation identifier
        EventType:
          type: string
          description: Event type
        EventMessage:
          type: string
          description: Human-readable event description
        CreatedDate:
          type: string
          format: date-time
          description: Time of the event
        Payload:
          "$ref": "#/components/schemas/MatcherReportPublished"
      required:
      - EventId
      - EventType
      - EventMessage
      - CreatedDate
      - Payload
    MatcherReportPublished:
      type: object
      properties:
        UniqueFileName:
          type: string
          description: Unique file name
        DownloadUrl:
          type: string
          description: Download URL
      required:
      - UniqueFileName
      - DownloadUrl
  securitySchemes:
    adra_personal_access_token:
      type: http
      description: |-
        This API uses OAuth 2.0 Bearer tokens for authentication.

        **Authentication Token**: You can obtain a token using:
           - **Personal Access Tokens**: Generate these tokens from your [user account settings](https://setup.adra.com/profile/access)

        Once you have a token, include it in the `Authorization` header of your requests:

        ```
        Authorization: Bearer YOUR_TOKEN_HERE
        ```

        Ensure that you keep your tokens secure and do not share them publicly.
      scheme: Bearer
    adra_oauth_client_cred:
      type: oauth2
      description: Restricted to internal clients. Requires client ID and secret obtained
        from Adra Engineering. Scopes are mandatory on token requests.
      flows:
        clientCredentials:
          tokenUrl: https://login.adra.com/connect/token
          scopes:
            integrationhub_api.upload: integrationhub_api.upload
            integrationhub_api.download: integrationhub_api.download
    adra_oauth_code_pkce:
      type: oauth2
      description: OAuth 2.0 JWT Bearer Token Scheme
      flows:
        authorizationCode:
          authorizationUrl: https://login.adra.com/connect/authorize
          tokenUrl: https://login.adra.com/connect/token
          scopes:
            integrationhub_api.download: integrationhub_api.download
