cURL
curl --request POST \ --url https://api.logfleet.io/api/v1/api-keys \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "name": "Production Edge Agents", "permissions": [ "edge:register" ], "expires_at": "2023-11-07T05:31:56Z" } '
{ "api_key": { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "name": "<string>", "key_prefix": "<string>", "permissions": [ "<string>" ], "last_used_at": "2023-11-07T05:31:56Z", "expires_at": "2023-11-07T05:31:56Z", "revoked_at": "2023-11-07T05:31:56Z", "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "created_at": "2023-11-07T05:31:56Z" }, "raw_key": "<string>" }
Create a new API key for edge agents. The raw key is only returned once in the response. Store it securely.
raw_key
JWT token obtained from /auth/login
"Production Edge Agents"
1
edge:register
edge:heartbeat
edge:metrics
edge:stream
API key created
Show child attributes
The actual API key. Only shown once!