Closed ivanLOliveira closed 3 days ago
We need to create a set of API endpoints to manage API keys. These endpoints should allow users with a valid API key to:
POST /api/keys
{ "userId": "string", "currentApiKey": "string" }
{ "apiKey": "string", "message": "API key created successfully" }
Route: GET /api/keysv
GET /api/keysv
Description: Allows a user to create a new API key by providing their user ID and a valid API key.
Headers:
{ "Authorization": "Bearer <currentApiKey>" }
Response:
{ "apiKeys": [ { "id": "string", "apiKey": "string", "createdAt": "string" } ] }
Errors:
Route: DELETE /api/keys
DELETE /api/keys
Description: Deletes a API key.
Resquest Body:
{ "apiKey": "string" }
{ "message": "API key deleted successfully" }
apiKey
backend, api, enhancement
backend
api
enhancement
Description
We need to create a set of API endpoints to manage API keys. These endpoints should allow users with a valid API key to:
Endpoints
1. Create API Key
POST /api/keys
2. List API Keys
Route:
GET /api/keysv
Description: Allows a user to create a new API key by providing their user ID and a valid API key.
Headers:
Response:
Errors:
3. Delete API Keys
Route:
DELETE /api/keys
Description: Deletes a API key.
Resquest Body:
Response:
Errors:
apiKey
.Tasks
Additional Context
Labels
backend
,api
,enhancement
Acceptance Criteria