Retrieve API keys

Retrieves all the API keys in the IBM® Cloud Identity Portal.

Request

GET /GmaApi/apiKeys

Example cURL request

curl -X GET "https://hostname/GmaApi/apikeys" -v -H "Authorization: Bearer a867446e-fe28-4436-b3f5-5f67def8974d" -H "Accept: application/json" -H "Content-Type: application/json"

Resource URI

https://hostname/GmaApi/apiKeys

Authorization header

For information about obtaining an access token, see Request an access token.

Example response

{
    "oAuthClientDetails": [
        {
            "accessTokenValidity": 21600,
            "refreshTokenValidity": 86400,
            "additionalInformation": "ppn",
            "alias": "ppn",
            "oauthClientId": "client-9dcc6a4f-2e39-4eca-8dc9-24b32a089e2a"
        },
        {
            "accessTokenValidity": 21600,
            "refreshTokenValidity": 86400,
            "additionalInformation": "test",
            "alias": "test",
            "oauthClientId": "client-cad1109e-4117-400d-8b06-f7f0d7f8c568"
        },
        {
            "accessTokenValidity": 21600,
            "refreshTokenValidity": 86400,
            "additionalInformation": "kfjk",
            "alias": "kfj",
            "oauthClientId": "client-b784e3b3-38ef-4ad9-bdcf-316f25c5b1b3"
        },
        {
            "accessTokenValidity": 21600,
            "refreshTokenValidity": 86400,
            "additionalInformation": "Prashant",
            "alias": "PrashantKey",
            "oauthClientId": "client-bc67c21a-96a4-4c9d-a1fc-212203c38ac4"
        }] "status": {
        "success": true,
        "apiError": false,
        "message": "Success",
        "errors": {}
    }

Response parameters

Table 1. Query parameters
Parameter Description
status Returns whether the request was successful. Returns an error when the request is unsuccessful. For more information about errors, see Errors.
accessTokenValidity Specifies for how many seconds this token is valid. The approximate number of hours or days for the value that you entered is shown next to this field.
Note: Minimum validity token time= 30 minutes and maximum validity token time=12hours.
refreshTokenValidity Specifies the number of seconds for the Refresh Token Validity time, which must be greater than the Access Token Validity value.
Note: Minimum refresh token time=12 hours and maximum refresh token time=7 days.
additionalInformation Describe what the key is used for and where it is.
alias Create an alternate name for the API key with fifty alphanumeric characters or less that is easy to identify.
oauthClientId Client id generated from API key.