balena-supervisor/test/data/device-api-responses.json
Cameron Diver f08316dc57 Allow storing commits against their appIds
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>
2020-11-10 10:50:08 +00:00

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": {}
}
}