Disabilitare una chiave API
Management key required. Disabilita una chiave API di modello del team. Le richieste possono essere ripetute.
api_key_id nell’URL è il campo id, in formato ak_..., restituito da Crea una chiave API di modello (POST /public/v1/api-keys). Salvalo per disattivare o eliminare la chiave, impostarne il limite e consultarne l’utilizzo. Il campo key (apikey-...) serve per le chiamate ai modelli; le chiamate di gestione usano sempre mgmt-... nell’header di autorizzazione.
Management key required. Use a Management API Key (mgmt-...) for your Team, created by a Team Owner. Requests use the Team associated with that key.
No request body. Can manage keys owned by any member, including keys in archived projects. Repeated disabling succeeds. Deleted keys return 404. Follows existing key revocation and gateway cache refresh behavior.
Authorization
ManagementKeyBearer Management key required. Send Authorization: Bearer mgmt-....
In: header
Path Parameters
The id returned by Create a model API key (POST /public/v1/api-keys). Copy the complete ak_... value into this path parameter. Use the mgmt-... management key in the authorization header; the returned key (apikey-...) is for model calls.
^ak_[0-9A-Za-z]{22}$Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/public/v1/api-keys/ak_0123456789ABCDEFGHIJKL/disable"{ "object": "api_key", "id": "ak_0123456789ABCDEFGHIJKL", "enabled": false, "request_id": "req_example"}Last updated on
Creare una chiave API di progetto POST
Management key required. Crea una chiave di modello collegata a un progetto. Il segreto viene restituito una sola volta.
Eliminare una chiave API DELETE
Management key required. Elimina definitivamente una chiave API di modello conservandone lo storico di utilizzo.