2020-05-08 20:04:21 +00:00
|
|
|
{
|
2020-05-20 01:27:36 +00:00
|
|
|
"V1": {
|
|
|
|
"GET": {
|
|
|
|
"/healthy": {
|
|
|
|
"statusCode": 200,
|
|
|
|
"body": {},
|
|
|
|
"text": "OK"
|
|
|
|
},
|
|
|
|
"/healthy [2]": {
|
|
|
|
"statusCode": 500,
|
|
|
|
"body": {},
|
|
|
|
"text": "Unhealthy"
|
2020-07-29 11:46:02 +00:00
|
|
|
},
|
|
|
|
"/apps/2": {
|
|
|
|
"statusCode": 200,
|
|
|
|
"body": {
|
|
|
|
"appId": 2,
|
|
|
|
"containerId": "abc123",
|
2020-11-04 17:11:19 +00:00
|
|
|
"commit": "4e380136c2cf56cd64197d51a1ab263a",
|
2020-07-29 11:46:02 +00:00
|
|
|
"env": {},
|
|
|
|
"releaseId": 77777
|
|
|
|
}
|
|
|
|
},
|
2020-11-26 06:11:47 +00:00
|
|
|
"/apps/2 [Multiple containers running]": {
|
|
|
|
"statusCode": 400,
|
|
|
|
"body": {
|
|
|
|
"appId": 2,
|
|
|
|
"containerId": "abc123",
|
|
|
|
"commit": "4e380136c2cf56cd64197d51a1ab263a",
|
|
|
|
"env": {},
|
|
|
|
"releaseId": 77777
|
|
|
|
}
|
|
|
|
},
|
2020-07-29 11:46:02 +00:00
|
|
|
"/apps/2/stop": {
|
|
|
|
"statusCode": 200,
|
|
|
|
"body": {
|
|
|
|
"containerId": "abc123"
|
|
|
|
}
|
2020-11-26 06:11:47 +00:00
|
|
|
},
|
|
|
|
"/apps/2/stop [Multiple containers running]": {
|
|
|
|
"statusCode": 400,
|
|
|
|
"body": {
|
|
|
|
"containerId": "abc123"
|
|
|
|
}
|
2021-02-03 10:04:37 +00:00
|
|
|
},
|
|
|
|
"/device/host-config [Hostname only]": {
|
|
|
|
"statusCode": 200,
|
|
|
|
"body": { "network": { "hostname": "foobardevice" } }
|
|
|
|
},
|
|
|
|
"/device/host-config [Hostname and proxy]": {
|
|
|
|
"statusCode": 200,
|
|
|
|
"body": {
|
|
|
|
"network": {
|
|
|
|
"hostname": "foobardevice",
|
|
|
|
"proxy": {
|
|
|
|
"ip": "example.org",
|
|
|
|
"noProxy": ["152.10.30.4", "253.1.1.0/16"],
|
|
|
|
"port": 1080,
|
|
|
|
"type": "socks5",
|
|
|
|
"login": "foo",
|
|
|
|
"password": "bar"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-05-20 01:27:36 +00:00
|
|
|
}
|
2020-11-19 01:37:34 +00:00
|
|
|
},
|
|
|
|
"POST": {
|
|
|
|
"/restart": {
|
|
|
|
"statusCode": 200,
|
|
|
|
"body": {},
|
|
|
|
"text": "OK"
|
|
|
|
},
|
|
|
|
"/restart [Invalid Body]": {
|
|
|
|
"statusCode": 400,
|
|
|
|
"body": {},
|
|
|
|
"text": "Missing app id"
|
2020-12-18 20:10:04 +00:00
|
|
|
},
|
|
|
|
"/update [204 Response]": {
|
|
|
|
"statusCode": 204,
|
|
|
|
"body": {},
|
|
|
|
"text": "OK"
|
|
|
|
},
|
|
|
|
"/update [202 Response]": {
|
|
|
|
"statusCode": 202,
|
|
|
|
"body": {},
|
|
|
|
"text": "OK"
|
2021-02-02 10:02:06 +00:00
|
|
|
},
|
|
|
|
"/blink": {
|
|
|
|
"statusCode": 200,
|
|
|
|
"body": {},
|
|
|
|
"text": "OK"
|
2021-02-03 05:11:18 +00:00
|
|
|
},
|
|
|
|
"/regenerate-api-key": {
|
|
|
|
"statusCode": 200,
|
|
|
|
"body": {}
|
2020-11-19 01:37:34 +00:00
|
|
|
}
|
2021-02-03 10:04:37 +00:00
|
|
|
},
|
|
|
|
"PATCH": {
|
|
|
|
"/host/device-config": {
|
|
|
|
"statusCode": 200,
|
|
|
|
"body": {},
|
|
|
|
"text": "OK"
|
|
|
|
}
|
2020-05-20 01:27:36 +00:00
|
|
|
}
|
|
|
|
},
|
2020-05-08 20:04:21 +00:00
|
|
|
"V2": {
|
|
|
|
"GET": {
|
|
|
|
"/device/vpn": {
|
|
|
|
"statusCode": 200,
|
|
|
|
"body": {
|
|
|
|
"status": "success",
|
|
|
|
"vpn": {
|
|
|
|
"enabled": true,
|
|
|
|
"connected": false
|
|
|
|
}
|
|
|
|
}
|
2020-05-15 19:18:20 +00:00
|
|
|
},
|
|
|
|
"/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"
|
|
|
|
}
|
2020-11-11 16:26:32 +00:00
|
|
|
},
|
|
|
|
"/state/status?desc=single_application": {
|
|
|
|
"statusCode": 200,
|
|
|
|
"body": {
|
|
|
|
"status": "success",
|
|
|
|
"appState": "applied",
|
|
|
|
"overallDownloadProgress": null,
|
|
|
|
"containers": [
|
|
|
|
{
|
|
|
|
"appId": 1658654,
|
|
|
|
"status": "Running",
|
|
|
|
"serviceName": "main",
|
|
|
|
"imageId": 2885946,
|
|
|
|
"serviceId": 640681,
|
|
|
|
"containerId": "f93d386599d1b36e71272d46ad69770cff333842db04e2e4c64dda7b54da07c6",
|
|
|
|
"createdAt": "2020-11-13T20:29:44.143Z"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"images": [
|
|
|
|
{
|
|
|
|
"name": "registry2.balena-cloud.com/v2/e2bf6410ffc30850e96f5071cdd1dca8@sha256:e2e87a8139b8fc14510095b210ad652d7d5badcc64fdc686cbf749d399fba15e",
|
|
|
|
"appId": 1658654,
|
|
|
|
"serviceName": "main",
|
|
|
|
"imageId": 2885946,
|
|
|
|
"dockerImageId": "sha256:4502983d72e2c72bc292effad1b15b49576da3801356f47fd275ba274d409c1a",
|
|
|
|
"status": "Downloaded",
|
|
|
|
"downloadProgress": null
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/state/status?desc=no_applications": {
|
|
|
|
"statusCode": 200,
|
|
|
|
"body": {
|
|
|
|
"status": "success",
|
|
|
|
"appState": "applied",
|
|
|
|
"overallDownloadProgress": null,
|
|
|
|
"containers": [],
|
|
|
|
"images": []
|
|
|
|
}
|
2020-05-08 20:04:21 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"POST": {}
|
|
|
|
}
|
2021-02-03 05:11:18 +00:00
|
|
|
}
|