Sandbox API
- Base URL:
https://sandbox.sls.epilot.io - Full API Docs: https://docs.epilot.io/api/sandbox
Usageโ
import { epilot } from '@epilot/sdk'
epilot.authorize(() => '<token>')
const { data } = await epilot.sandbox.listPipelines(...)
Tree-shakeable importโ
import { getClient, authorize } from '@epilot/sdk/sandbox'
const sandboxClient = getClient()
authorize(sandboxClient, () => '<token>')
const { data } = await sandboxClient.listPipelines(...)
Operationsโ
Pipelines
Sandbox Requests
Schemas
OrgIdPipelineIdPipelineRolePipelineItemPipelineCreatePipelineRequestAccessTokenSandboxTokenPipelineTokenSandboxRequest
listPipelinesโ
List pipelines the current organization is part of
GET /v1/sandbox/pipelines
const { data } = await client.listPipelines()
Response
{
"results": [
{
"pipeline_role": "sandbox",
"pipeline_id": "12345::54321",
"sandbox_org_id": "12345",
"sandbox_org_name": "Sandbox",
"production_org_id": "54321",
"production_org_name": "Production",
"created_at": "1970-01-01T00:00:00.000Z"
}
],
"total": 1
}
createPipelineโ
Create a new pipeline by passing an api token from another organization.
POST /v1/sandbox/pipelines
const { data } = await client.createPipeline(
null,
{
pipeline_role: 'sandbox',
api_token: 'eyJhbGciOiJIUzI1NiIs...'
},
)
Response
{
"pipeline_role": "sandbox",
"pipeline_id": "12345::54321",
"sandbox_org_id": "12345",
"sandbox_org_name": "Sandbox",
"production_org_id": "54321",
"production_org_name": "Production",
"created_at": "1970-01-01T00:00:00.000Z"
}
getPipelineโ
Get pipeline by ID
GET /v1/sandbox/pipelines/{pipeline_id}
const { data } = await client.getPipeline({
pipeline_id: 'example',
})
Response
{
"pipeline_role": "sandbox",
"pipeline_id": "12345::54321",
"sandbox_org_id": "12345",
"sandbox_org_name": "Sandbox",
"production_org_id": "54321",
"production_org_name": "Production",
"created_at": "1970-01-01T00:00:00.000Z"
}
deletePipelineโ
Delete a pipeline by ID
DELETE /v1/sandbox/pipelines/{pipeline_id}
const { data } = await client.deletePipeline({
pipeline_id: 'example',
})
Response
{
"pipeline_role": "sandbox",
"pipeline_id": "12345::54321",
"sandbox_org_id": "12345",
"sandbox_org_name": "Sandbox",
"production_org_id": "54321",
"production_org_name": "Production",
"created_at": "1970-01-01T00:00:00.000Z"
}
generatePipelineTokenโ
Generate a temporary pipeline access token to access the other org from the pipeline
GET /v1/sandbox/pipelines/{pipeline_id}/token
const { data } = await client.generatePipelineToken({
pipeline_id: 'example',
})
Response
{
"pipeline_token": "eyJhbGciOiJIUzI1NiIs..."
}
requestSandboxโ
Request a sandbox account for a user
POST /v1/sandbox:request
const { data } = await client.requestSandbox(
null,
{
id: 12345,
fullname: 'John Doe',
company_name: 'Company Name',
position: 'Software Engineer',
email: 'user@example.com',
sandbox_usecase: 'Build a payment integration',
status: 'pending',
connected_to_existing_epilot_customer: true,
requested_at: '2022-01-01T00:00:00Z',
sandbox_request_category: 'APP_DEVELOPER_ACCOUNT'
},
)
Response
{
"id": 12345,
"fullname": "John Doe",
"company_name": "Company Name",
"position": "Software Engineer",
"email": "user@example.com",
"sandbox_usecase": "Build a payment integration",
"status": "pending",
"connected_to_existing_epilot_customer": true,
"requested_at": "2022-01-01T00:00:00Z",
"sandbox_request_category": "APP_DEVELOPER_ACCOUNT"
}
listSandboxRequestsโ
List sandbox requests from users
GET /v1/sandbox/requests
const { data } = await client.listSandboxRequests()
Response
{
"results": [
{
"id": 12345,
"fullname": "John Doe",
"company_name": "Company Name",
"position": "Software Engineer",
"email": "user@example.com",
"sandbox_usecase": "Build a payment integration",
"status": "pending",
"connected_to_existing_epilot_customer": true,
"requested_at": "2022-01-01T00:00:00Z",
"sandbox_request_category": "APP_DEVELOPER_ACCOUNT"
}
],
"total": 1
}
Schemasโ
OrgIdโ
Epilot Tenant Organization ID
type OrgId = string
PipelineIdโ
Unique identifier for a pipeline.
The format for a pipeline is: <sandbox_org>`::`<production_org>
type PipelineId = string
PipelineRoleโ
The role of the other organization in the pipeline from the perspective of the caller's organization
type PipelineRole = "sandbox" | "production"
PipelineItemโ
type PipelineItem = {
pipeline_id?: string
sandbox_org_id?: object
sandbox_org_name?: string
production_org_id?: string
production_org_name?: string
created_at?: string // date-time
}
Pipelineโ
type Pipeline = {
pipeline_role?: "sandbox" | "production"
pipeline_id?: string
sandbox_org_id?: object
sandbox_org_name?: string
production_org_id?: string
production_org_name?: string
created_at?: string // date-time
}
CreatePipelineRequestโ
type CreatePipelineRequest = {
pipeline_role: "sandbox" | "production"
api_token: object
}
AccessTokenโ
An epilot access token
type AccessToken = string
SandboxTokenโ
type SandboxToken = object
PipelineTokenโ
type PipelineToken = object
SandboxRequestโ
type SandboxRequest = {
id?: string
fullname: string
company_name: string
position: string
email: string // email
sandbox_usecase: string
status?: "pending" | "created" | "rejected"
connected_to_existing_epilot_customer: boolean
requested_at?: string // date-time
sandbox_request_category?: "APP_DEVELOPER_ACCOUNT" | "BLUEPRINT_SANDBOX" | "OTHER"
}