Roll back to a version
curl --request POST \
--url https://api.opper.ai/management/v1/dynamic-routes/{name}/versions/{version_number}/rollback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"note": "<string>"
}
'import requests
url = "https://api.opper.ai/management/v1/dynamic-routes/{name}/versions/{version_number}/rollback"
payload = { "note": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({note: '<string>'})
};
fetch('https://api.opper.ai/management/v1/dynamic-routes/{name}/versions/{version_number}/rollback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"draft": {
"graph": {},
"layout": {},
"revision": 123,
"validation": "<array>"
},
"route": {
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"draft_revision": 123,
"invocation_model": "<string>",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": [
123
],
"deleted_at": "2023-11-07T05:31:56Z",
"draft_graph": {},
"draft_layout": {},
"draft_validation": "<array>"
},
"version_count": 123,
"active_version": {
"created_at": "2023-11-07T05:31:56Z",
"note": "<string>",
"uuid": [
123
],
"version_number": 123
},
"latest_version_number": 123
},
"meta": {
"deployed_version": {
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"draft_revision": 123,
"note": "<string>",
"route_name": "<string>",
"uuid": [
123
],
"version_number": 123,
"graph": {},
"layout": {},
"validation": "<array>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"allowed_plans": [
"<string>"
],
"current_plan": "<string>",
"error": "<string>",
"required_scope": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}Management
Roll back to a version
Re-deploys an older version’s graph as a new version, so the rollback is itself in the history. The draft is left as it is. Requires the dynamic_routes:write scope.
POST
/
management
/
v1
/
dynamic-routes
/
{name}
/
versions
/
{version_number}
/
rollback
Roll back to a version
curl --request POST \
--url https://api.opper.ai/management/v1/dynamic-routes/{name}/versions/{version_number}/rollback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"note": "<string>"
}
'import requests
url = "https://api.opper.ai/management/v1/dynamic-routes/{name}/versions/{version_number}/rollback"
payload = { "note": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({note: '<string>'})
};
fetch('https://api.opper.ai/management/v1/dynamic-routes/{name}/versions/{version_number}/rollback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"draft": {
"graph": {},
"layout": {},
"revision": 123,
"validation": "<array>"
},
"route": {
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"draft_revision": 123,
"invocation_model": "<string>",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": [
123
],
"deleted_at": "2023-11-07T05:31:56Z",
"draft_graph": {},
"draft_layout": {},
"draft_validation": "<array>"
},
"version_count": 123,
"active_version": {
"created_at": "2023-11-07T05:31:56Z",
"note": "<string>",
"uuid": [
123
],
"version_number": 123
},
"latest_version_number": 123
},
"meta": {
"deployed_version": {
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"draft_revision": 123,
"note": "<string>",
"route_name": "<string>",
"uuid": [
123
],
"version_number": 123,
"graph": {},
"layout": {},
"validation": "<array>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"allowed_plans": [
"<string>"
],
"current_plan": "<string>",
"error": "<string>",
"required_scope": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}Authorizations
Management API authentication. Pass an op-mak-… management token as a Bearer token. Runtime op-… API keys are rejected with 403 — they belong on the data-plane endpoints. Mint a management key from the platform UI under Settings → API keys.
Path Parameters
Route name
Version number, from 1
Required range:
x >= 1Body
application/json
Release note recorded on the new version.