Cancel a job run
curl --request POST \
--url https://api.cloud.wherobots.com/runs/{run_id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cloud.wherobots.com/runs/{run_id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cloud.wherobots.com/runs/{run_id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cloud.wherobots.com/runs/{run_id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloud.wherobots.com/runs/{run_id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();{
"id": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"name": "<string>",
"status": "PENDING",
"triggeredBy": {
"id": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"roles": [
{
"id": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"name": "<string>",
"organizationId": "<string>",
"policies": [
{
"provider": "WHEROBOTS",
"locator": "<string>",
"action": "<string>",
"effect": "ALLOW",
"id": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z"
}
]
}
],
"email": "<string>",
"name": "<string>"
},
"payload": {
"name": "<string>",
"runtime": "TINY",
"version": "<string>",
"timeoutSeconds": 3600,
"environment": {
"sparkConfigs": {},
"dependencies": []
},
"runPython": {
"uri": "<string>",
"args": []
},
"runJar": {
"uri": "<string>",
"args": [],
"mainClass": "<string>"
}
},
"isTerminal": true,
"startTime": "2023-11-07T05:31:56Z",
"completeTime": "2023-11-07T05:31:56Z",
"kubeApp": {
"id": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"instanceId": "<string>",
"appType": "JUPYTER",
"status": "PENDING",
"createdById": "<string>",
"cpuUsage": 123,
"regionName": "<string>",
"message": "<string>",
"apiPayload": {},
"appMeta": {
"spark_ui_url": "",
"spark_eventlogs_url": "",
"resolved_version": "<string>"
},
"events": []
}
}{
"errors": [
{
"code": "BAD_REQUEST_ERROR",
"message": "<string>",
"details": "<string>",
"path": "<string>",
"suggestion": "Contact us at support@wherobots.com to get help with resolving your error.",
"documentation_url": "<string>",
"field": "<string>",
"data": {}
}
],
"requestId": "<string>"
}{
"errors": [
{
"code": "BAD_REQUEST_ERROR",
"message": "<string>",
"details": "<string>",
"path": "<string>",
"suggestion": "Contact us at support@wherobots.com to get help with resolving your error.",
"documentation_url": "<string>",
"field": "<string>",
"data": {}
}
],
"requestId": "<string>"
}{
"errors": [
{
"code": "BAD_REQUEST_ERROR",
"message": "<string>",
"details": "<string>",
"path": "<string>",
"suggestion": "Contact us at support@wherobots.com to get help with resolving your error.",
"documentation_url": "<string>",
"field": "<string>",
"data": {}
}
],
"requestId": "<string>"
}{
"errors": [
{
"code": "BAD_REQUEST_ERROR",
"message": "<string>",
"details": "<string>",
"path": "<string>",
"suggestion": "Contact us at support@wherobots.com to get help with resolving your error.",
"documentation_url": "<string>",
"field": "<string>",
"data": {}
}
],
"requestId": "<string>"
}{
"errors": [
{
"code": "BAD_REQUEST_ERROR",
"message": "<string>",
"details": "<string>",
"path": "<string>",
"suggestion": "Contact us at support@wherobots.com to get help with resolving your error.",
"documentation_url": "<string>",
"field": "<string>",
"data": {}
}
],
"requestId": "<string>"
}{
"errors": [
{
"code": "BAD_REQUEST_ERROR",
"message": "<string>",
"details": "<string>",
"path": "<string>",
"suggestion": "Contact us at support@wherobots.com to get help with resolving your error.",
"documentation_url": "<string>",
"field": "<string>",
"data": {}
}
],
"requestId": "<string>"
}{
"errors": [
{
"code": "BAD_REQUEST_ERROR",
"message": "<string>",
"details": "<string>",
"path": "<string>",
"suggestion": "Contact us at support@wherobots.com to get help with resolving your error.",
"documentation_url": "<string>",
"field": "<string>",
"data": {}
}
],
"requestId": "<string>"
}{
"errors": [
{
"code": "BAD_REQUEST_ERROR",
"message": "<string>",
"details": "<string>",
"path": "<string>",
"suggestion": "Contact us at support@wherobots.com to get help with resolving your error.",
"documentation_url": "<string>",
"field": "<string>",
"data": {}
}
],
"requestId": "<string>"
}runs
Cancel a job run
Cancel a job run. Only the job’s submitter or an organization admin may cancel it.
POST
/
runs
/
{run_id}
/
cancel
Cancel a job run
curl --request POST \
--url https://api.cloud.wherobots.com/runs/{run_id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cloud.wherobots.com/runs/{run_id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cloud.wherobots.com/runs/{run_id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cloud.wherobots.com/runs/{run_id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloud.wherobots.com/runs/{run_id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();{
"id": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"name": "<string>",
"status": "PENDING",
"triggeredBy": {
"id": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"roles": [
{
"id": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"name": "<string>",
"organizationId": "<string>",
"policies": [
{
"provider": "WHEROBOTS",
"locator": "<string>",
"action": "<string>",
"effect": "ALLOW",
"id": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z"
}
]
}
],
"email": "<string>",
"name": "<string>"
},
"payload": {
"name": "<string>",
"runtime": "TINY",
"version": "<string>",
"timeoutSeconds": 3600,
"environment": {
"sparkConfigs": {},
"dependencies": []
},
"runPython": {
"uri": "<string>",
"args": []
},
"runJar": {
"uri": "<string>",
"args": [],
"mainClass": "<string>"
}
},
"isTerminal": true,
"startTime": "2023-11-07T05:31:56Z",
"completeTime": "2023-11-07T05:31:56Z",
"kubeApp": {
"id": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"instanceId": "<string>",
"appType": "JUPYTER",
"status": "PENDING",
"createdById": "<string>",
"cpuUsage": 123,
"regionName": "<string>",
"message": "<string>",
"apiPayload": {},
"appMeta": {
"spark_ui_url": "",
"spark_eventlogs_url": "",
"resolved_version": "<string>"
},
"events": []
}
}{
"errors": [
{
"code": "BAD_REQUEST_ERROR",
"message": "<string>",
"details": "<string>",
"path": "<string>",
"suggestion": "Contact us at support@wherobots.com to get help with resolving your error.",
"documentation_url": "<string>",
"field": "<string>",
"data": {}
}
],
"requestId": "<string>"
}{
"errors": [
{
"code": "BAD_REQUEST_ERROR",
"message": "<string>",
"details": "<string>",
"path": "<string>",
"suggestion": "Contact us at support@wherobots.com to get help with resolving your error.",
"documentation_url": "<string>",
"field": "<string>",
"data": {}
}
],
"requestId": "<string>"
}{
"errors": [
{
"code": "BAD_REQUEST_ERROR",
"message": "<string>",
"details": "<string>",
"path": "<string>",
"suggestion": "Contact us at support@wherobots.com to get help with resolving your error.",
"documentation_url": "<string>",
"field": "<string>",
"data": {}
}
],
"requestId": "<string>"
}{
"errors": [
{
"code": "BAD_REQUEST_ERROR",
"message": "<string>",
"details": "<string>",
"path": "<string>",
"suggestion": "Contact us at support@wherobots.com to get help with resolving your error.",
"documentation_url": "<string>",
"field": "<string>",
"data": {}
}
],
"requestId": "<string>"
}{
"errors": [
{
"code": "BAD_REQUEST_ERROR",
"message": "<string>",
"details": "<string>",
"path": "<string>",
"suggestion": "Contact us at support@wherobots.com to get help with resolving your error.",
"documentation_url": "<string>",
"field": "<string>",
"data": {}
}
],
"requestId": "<string>"
}{
"errors": [
{
"code": "BAD_REQUEST_ERROR",
"message": "<string>",
"details": "<string>",
"path": "<string>",
"suggestion": "Contact us at support@wherobots.com to get help with resolving your error.",
"documentation_url": "<string>",
"field": "<string>",
"data": {}
}
],
"requestId": "<string>"
}{
"errors": [
{
"code": "BAD_REQUEST_ERROR",
"message": "<string>",
"details": "<string>",
"path": "<string>",
"suggestion": "Contact us at support@wherobots.com to get help with resolving your error.",
"documentation_url": "<string>",
"field": "<string>",
"data": {}
}
],
"requestId": "<string>"
}{
"errors": [
{
"code": "BAD_REQUEST_ERROR",
"message": "<string>",
"details": "<string>",
"path": "<string>",
"suggestion": "Contact us at support@wherobots.com to get help with resolving your error.",
"documentation_url": "<string>",
"field": "<string>",
"data": {}
}
],
"requestId": "<string>"
}Authorizations
bearerTokenwherobotsApiKey
Response
Successful Response
Was this page helpful?

