Multibox box manager API
Multibox box life cycle RPC methods
Multibox API is accessible on the box manager URL. Please use an external REST client to access your Multibox server.
List FHIR versions supported by the server. One of these values must be used in
multibox/create-box
.Create a new box for the current user.
Parameters
Response
Parameter name | Required | Description |
---|---|---|
id | ID of the box to create Must match /[a-z][a-z0-9]{4,}/ | |
fhirVersion | FHIR version. Value must be from the multibox/versions response | |
description | description of the box to create | |
env | object with environment variables in lower-kebab-case (notUPPER_SNAKE_CASE ) |
Property name | Value | Description |
---|---|---|
id | string | ID of the created box |
description | string | Box description |
fhirVersion | string | FHIR version |
import | object | |
env | object | Envs used with BOX |
participant | object | Contains requester information |
Request
curl "multibox.example.host/rpc"
-H "Content-Type: application/json"
-H "Authorization: Basic <credential-hash>"
-d '{
"method": "multibox/create-box",
"params": {
"id": "testid",
"fhirVersion": "fhir-4.0.1",
"description": "Test box",
"env": { "aidbox-stdout-pretty": "fatal" }
}
}'
Reponse
{
"result": {
"env": {
"aidbox-stdout-pretty": "fatal"
},
"import": {
"fhir-4.0.1": {}
},
"description": "Test box",
"fhirVersion": "fhir-4.0.1",
"participant": [
{
"role": "owner",
"user": {
"id": "admin",
"resourceType": "User"
}
}
],
"id": "testid",
"resourceType": "Box",
"meta": {
"lastUpdated": "2023-03-03T13:21:58.989147Z",
"createdAt": "2023-03-03T13:21:58.989147Z",
"versionId": "7"
}
}
}
List boxes available for the current user.
Parameters
Response
Expects no parameters
Property name | Type | Description |
---|---|---|
id | string | Box ID |
fhirVersion | string | FHIR version of the box |
constraints | object | Contains max and current number of boxes |
Get box information.
Parameters
Response
Error
id
(required): id of the boxProperty name | Type | Description |
---|---|---|
| | |
| | |
| | |
description
- box description
meta
- meta info about the box resource
fhirVersion
box-url
access-url
- link to get admin access
participant
- collection of user resources
resourceType
env
- object with environment variables in lower-kebab-case (not in UPPER_SNAKE_CASE)
access-token
id
message
- "You do not have access to this box"
message
- "No box with id - "
message
- "No user session"Response
{
"result": {
"description": "Test box",
"meta": {
"lastUpdated": "2023-03-03T13:21:58.989147Z",
"createdAt": "2023-03-03T13:21:58.989147Z",
"versionId": "7"
},
"fhirVersion": "fhir-4.0.1",
"box-url": "http://testid.127.0.0.1.nip.io:8788",
"access-url": "http://testid.127.0.0.1.nip.io:8788/__sudo?token=<token>&redirect-uri=/ui/console",
"participant": [
{
"role": "owner",
"user": {
"id": "admin",
"resourceType": "User"
}
}
],
"resourceType": "Box",
"env": {
"aidbox_stdout_pretty": "fatal"
},
"access-token": <token>,
"id": "testid",
"import": {
"fhir-4.0.1": {}
}
}
}
This operation will drop the box database. Can not be undone!
Delete a box
Parameters
Response
Error
id
(required): id of the boxdescription
- box description
meta
- meta info about the box resource
fhirVersion
box-url
access-url
- link to get admin access
participant
- collection of user resources
resourceType
env
- object with environment variables in lower-kebab-case (not in UPPER_SNAKE_CASE)
access-token
id
message
- "Only owner can delete box."
message
- "Cannot delete box: \n <details>"
message
- FHIR OperationOutcome
Drop cache in every box
Parameters
Response
expects no parameters.
String: "ok".
Last modified 2mo ago