Introduction

When a sink is configured, the output of the job or queue is written to the sink. The output is a JSON object that contains the result of the API run with additional information. The structure of the output is mostly similar between jobs and queues with some minor differences.

Format

apiInfo
object
required

Info about the API that was run. Includes the API name and result of run.

workspaceId
string
required

The workspace ID of the project that the run belongs to.

project
object
required

Details of the project that the run belongs to.

authSession
object

Details of the auth used in this run.

projectJob
object
required
projectJobRun
projectJobRun
required

Typescript SDK

Our Typescript SDK supports the sink body by providing the SinkResult type. You can read the sink results and cast them to this type to access the properties in a type-safe manner.

import { SinkResult } from "./src/models/components/sinkresult"

const sinkResult: SinkResult = JSON.parse(sinkBody);
console.log(sinkResult.apiInfo.result);