Metadata Operations
Developing
POST
https://api.lootlocker.io/admin/game/{game_id}/metadata/
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://api.lootlocker.io/admin/game//metadata/' \
--header 'x-auth-token: ' \
--header 'x-auth-token;' \
--header 'Content-Type: application/json' \
--data-raw '{
"source": "leaderboard",
"source_id": "01J8030AMYTZN4ZQ4WBT3V8XGP",
"entries": [
{
"value": true,
"key": "has_beta_access",
"type": "bool",
"tags": [],
"access": [
"game_api.read"
],
"action": "create"
},
{
"value": "xXx_ProGamer9000_xXx",
"key": "preferred_nickname",
"type": "string",
"tags": [
"foo"
],
"access": [
"game_api.read",
"game_api.write"
],
"action": "create"
},
{
"value": 25,
"key": "player_age",
"type": "number",
"tags": [
"foo",
"bar"
],
"access": [
"game_api.read"
],
"action": "create"
},
{
"value": 35,
"key": "player_age",
"type": "number",
"tags": [
"foo",
"bar"
],
"access": [
"game_api.read"
],
"action": "update"
},
{
"value": {
"key": "value",
"properties": {
"tutorial_complete": true,
"chapter_one_complete": true
}
},
"key": "game_state",
"type": "json",
"tags": [],
"access": [
"game_api.read"
],
"action": "create"
},
{
"value": {
"content_type": "image/jpeg",
"content": "iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII="
},
"key": "chosen_icon",
"type": "base64",
"tags": [],
"access": [
"game_api.read"
],
"action": "create"
},
{
"key": "some_deprecated_key",
"action": "delete"
}
]
}'
Response Response Example
{
"metadata": {
"entries": [
{
"access": [
"game_api.read"
],
"key": "some-key",
"tags": [
"foo",
"bar"
],
"type": "number",
"value": 1
}
],
"errors": [
{
"action": "create",
"entry": {
"key": "some-key",
"type": "number"
},
"error": "error performing operation: error creating metadata: validation error for metadata: duplicate keys are not allowed, params(InsertParams{GameID: 2, SourceID: 01J3ZEYRX4QVFZ0QC4DF4J1SST, TitleID: 01J3ZEXANK12W9Q8Q406M10NN8, EnvironmentID: 01J3ZEXANVKWGJPEA950GYGTKN}), action(create)"
}
]
},
"source": "reward",
"source_id": "01J3ZEYRX4QVFZ0QC4DF4J1SST"
}
Request
Path Params
game_id
stringÂ
required
Example:
{{dev_game_id}}
Header Params
x-auth-token
stringÂ
optional
Example:
{{admin_auth_token}}
Body Params application/json
Responses
Modified at 2024-09-19 12:24:55