> ## Documentation Index
> Fetch the complete documentation index at: https://intunedhq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Sink Body

## Introduction

When a sink is configured, Run results are delivered to the sink destination. The payload is a JSON object containing the API Run result along with additional metadata. The structure is mostly similar between Jobs and Runs with some minor differences.

## Format

<ParamField body="apiInfo" type="object" required>
  Info about the API that was run. Includes the API name and result of run.

  <Expandable>
    <ParamField body="name" type="string" required>
      The API name.
    </ParamField>

    <ParamField body="parameters" type="object | array<any>">
      The parameters to passed to the API for this run.
    </ParamField>

    <ParamField body="result" type="object">
      <Tabs>
        <Tab title="Completed">
          <Expandable>
            <ParamField body="status" type="enum<string>" required>
              The status of the API run.

              Available options: `completed`
            </ParamField>

            <ParamField body="result" type="any">
              The result of the API run.
            </ParamField>

            <ParamField body="statusCode" type="number" required>
              The status code of the API run.
            </ParamField>
          </Expandable>
        </Tab>

        <Tab title="Failed">
          <Expandable>
            <ParamField body="status" type="enum<string>" required>
              The status of the API run.

              Available options: `failed`
            </ParamField>

            <ParamField body="error" type="string" required>
              Error code.
            </ParamField>

            <ParamField body="message" type="string" required>
              Error message.
            </ParamField>

            <ParamField body="statusCode" type="number" required>
              The status code of the API run.
            </ParamField>
          </Expandable>
        </Tab>
      </Tabs>
    </ParamField>

    <ParamField body="runId" type="string" required>
      The run ID for the API run.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="workspaceId" type="string" required>
  The workspace ID of the project that the run belongs to.
</ParamField>

<ParamField body="project" type="object" required>
  Details of the project that the run belongs to.

  <Expandable>
    <ParamField body="id" type="string" required>
      The project UUID.
    </ParamField>

    <ParamField body="name" type="string" required>
      The project name.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="authSession" type="object">
  Details of the auth   used in this run.

  <Expandable>
    <ParamField body="id" type="string" required>
      The auth session ID.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="projectJob" type="object">
  Present when this Run is part of a Job. Contains information about the Job that triggered it.

  <Expandable>
    <ParamField body="id" type="string" required>
      Job ID.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="projectJobRun" type="object">
  Present when this Run is part of a Job. Contains information about the JobRun that triggered it.

  <Expandable>
    <ParamField body="id" type="string" required>
      JobRun ID.
    </ParamField>
  </Expandable>
</ParamField>
