mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-03 12:34:11 +00:00
f08316dc57
This paves the way for running multiple applications and storing information related to the application against the application itself. A couple of hacks have been added to v1 and v2 endpoints to maintain compatability but these should eventually be removed with the addition of a v3 api. Change-type: minor Signed-off-by: Cameron Diver <cameron@balena.io>
85 lines
1.8 KiB
JSON
85 lines
1.8 KiB
JSON
{
|
|
"V1": {
|
|
"GET": {
|
|
"/healthy": {
|
|
"statusCode": 200,
|
|
"body": {},
|
|
"text": "OK"
|
|
},
|
|
"/healthy [2]": {
|
|
"statusCode": 500,
|
|
"body": {},
|
|
"text": "Unhealthy"
|
|
},
|
|
"/apps/2": {
|
|
"statusCode": 200,
|
|
"body": {
|
|
"appId": 2,
|
|
"containerId": "abc123",
|
|
"commit": "4e380136c2cf56cd64197d51a1ab263a",
|
|
"env": {},
|
|
"releaseId": 77777
|
|
}
|
|
},
|
|
"/apps/2/stop": {
|
|
"statusCode": 200,
|
|
"body": {
|
|
"containerId": "abc123"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"V2": {
|
|
"GET": {
|
|
"/device/vpn": {
|
|
"statusCode": 200,
|
|
"body": {
|
|
"status": "success",
|
|
"vpn": {
|
|
"enabled": true,
|
|
"connected": false
|
|
}
|
|
}
|
|
},
|
|
"/applications/1/state": {
|
|
"statusCode": 200,
|
|
"body": {
|
|
"local": {
|
|
"1": {
|
|
"services": {
|
|
"1111": {
|
|
"status": "Running",
|
|
"releaseId": 99999,
|
|
"download_progress": null
|
|
},
|
|
"2222": {
|
|
"status": "Running",
|
|
"releaseId": 99999,
|
|
"download_progress": null
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"dependent": {},
|
|
"commit": "7fc9c5bea8e361acd49886fe6cc1e1cd"
|
|
}
|
|
},
|
|
"/applications/9000/state": {
|
|
"statusCode": 409,
|
|
"body": {
|
|
"status": "failed",
|
|
"message": "Application ID does not exist: 9000"
|
|
}
|
|
},
|
|
"/applications/123invalid/state": {
|
|
"statusCode": 400,
|
|
"body": {
|
|
"status": "failed",
|
|
"message": "Invalid application ID: 123invalid"
|
|
}
|
|
}
|
|
},
|
|
"POST": {}
|
|
}
|
|
}
|