Dynamic Stores
Endpoints for managing dynamic data stores
Gets a dynamic data store by specific ID.
await BitBadgesApi.getDynamicDataStore("dynamicStore123", { ... });SDK Links:
Scopes:
manageDynamicDataStores- Required and must be owner. Alternatively, you can specify the dataSecret.
Dynamic data store ID
The data secret to fetch. Only needed if you are not signed in as creator. Not applicable to public stores
Success response
Bad Request - Invalid configuration or request
Internal Server Error
GET /api/v0/dynamicStore/{dynamicStoreId} HTTP/1.1
Host: api.bitbadges.io
x-api-key: YOUR_API_KEY
Accept: */*
{
"doc": {
"_docId": "text",
"_id": "text",
"handlerId": "email",
"dynamicDataId": "text",
"label": "text",
"dataSecret": "text",
"data": null,
"createdBy": "bb1...",
"managedBy": "bb1...",
"publicUseInClaims": true,
"createdAt": "1713301889",
"lastUpdated": "1713301889"
}
}Gets a value from a dynamic data store by specific ID and key.
await BitBadgesApi.getDynamicDataStoreValue("dynamicStore123", { key: "key123", ... });SDK Links:
Scopes:
manageDynamicDataStores- Required and must be owner. You can also specify the dataSecret.
Dynamic data store ID
The key to fetch.
The data secret to fetch. Only needed if you are not signed in as creator. Not applicable to public stores
The lookup type to fetch (if you need to specify).
Success response
Bad Request - Invalid configuration or request
Internal Server Error
GET /api/v0/dynamicStore/{dynamicStoreId}/value?key=text HTTP/1.1
Host: api.bitbadges.io
x-api-key: YOUR_API_KEY
Accept: */*
{
"key": "text",
"lookupType": "id",
"inStore": true
}Gets a paginated list of values from a dynamic data store by specific ID.
await BitBadgesApi.getDynamicDataStoreValuesPaginated("dynamicStore123", { ... });SDK Links:
Scopes:
manageDynamicDataStores- Required and must be owner.
Dynamic data store ID
The data secret to fetch. Only needed if you are not signed in as creator. Not applicable to public stores
The pagination bookmark to start from
The lookup type to fetch (if you need to specify).
Success response
Bad Request - Invalid configuration or request
Internal Server Error
GET /api/v0/dynamicStore/{dynamicStoreId}/values HTTP/1.1
Host: api.bitbadges.io
x-api-key: YOUR_API_KEY
Accept: */*
{
"lookupValues": [
{
"key": "text",
"lookupType": "id",
"inStore": true
}
],
"pagination": {
"bookmark": "text",
"hasMore": true
}
}Creates a new dynamic data store.
await BitBadgesApi.createDynamicDataStore(...);SDK Links:
Scopes:
manageDynamicDataStores- Required and must be owner.
BitBadges API Key for authentication
The handler ID for the dynamic data store
emailThe label of the dynamic data store
Whether the dynamic data store should be public. If true, the data can be accessed without authentication. Defaults to false (private).
Success response
Bad Request - Invalid configuration or request
Internal Server Error
POST /api/v0/dynamicStores HTTP/1.1
Host: api.bitbadges.io
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 61
{
"handlerId": "email",
"label": "text",
"publicUseInClaims": true
}{
"doc": {
"_docId": "text",
"_id": "text",
"handlerId": "email",
"dynamicDataId": "text",
"label": "text",
"dataSecret": "text",
"data": null,
"createdBy": "bb1...",
"managedBy": "bb1...",
"publicUseInClaims": true,
"createdAt": "1713301889",
"lastUpdated": "1713301889"
}
}Updates a dynamic data store.
await BitBadgesApi.updateDynamicDataStore(...);SDK Links:
Scopes:
manageDynamicDataStores- Required and must be owner.
Dynamic data store ID
The dynamic data ID to update
Whether to rotate the data secret
The new label
Success response
Bad Request - Invalid configuration or request
Internal Server Error
PUT /api/v0/dynamicStores HTTP/1.1
Host: api.bitbadges.io
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 63
{
"dynamicDataId": "text",
"rotateDataSecret": true,
"label": "text"
}{
"doc": {
"_docId": "text",
"_id": "text",
"handlerId": "email",
"dynamicDataId": "text",
"label": "text",
"dataSecret": "text",
"data": null,
"createdBy": "bb1...",
"managedBy": "bb1...",
"publicUseInClaims": true,
"createdAt": "1713301889",
"lastUpdated": "1713301889"
}
}Deletes a dynamic data store.
await BitBadgesApi.deleteDynamicDataStore(...);SDK Links:
Scopes:
manageDynamicDataStores- Required and must be owner.
Dynamic data store ID
The dynamic data ID to delete
Success response
Bad Request - Invalid configuration or request
Internal Server Error
DELETE /api/v0/dynamicStores HTTP/1.1
Host: api.bitbadges.io
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 24
{
"dynamicDataId": "text"
}{
"message": "text"
}Performs a single action on a dynamic store using body authentication.
For more information on this route, see the Dynamic Stores > Manage tab in the developer portal.
await BitBadgesApi.performStoreAction(...);Documentation References / Tutorials:
SDK Links:
Scopes:
manageDynamicStores- Required if you do not specify the data secret
BitBadges API Key for authentication
Whether to simulate the action
The dynamic data ID
The data secret. Needed if you are not signed in as creator. Not applicable to public stores
The name of the action to perform
addSuccess response
Bad Request - Invalid configuration or request
Internal Server Error
POST /api/v0/storeActions/single HTTP/1.1
Host: api.bitbadges.io
x-api-key: text
Authorization: cookie YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 133
{
"_isSimulation": true,
"dynamicDataId": "text",
"dataSecret": "text",
"actionName": "add",
"payload": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}{}Performs multiple actions on a dynamic store using body authentication.
For more information on this route, see the Dynamic Stores > Manage tab in the developer portal.
await BitBadgesApi.performBatchStoreAction(...);Documentation References / Tutorials:
SDK Links:
Scopes:
manageDynamicStores- Required if you do not specify the data secret
BitBadges API Key for authentication
Whether to simulate the action
The dynamic data ID
The data secret. Needed if you are not signed in as creator. Not applicable to public stores
Success response
Bad Request - Invalid configuration or request
Internal Server Error
POST /api/v0/storeActions/batch HTTP/1.1
Host: api.bitbadges.io
x-api-key: text
Authorization: cookie YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 147
{
"_isSimulation": true,
"dynamicDataId": "text",
"dataSecret": "text",
"actions": [
{
"actionName": "add",
"payload": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]
}{}Fetches dynamic stores by ID(s).
await BitBadgesApi.getDynamicDataStores(...);Documentation References / Tutorials:
SDK Links:
Scopes:
manageDynamicStores- Required (or specify the valid data secret)
BitBadges API Key for authentication
The IDs to fetch. If not provided, all dynamic data stores will be fetched for the current signed in address without any data populated.
The data secret to fetch. Only needed if you are not signed in as creator. Not applicable to public stores
Success response
Bad Request - Invalid configuration or request
Internal Server Error
POST /api/v0/dynamicStores/fetch HTTP/1.1
Host: api.bitbadges.io
x-api-key: text
Authorization: cookie YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 47
{
"dynamicDataIds": [
"text"
],
"dataSecret": "text"
}{
"docs": [
{
"_docId": "text",
"_id": "text",
"handlerId": "email",
"dynamicDataId": "text",
"label": "text",
"dataSecret": "text",
"data": null,
"createdBy": "bb1...",
"managedBy": "bb1...",
"publicUseInClaims": true,
"createdAt": "1713301889",
"lastUpdated": "1713301889"
}
],
"pagination": {
"bookmark": "text",
"hasMore": true
}
}Searches for dynamic stores based on the provided criteria. Currently, this only gets the signed in user's dynamic stores.
await BitBadgesApi.searchDynamicDataStores(...);Documentation References / Tutorials:
SDK Links:
Scopes:
manageDynamicStores- Required
The pagination bookmark to start from
BitBadges API Key for authentication
Success response
Bad Request - Invalid configuration or request
Internal Server Error
GET /api/v0/dynamicStores/search HTTP/1.1
Host: api.bitbadges.io
x-api-key: text
Authorization: cookie YOUR_SECRET_TOKEN
Accept: */*
{
"docs": [
{
"_docId": "text",
"_id": "text",
"handlerId": "email",
"dynamicDataId": "text",
"label": "text",
"dataSecret": "text",
"data": null,
"createdBy": "bb1...",
"managedBy": "bb1...",
"publicUseInClaims": true,
"createdAt": "1713301889",
"lastUpdated": "1713301889"
}
],
"pagination": {
"bookmark": "text",
"hasMore": true
}
}Fetches activity history for dynamic stores.
await BitBadgesApi.getDynamicDataActivity(...);Documentation References / Tutorials:
SDK Links:
Scopes:
manageDynamicStores- Required (or specify the valid data secret)
The dynamic data ID to fetch activity for
The pagination bookmark to start from
The data secret to fetch activity for. Needed if you are not signed in as creator. Not applicable to public stores
BitBadges API Key for authentication
Success response
Bad Request - Invalid configuration or request
Internal Server Error
GET /api/v0/dynamicStores/activity?dynamicDataId=text HTTP/1.1
Host: api.bitbadges.io
x-api-key: text
Authorization: cookie YOUR_SECRET_TOKEN
Accept: */*
{
"pending": [
{
"dynamicDataId": "text",
"handlerId": "email",
"actions": [],
"lastFetchedAt": 1,
"numRetries": 1,
"nextFetchTime": 1,
"error": "text"
}
],
"history": {
"docs": [
{
"dynamicDataId": "text",
"updatedAt": 1,
"actions": []
}
],
"pagination": {
"bookmark": "text",
"hasMore": true
}
}
}Last updated