# Admin

Administrative endpoints (requires bearer token authentication)

## Create or update registry entries

> Administrative endpoint for manually creating or updating registry entries.\
> This endpoint fetches entity data from Catalyst and asset bundle status from\
> the CDN to populate the registry.\
> \
> Use this endpoint to manually trigger registry updates for specific entities\
> that may have been missed by the event-driven pipeline.<br>

```json
{"openapi":"3.1.0","info":{"title":"Asset Bundle Registry API","version":"1.0.0"},"tags":[{"name":"Admin","description":"Administrative endpoints (requires bearer token authentication)"}],"servers":[{"url":"https://asset-bundle-registry.decentraland.org","description":"Production server"},{"url":"/","description":"Local/relative path"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token authentication for administrative endpoints. The token must match\nthe `API_ADMIN_TOKEN` environment variable configured on the server.\n"}}},"paths":{"/registry":{"post":{"tags":["Admin"],"summary":"Create or update registry entries","description":"Administrative endpoint for manually creating or updating registry entries.\nThis endpoint fetches entity data from Catalyst and asset bundle status from\nthe CDN to populate the registry.\n\nUse this endpoint to manually trigger registry updates for specific entities\nthat may have been missed by the event-driven pipeline.\n","operationId":"createRegistry","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entityIds":{"type":"array","items":{"type":"string"},"description":"List of entity IDs (CIDs) to add or update in the registry"}},"required":["entityIds"]}}}},"responses":{"200":{"description":"Registry operation result","content":{"application/json":{"schema":{"type":"object","description":"Result of registry creation/update operation","properties":{"successes":{"type":"array","items":{"type":"object"},"description":"List of successfully processed entities"},"failures":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"string","description":"Entity ID that failed"},"error":{"type":"string","description":"Error message describing the failure"}}},"description":"List of entities that failed to process"}},"required":["successes","failures"]}}}},"400":{"description":"Bad request - no entity IDs provided","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}},"required":["error"]}}}},"401":{"description":"Unauthorized - missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}},"required":["error"]}}}}}}}}}
```

## Flush internal caches

> Administrative endpoint for flushing internal job caches. This clears\
> cached job status information stored in Redis/memory.\
> \
> \
> Use this endpoint to reset cache state when troubleshooting or after\
> manual database modifications.<br>

```json
{"openapi":"3.1.0","info":{"title":"Asset Bundle Registry API","version":"1.0.0"},"tags":[{"name":"Admin","description":"Administrative endpoints (requires bearer token authentication)"}],"servers":[{"url":"https://asset-bundle-registry.decentraland.org","description":"Production server"},{"url":"/","description":"Local/relative path"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token authentication for administrative endpoints. The token must match\nthe `API_ADMIN_TOKEN` environment variable configured on the server.\n"}}},"paths":{"/flush-cache":{"delete":{"tags":["Admin"],"summary":"Flush internal caches","description":"Administrative endpoint for flushing internal job caches. This clears\ncached job status information stored in Redis/memory.\n\n\nUse this endpoint to reset cache state when troubleshooting or after\nmanual database modifications.\n","operationId":"flushCache","responses":{"200":{"description":"Cache flush result","content":{"application/json":{"schema":{"type":"object","description":"Result of cache flush operation","properties":{"ok":{"type":"boolean","description":"Whether the operation succeeded"},"message":{"type":"string","description":"Status message"}},"required":["ok","message"]}}}},"401":{"description":"Unauthorized - missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}},"required":["error"]}}}}}}}}}
```
