nooschain / api/routes/bucket/bucket-metadata-routes / registerBucketMetadataRoutes
Function: registerBucketMetadataRoutes()
registerBucketMetadataRoutes(
context,resolveActor):void
Defined in: api/routes/bucket/bucket-metadata-routes.ts:22
Registers API routes for retrieving bucket metadata, including bucket information such as name, description, replication policy, encryption mode, and custom metadata. The route enforces appropriate permissions and requires an authenticated actor with read access to the bucket's metadata. If the bucket is found, it returns the metadata along with a 200 status code; if the bucket is not found, it returns a 404 status code with an error message.
Parameters
context
The API route context containing the database instance and server.
resolveActor
(headers) => Promise<ApiAuthResult>
A function to resolve the actor making the API request based on the provided headers.
Returns
void