Cancel an open job
curl --request POST \
--url https://public-api.hyperlocalise.com/v1/jobs/{jobId}/cancel \
--header 'x-api-key: <api-key>'const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://public-api.hyperlocalise.com/v1/jobs/{jobId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/jobs/{jobId}/cancel"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.hyperlocalise.com/v1/jobs/{jobId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"job": {
"id": "<string>",
"projectId": "<string>",
"kind": "translation",
"type": "string",
"status": "queued",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"lastError": "<string>",
"title": "<string>",
"description": "<string>",
"dueAt": "2023-11-07T05:31:56Z",
"ownerEmail": "<string>",
"outputFiles": [
{
"fileId": "<string>",
"locale": "<string>",
"filename": "<string>"
}
],
"sourceFile": {
"fileId": "<string>",
"path": "<string>",
"branch": "<string>"
},
"sourceLocale": "<string>",
"targetLocales": [
"<string>"
],
"step": "translate",
"after": "<string>"
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Jobs
Cancel an open job
Requires jobs:write. Same rules as Cancel in the app. A queued, running or waiting_for_review job moves to cancelled and stops running. Finished jobs, and provider-backed jobs, return 409 job_action_unavailable. A cancelled job can’t be reopened, so create a new one if you need the work again.
POST
https://public-api.hyperlocalise.com
/
v1
/
jobs
/
{jobId}
/
cancel
Cancel an open job
curl --request POST \
--url https://public-api.hyperlocalise.com/v1/jobs/{jobId}/cancel \
--header 'x-api-key: <api-key>'const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://public-api.hyperlocalise.com/v1/jobs/{jobId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/jobs/{jobId}/cancel"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.hyperlocalise.com/v1/jobs/{jobId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"job": {
"id": "<string>",
"projectId": "<string>",
"kind": "translation",
"type": "string",
"status": "queued",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"lastError": "<string>",
"title": "<string>",
"description": "<string>",
"dueAt": "2023-11-07T05:31:56Z",
"ownerEmail": "<string>",
"outputFiles": [
{
"fileId": "<string>",
"locale": "<string>",
"filename": "<string>"
}
],
"sourceFile": {
"fileId": "<string>",
"path": "<string>",
"branch": "<string>"
},
"sourceLocale": "<string>",
"targetLocales": [
"<string>"
],
"step": "translate",
"after": "<string>"
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Was this page helpful?

