Library
The bot configuration library is the central place to store and manage your bot's game configurations. Please refer to the Games section for the format required for game configurations.
Library entries comprise general information about a game entry together with metadata such as permissions and descriptions.
Endpoints
/v1/library/
List game configurations
GET /
Response:
[
<LibraryGameConfiguration>,
...
]
The format of a LibraryGameConfiguration
is given below.
Create a new game in the library
Post a
POST /
Body: <LibraryGameConfiguration>
Update a game configuration
POST /<game id>
Body: <LibraryGameConfiguration>
Add an optional comment
in the request body.
Response:
<LibraryGameConfiguration>
Retrieve a particular game configuration
GET /<game id>?version=<version id>
Query parameters:
Parameter | Description |
---|---|
version | The ID of the configuration version to retrieve. Corresponds to the version IDs returned by the list versions endpoint. |
Response:
<LibraryGameConfiguration>
List game configuration versions
GET /<game id>/versions
Response:
versions [ {
"id" : "4ecaeb94-0335-47c6-b5df-c76648095b23",
"comment" : "comment",
"createTime" : "2020-03-25T11:05:31.470Z"
} ]
The id
of the response is the ID of the created game configuration version.
Retrieve a specific version of a game configuration
GET /<game id>/<version>
Response:
<LibraryGameConfiguration>
Delete a game from the library
DELETE /<game id>
Format: LibraryGameConfiguration
{
"id" : "bb2e2ff7-65a4-4433-af69-6a063ee9e345",
"projectId" : "3a6d54e0-c478-460d-9748-1a6c51945d48",
"organizationId" : "cf102c0d-a034-408f-9e8d-809c38175605",
"gameType" : "<GameType>",
"name" : "name",
"config": "JSON game configuration content, not present in list endpoints",
"comment" : "optional comment for the configuration version",
"permissionLevel" : "ORGANIZATION | PROJECT",
"languages" : [<language>, ...],
"description" : "description",
"resourceTags" : <ResourceTags>"
}
Where ResourceTags
are a map-like structure of keys and values to tag platform resources:
{
"key" : "value",
...
}