LelantosLelantos

Templates

Build and manage sandbox templates

List templates

GET
/templates
X-API-Key<token>

In: header

Query Parameters

teamID?string
limit?integer
Default100
Formatint32
Range1 <= value <= 100
nextToken?string

Cursor for pagination. Use the value from the X-Next-Token response header.

Response Body

application/json

application/json

curl -X GET "https://api.lelantos.ai/templates"
[
  {
    "templateID": "string",
    "buildID": "string",
    "cpuCount": 1,
    "memoryMB": 128,
    "diskSizeMB": 0,
    "public": true,
    "aliases": [
      "string"
    ],
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "createdBy": {
      "id": "string",
      "email": "string"
    },
    "lastSpawnedAt": "2019-08-24T14:15:22Z",
    "spawnCount": 0,
    "buildCount": 0,
    "envdVersion": "string"
  }
]
{
  "code": 0,
  "message": "string"
}

Create template

POST
/templates
X-API-Key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*unknown

Response Body

application/json

application/json

application/json

curl -X POST "https://api.lelantos.ai/templates" \  -H "Content-Type: application/json" \  -d '{    "dockerfile": "string"  }'
{
  "templateID": "string",
  "buildID": "string",
  "cpuCount": 1,
  "memoryMB": 128,
  "diskSizeMB": 0,
  "public": true,
  "aliases": [
    "string"
  ],
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "createdBy": {
    "id": "string",
    "email": "string"
  },
  "lastSpawnedAt": "2019-08-24T14:15:22Z",
  "spawnCount": 0,
  "buildCount": 0,
  "envdVersion": "string"
}
{
  "code": 0,
  "message": "string"
}
{
  "code": 0,
  "message": "string"
}

Get template detail

GET
/templates/{templateID}
X-API-Key<token>

In: header

Path Parameters

templateID*string

Response Body

application/json

application/json

application/json

curl -X GET "https://api.lelantos.ai/templates/string"
{
  "templateID": "string",
  "buildID": "string",
  "cpuCount": 1,
  "memoryMB": 128,
  "diskSizeMB": 0,
  "public": true,
  "aliases": [
    "string"
  ],
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "createdBy": {
    "id": "string",
    "email": "string"
  },
  "lastSpawnedAt": "2019-08-24T14:15:22Z",
  "spawnCount": 0,
  "buildCount": 0,
  "envdVersion": "string"
}
{
  "code": 0,
  "message": "string"
}
{
  "code": 0,
  "message": "string"
}

Rebuild template

POST
/templates/{templateID}
X-API-Key<token>

In: header

Path Parameters

templateID*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*unknown

Response Body

application/json

application/json

curl -X POST "https://api.lelantos.ai/templates/string" \  -H "Content-Type: application/json" \  -d '{    "dockerfile": "string"  }'
{
  "templateID": "string",
  "buildID": "string",
  "cpuCount": 1,
  "memoryMB": 128,
  "diskSizeMB": 0,
  "public": true,
  "aliases": [
    "string"
  ],
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "createdBy": {
    "id": "string",
    "email": "string"
  },
  "lastSpawnedAt": "2019-08-24T14:15:22Z",
  "spawnCount": 0,
  "buildCount": 0,
  "envdVersion": "string"
}
{
  "code": 0,
  "message": "string"
}

Update template

PATCH
/templates/{templateID}
X-API-Key<token>

In: header

Path Parameters

templateID*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*unknown

Response Body

application/json

curl -X PATCH "https://api.lelantos.ai/templates/string" \  -H "Content-Type: application/json" \  -d '{}'
Empty
{
  "code": 0,
  "message": "string"
}

Delete template

DELETE
/templates/{templateID}
X-API-Key<token>

In: header

Path Parameters

templateID*string

Response Body

application/json

curl -X DELETE "https://api.lelantos.ai/templates/string"
Empty
{
  "code": 0,
  "message": "string"
}

Get build status

GET
/templates/{templateID}/builds/{buildID}/status
X-API-Key<token>

In: header

Path Parameters

templateID*string
buildID*string

Response Body

application/json

application/json

application/json

curl -X GET "https://api.lelantos.ai/templates/string/builds/string/status"
{
  "logs": [],
  "templateID": "string",
  "buildID": "string",
  "status": "building"
}
{
  "code": 0,
  "message": "string"
}
{
  "code": 0,
  "message": "string"
}

Create a custom template (RFC-005)

POST
/v3/templates
X-API-Key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*unknown

Response Body

application/json

application/json

application/json

curl -X POST "https://api.lelantos.ai/v3/templates" \  -H "Content-Type: application/json" \  -d '{    "alias": "string"  }'
{
  "templateID": "string",
  "buildID": "string",
  "alias": "string",
  "executor": "registry",
  "estimatedS": 0,
  "logsURL": "string"
}
{
  "code": 0,
  "message": "string"
}
{
  "code": 0,
  "message": "string"
}

Get v3 build status

GET
/v3/templates/{templateID}/builds/{buildID}/status
X-API-Key<token>

In: header

Path Parameters

templateID*string
buildID*string

Response Body

application/json

application/json

application/json

curl -X GET "https://api.lelantos.ai/v3/templates/string/builds/string/status"
{
  "templateID": "string",
  "buildID": "string",
  "status": "pending",
  "step": {
    "index": 0,
    "total": 0,
    "description": "string"
  },
  "logs": [
    "string"
  ],
  "logsOffset": 0,
  "layerHash": "string",
  "rootfsSize": 0,
  "durationMs": 0,
  "error": "string",
  "createdAt": "2019-08-24T14:15:22Z"
}
{
  "code": 0,
  "message": "string"
}
{
  "code": 0,
  "message": "string"
}

Stream v3 build logs

GET
/v3/templates/{templateID}/builds/{buildID}/logs
X-API-Key<token>

In: header

Path Parameters

templateID*string
buildID*string

Response Body

application/json

application/json

curl -X GET "https://api.lelantos.ai/v3/templates/string/builds/string/logs"
"string"
{
  "code": 0,
  "message": "string"
}
{
  "code": 0,
  "message": "string"
}

Cancel an in-flight v3 build

DELETE
/v3/templates/{templateID}/builds/{buildID}
X-API-Key<token>

In: header

Path Parameters

templateID*string
buildID*string

Response Body

application/json

application/json

curl -X DELETE "https://api.lelantos.ai/v3/templates/string/builds/string"
Empty
{
  "code": 0,
  "message": "string"
}
{
  "code": 0,
  "message": "string"
}