Retry a workflow run
curl --request POST \
--url https://api.metal.ai/v1/workflow-runs/{id}/retry \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <api-key>'import requests
url = "https://api.metal.ai/v1/workflow-runs/{id}/retry"
headers = {
"x-metal-client-id": "<api-key>",
"x-metal-api-key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-metal-client-id': '<api-key>', 'x-metal-api-key': '<api-key>'}
};
fetch('https://api.metal.ai/v1/workflow-runs/{id}/retry', 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.metal.ai/v1/workflow-runs/{id}/retry"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-metal-client-id", "<api-key>")
req.Header.Add("x-metal-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"id": "665f1c2a9b1e4a0012a3b4c6",
"workflowId": "665f1c2a9b1e4a0012a3b4c5",
"status": "running",
"title": "Acme diligence memo",
"input": {},
"output": {},
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "invalid api key or clientId"
}{
"error": "not found"
}Retry a workflow run
Retries a failed workflow run. The retry inherits the source run’s dryRun setting, so retrying a dry run produces another dry run.
POST
/
v1
/
workflow-runs
/
{id}
/
retry
Retry a workflow run
curl --request POST \
--url https://api.metal.ai/v1/workflow-runs/{id}/retry \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <api-key>'import requests
url = "https://api.metal.ai/v1/workflow-runs/{id}/retry"
headers = {
"x-metal-client-id": "<api-key>",
"x-metal-api-key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-metal-client-id': '<api-key>', 'x-metal-api-key': '<api-key>'}
};
fetch('https://api.metal.ai/v1/workflow-runs/{id}/retry', 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.metal.ai/v1/workflow-runs/{id}/retry"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-metal-client-id", "<api-key>")
req.Header.Add("x-metal-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"id": "665f1c2a9b1e4a0012a3b4c6",
"workflowId": "665f1c2a9b1e4a0012a3b4c5",
"status": "running",
"title": "Acme diligence memo",
"input": {},
"output": {},
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "invalid api key or clientId"
}{
"error": "not found"
}Authorizations
The Client ID of your API key.
The secret value of your API key.
Path Parameters
The workflow run id.
Response
The retry was accepted.
Show child attributes
Show child attributes

