Получить API-ключ
Данные API-ключа можно получить с помощью curl-запроса.
Пример запроса:
curl --location 'https://iam.api.cloud.ru/api/v1/service-accounts/credentials/api-keys/{id}' \--header 'accept: application/json' \--header 'Authorization: Bearer $TOKEN' \--header 'Cookie: SERVERID=s1'
Где:
id — идентификатор API-ключа. Передается при создании API-ключа.
$TOKEN — авторизационный токен.
Пример ответа:
{"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","name": "api-key-test","description": "тестовый api-key","service_account_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","products": ["monaas"],"secret": "","restrictions": {"ip_addresses": {"ip_addresses": ["xxx.xxx.x.x"]},"time_range": {"time_slots": [{"start": 18,"end": 19}],"timezone": 3}},"enabled": true,"created_at": "2024-03-25T06:13:57.605545Z","updated_at": "2024-03-25T06:13:57.605551Z","expires_at": "2024-04-23T09:32:02.984Z"}