Getting Google Cloud Key Rings
Use the post /v1/cckm/google/get-key-rings API to fetch the Google Cloud key rings from a project linked with a Google Cloud connection. These key rings can be added to the CipherTrust Manager and managed through CCKM.
Syntax
curl -k '<IP>/api/v1/cckm/google/get-key-rings' -H 'Authorization: Bearer AUTHTOKEN' -H 'Content-Type: application/json' --data-binary $'{\n  "location": "<location>",\n  "project_id": "<project_id>",\n  "connection": "<connection>",\n  "page_size": <page_size>\n}' --compressed
Request Parameters
| Parameter | Type | Description | 
|---|---|---|
| AUTHTOKEN | string | Authorization token. | 
| connection | string | Name or ID of the Google Cloud connection on the CipherTrust Manager. | 
| location | string | Name of the Google Cloud location. To get the list of Google Cloud locations, refer to Google Google Cloud Location API. | 
| page_size | number | Number of the Google Cloud key rings to list. | 
| project_id | string | Name or ID of the Google Cloud project where the Google Cloud key ring resides. To determine the project ID, run the post /v1/cckm/google/get-projectsorget /v1/cckm/google/projectsAPI. Refer to Fetching a Project from GCP or Viewing Google Cloud Projects. | 
| page_token | string | Token that you can use to get the list of remaining Google Cloud key rings beyond the number set in page_size. For example, if the total number of Google Cloud key rings is20, and you havepage_sizeto11, then specifypage_tokento view the remaining9key rings. | 
Example Request
curl -k 'https://127.0.0.1/api/v1/cckm/google/get-key-rings' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJhOGY3N2IxZS1lOTY2LTQwMjEtODRjMC01YjZiNjAzMTBmOWEiLCJzdWIiOiJsb2NhbHwzM2Y5ZDFmNi04MjJiLTQ0NTItOGM4MC1mYzM0ZGYyZTI3OGQiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiNjcyMjMzMDAtYjU2ZC00ZmVmLTkwMDEtZGE1NGY2ZDdiMzY4Iiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6ImFmMTFhYjM0LTFiNmQtNGY0Zi04ZTEzLTAxOGQ2ZGJlOTZlZiIsImlhdCI6MTYyMDE5NTM4OSwiZXhwIjoxNjIwMTk1Njg5fQ.PLhevpNJb6SRNJwkSZ8k_n_YpZlyU6-Fv8kkYfvsh3Q' -H 'Content-Type: application/json' --data-binary $'{\n  "location": "global",\n  "project_id": "gemalto-kyloeng",\n  "connection": "gcp-connection",\n  "page_size": 1\n}' --compressed
Example Response
{
    "key_rings": [
        {
            "name": "projects/gemalto-kyloeng/locations/global/keyRings/demo-key-ring",
            "create_time": {
                "seconds": 1613380512,
                "nanos": 116038147
            }
        }
    ],
    "next_page_token": "ALm5f_QL0rhnVbWlCLRCG5qd5dUr74hyUQ8NXPOhoRM1aeHvUXJ1S_HlpBaQ1Bcrms7HMQyF",
    "total_size": 7,
    "connection": "gcp-connection"
}
The sample output displays the list of Google Cloud key rings based on the specified Google Cloud connection, location, and project ID.
Response Codes
| Response Code | Description | 
|---|---|
| 2xx | Success | 
| 4xx | Client errors | 
| 5xx | Server errors | 
Refer to HTTP status codes for details.