feat: get metadata about the current api key (#21027)
This commit is contained in:
@@ -1488,6 +1488,38 @@
|
||||
"description": "This endpoint requires the `apiKey.create` permission."
|
||||
}
|
||||
},
|
||||
"/api-keys/me": {
|
||||
"get": {
|
||||
"operationId": "getMyApiKey",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/APIKeyResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"API Keys"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api-keys/{id}": {
|
||||
"delete": {
|
||||
"operationId": "deleteApiKey",
|
||||
|
||||
@@ -2027,6 +2027,14 @@ export function createApiKey({ apiKeyCreateDto }: {
|
||||
body: apiKeyCreateDto
|
||||
})));
|
||||
}
|
||||
export function getMyApiKey(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: ApiKeyResponseDto;
|
||||
}>("/api-keys/me", {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* This endpoint requires the `apiKey.delete` permission.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user