This REST API lets you create Spaces and their Tickets programatically.
As well as this guide we have some resources to help use this API:
To access this API you must use an API Key created in the Panaudia web console.
To create an API Key navigate to the Organisation page in the web console and click on the API Keys tab. Then Click + to create a new Key for this Organisation.
You will be asked to give the key a name, choose its permissions and select which projects it can access. The name can be anything you like, it's just to help you to identify it. Choose read and write for a Key that can create new Shapes and Tickets, or just read for one that can only browse resources. You can select a number of existing Projects for the Key ot access or pick All Projects. If you choose All Projects the key will work for any new Projects created in the future as well as existing ones.
When you create an API Key you will see its two parts, an ID and a secret, something like this:
API Key ID apikey_6905b764-b670-4184-bc80-b23c34f78bfe API Key Secret uphnj3nfrjw9j59y39d4zlrglq3q4i9zjz7l285y
Copy these both down right away and store them somewhere safe, we don't keep a copy of the secret so if you lose it you will have to delete its Key and create a new one. Store and use the Secret securely as anyone with access to it will be able to create resources on your account.
To use an API Key to access this API you should present it using Basic http auth with the ID as the username and the secret as the password in every call to the API.
You can check what permissions an API Key has:
GET /permissions
You can browse available Projects with:
GET /projects
And view a single Project with:
GET /projects/{project-id}
You can view all the Spaces for a Project with,
GET /projects/{project-id}/spaces
which can also be filtered by Space status,
GET /projects/{project-id}/spaces?status={status}
and you can view a single Space with.
GET /spaces/{space-id}
To create a new Space post to:
POST /projects/{project-id}/spaces
giving these details about the space you want in a json body:
which should look something like this:
{
"name": "Example Space One",
"start_time": "2024-12-05T09:30:00Z",
"region": "Netherlands",
"capacity": 100,
"size": 40,
"description": "This is a very fine example Space.",
"duration_minutes": 60,
"public_key": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA8gWcYikVd36AGFBDIgPRohe/qf3bzAyO2iTgz4148qQ=\n-----END PUBLIC KEY-----"
}
The value for public_key is optional and only necessary if you would like to create and sign Tickets for this Space yourself, rather than use this API to do it.
You can read full details of Ticket configuration options on the Tickets page.
You can create tickets for a Space with:
POST /spaces/{space-id}/tickets
Post the json configuration for a ticket. A simple Ticket request could be just a name:
{ "name": "Paul" }
or something with extra configuration:
{
"name": "Paul",
"uuid": "7dc3d357-63f4-433b-b8cd-5b7cd6bee3aa",
"not_before": "2024-12-03T10:00:00Z",
"expires": "2024-12-03T12:00:00Z",
"attenuation": 1.5,
"gain": 1.2,
"priority": true,
"attrs": {"colour": "00aaff"}
}