API

API for our managed service.

Download file

get
Authorizations
Path parameters
pathstringRequired
Responses
200
Returns the URL to download the file from
text/plain
Responsestring
get
GET /v2/files/{path} HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
<presigned-bucket-url-for-downloading-file>

Read directory contents

get
Authorizations
Path parameters
pathstringRequired
Responses
200
Returns the list of files in the directory
application/json
Responsestring[]
get
GET /v2/files/dir/{path} HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  "file1.txt",
  "file2.txt"
]

Service discovery

get
Authorizations
Path parameters
namestringRequired
Responses
200
Returns url for the service named
text/plain
Responsestring
get
GET /v2/discover/{name} HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
text

List actions

get
Authorizations
Query parameters
typestring | nullOptional
Responses
200
Returns the actions with status
application/json
get
GET /v2/actions HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "action_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
    "checkpoint_id": "b2c3d4e5-f6a7-8901-2345-67890abcdef1",
    "status": "completed",
    "type": "checkpoint",
    "action_timestamp": "2023-10-27T10:00:00Z",
    "checkpoint_completed_timestamp": "2023-10-27T10:05:00Z"
  }
]

Get latest action_id belonging to a given pod_id

get
Authorizations
Path parameters
idstringRequired
Responses
200
The action_id of the given pod_id has been fetched Successfully
text/plain
Responsestring
get
GET /v2/actions/from_pod/{id} HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
<uuid-v4-here>

Upload podspec via rest api

post
Authorizations
Body
action_idstringRequired
pod_idstring | nullOptional
pod_specanyOptional
statusstringRequired
Responses
200
Success
text/plain
Responsestring
post
POST /v2/actions/upload HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 66

{
  "action_id": "text",
  "pod_id": null,
  "pod_spec": null,
  "status": "text"
}
Success

Checkpoint a pod

post
Authorizations
Body
action_idstring | nullRead-onlyOptional
cluster_idstringRequired
namespacestringRequired
pod_namestringRequired
runc_rootstringRequired
Responses
200
Returns the id for the task
text/plain
Responsestring
post
POST /v2/checkpoint/pod HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 77

{
  "cluster_id": "text",
  "namespace": "text",
  "pod_name": "text",
  "runc_root": "text"
}
<uuid-v4-here>

Get status of a pod checkpoint operation

get

Returns the current status of a pod checkpoint based on action ID

Authorizations
Path parameters
action_idstringRequired
Responses
200
Returns the current status of the checkpoint operation
application/json
get
GET /v2/checkpoint/status/{action_id} HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "details": null,
  "status": "initialized"
}

List checkpoints

get

Use query params to filter checkpoints

Authorizations
Query parameters
idsstring · uuid[]Optional
Responses
200
Returns checkpoints
application/json
get
GET /v2/checkpoints HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "checksum": null,
    "gpu": "text",
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "image_name_with_tag": null,
    "platform": "text",
    "process_info": null,
    "status": "initialized"
  }
]

Create checkpoint

post

Builds a new checkpoint without the metadata and information about the checkpoint with status initializing

Authorizations
Responses
200
Returns the checkpoint id for the new checkpoint
text/plain
Responsestring
post
POST /v2/checkpoints HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
<uuid-v4-here>

Deprecate checkpoint

patch

Marks checkpoint as deprecated, so that they can be removed on next internal state cleanup. Checkpoints marked deprecated are removed within a fixed number of days depending on our customer service agreement.

Note: Checkpoints can't directly be deleted as use them as versioning points and might be required for restores that might be in-flight setting them deprecated marks them to be cleaned up as soon as possible(likely within a day).

Authorizations
Path parameters
idstringRequired
Responses
200
Successfully deprecated checkpoint and returns id
text/plain
Responsestring
patch
PATCH /v2/checkpoints/deprecate/{id} HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
<uuid-for-checkpoint>

Put checkpoint info

put

Add information about the checkpointed pod and runtime

Authorizations
Path parameters
idstring · uuidRequired
Body
gpustringRequired
platformstringRequired
Responses
200
Successfully deprecated checkpoint and returns id
text/plain
Responsestring
put
PUT /v2/checkpoints/info/{id} HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 32

{
  "gpu": "text",
  "platform": "text"
}
<uuid-for-checkpoint>

Uploaded checkpoint

post
Authorizations
Path parameters
idstringRequired
Body
restore_pathstring | nullOptional
Responses
200
Marks the checkpoint as successfully uploaded
text/plain
Responsestring
post
POST /v2/checkpoints/uploaded/{id} HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "restore_path": null
}
<uuid-v4-here>

Upload file

put
Authorizations
Path parameters
pathstringRequired
Responses
200
Returns the URL to upload the file to
text/plain
Responsestring
put
PUT /v2/files/{path} HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
<presigned-bucket-url-for-uploading-file>

List jobs

get
Authorizations
Responses
200
Returns list of jobs from db
application/json
get
GET /v2/jobs HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "jid": "xenodochial_jones4",
    "type": "containerd"
  },
  {
    "jid": "dreamy_nobel1",
    "type": "containerd"
  }
]

Update K8s Cluster Resource

post
Authorizations
Body
cluster_idstring | nullOptional
metadataanyOptional
org_idstring | nullOptional
resourceone ofOptional
or
all ofOptional
or
all ofOptional
Responses
200
Resource id registered internally
text/plain
Responsestring
post
POST /v2/k8s/sync HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 76

{
  "cluster_id": null,
  "metadata": null,
  "org_id": null,
  "resource": {
    "type": "None"
  }
}
text

List pods

get

Use query params to filter pods

Authorizations
Responses
200
Returns pods
application/json
Responseobject · Pod[]

Entire json for the Kubernetes

get
GET /v2/pods HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {}
]

Restore a pod

post
Authorizations
Body
action_idstringRequired
cluster_idstringOptional
Responses
200
Returns the checkpoint id for the new checkpoint
text/plain
Responsestring
post
POST /v2/restore/pod HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 40

{
  "action_id": "text",
  "cluster_id": "text"
}
<uuid-v4-here>

Get User

get

Used to validate authentication token

Authorizations
Responses
200
Returns your `user-id` (a uuid)
text/plain
Responsestring
get
GET /v2/user HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
text

Last updated

Was this helpful?