Get the authenticated user's managed gateway-key status
curl --request GET \
--url https://harness.example.com/gateway/key \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://harness.example.com/gateway/key', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://harness.example.com/gateway/key"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"enabled": true,
"email": "jsmith@example.com",
"status": "ready",
"alias": "<string>",
"external_id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"last_reconciled_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"invalidated_at": "2023-11-07T05:31:56Z",
"invalidation_reason": "<string>",
"next_retry_at": "2023-11-07T05:31:56Z"
}Gateway
Get the authenticated user's managed gateway-key status
Credential and inference JWT values are never returned.
GET
/
gateway
/
key
Get the authenticated user's managed gateway-key status
curl --request GET \
--url https://harness.example.com/gateway/key \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://harness.example.com/gateway/key', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://harness.example.com/gateway/key"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"enabled": true,
"email": "jsmith@example.com",
"status": "ready",
"alias": "<string>",
"external_id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"last_reconciled_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"invalidated_at": "2023-11-07T05:31:56Z",
"invalidation_reason": "<string>",
"next_retry_at": "2023-11-07T05:31:56Z"
}Authorizations
OAuth 2.0 access token obtained through RFC 8628 at /api/auth/device/code and /api/auth/oauth2/token. The API enforces governance:read, session:write, and client-status:write as appropriate.
Response
200 - application/json
Managed gateway-key status and non-secret metadata
Available options:
ready, missing, invalid, recovering, error Opaque gateway identifier, never the credential value.
