Viewing Versions of a Google Cloud Key
Use the get /v1/cckm/google/keys/{id}/versions API to view the versions of a Google Cloud key with the given ID.
Syntax
curl -k '<IP>/api/v1/cckm/google/keys/{id}/versions?skip=0&limit=10' -H 'Authorization: Bearer AUTHTOKEN' --compressed
Here, {id} represents the resource ID of the Google Cloud key on the CipherTrust Manager. The resource id is different than key_id.
Request Parameters
| Parameter | Type | Description | 
|---|---|---|
| AUTHTOKEN | string | Authorization token. | 
Request Query Parameters
| Parameter | Type | Description | 
|---|---|---|
| version_id | string | ID of the version resource on the CipherTrust Manager. | 
| version | string | ID of the Google Cloud key version. This is different than version_id. | 
| name | string | Full name of the Google Cloud key version. for example, projects/gemalto-kyloeng/locations/global/keyRings/demo-key-ring/cryptoKeys/TestKey2/cryptoKeyVersions/1. | 
| state | string | State of the Google Cloud key version. The states can be: • ABORTED • PENDING_GENERATION • ENABLED • DISABLED • DESTROY_SCHEDULED • DESTROYED | 
| algorithm | string | Algorithm of the Google Cloud key version. | 
| is_primary | boolean | Whether the version is the primary version of the Google Cloud key. Specify trueto fetch the primary version,falseto fetch non-primary versions. | 
| deleted | boolean | Whether the key version is deleted. | 
| gone | boolean | Whether the key version exists in the cloud. | 
| key_material_origin | string | Source of the key material. The origin of the key can be: • cckm: Key material is created on CCKM. • native: Key material is created on the Google Cloud. • unknown: Source of the key material is unknown. It is different than CCKM and the native cloud. | 
| skip | integer | Number of records to skip. For example, if "skip":5is specified, the first five records will not be displayed in the output. | 
| limit | integer | Numbers of records to display. For example, if "limit":10is specified, then the next 10 records (after skipping the number of records specified in theskipparameter) will be displayed in the output. | 
| sort | string | Comma-delimited list of properties to sort the results. | 
Example Request
curl -k 'https://127.0.0.1/api/v1/cckm/google/keys/2f18eade-2fd9-4c48-85f7-550107729299/versions?skip=0&limit=10' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiI0MmFmZDExNy02YzllLTRhNGUtOTAwYS1lYjlhNDNjYWE5ZDIiLCJzdWIiOiJsb2NhbHwzMTI5ODdkMS0wOWNiLTQxZTEtOThmNy1jZjRhNzgwNTZiMTMiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiNDVmOWE3NWUtMzI1NC00NWJkLWE0NzYtOWU2NWUyNjdmNGVkIiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6IjdiYzNkOWM4LWRiYTQtNDVmMy05YWNiLWI3NGM2MzQyYzYyMCIsImlhdCI6MTYxNDc1MTg1MSwiZXhwIjoxNjE0NzUyMTUxfQ.ahdxfM7-WA4u7sotHy6qelc9MkoZytst7oZWsvE7Cr0' --compressed
Example Response
{
    "skip": 0,
    "limit": 10,
    "total": 1,
    "resources": [
        {
            "id": "ec3904bc-b29c-464b-9573-c1b99b1d8919",
            "uri": "kylo:kylo:cckm:gcp-key-versions:ec3904bc-b29c-464b-9573-c1b99b1d8919",
            "account": "kylo:kylo:admin:accounts:kylo",
            "createdAt": "2021-05-05T03:06:13.44059Z",
            "updatedAt": "2021-05-05T06:09:33.801162Z",
            "parent_key_name": "projects/gemalto-kyloeng/locations/global/keyRings/demo-key-ring/cryptoKeys/TestKey2",
            "parent_key_id": "2f18eade-2fd9-4c48-85f7-550107729299",
            "key_ring_name": "projects/gemalto-kyloeng/locations/global/keyRings/demo-key-ring",
            "version": 1,
            "is_primary": false,
            "key_material_origin": "native",
            "deleted": false,
            "gone": false,
            "gcp_key_version_params": {
                "name": "projects/gemalto-kyloeng/locations/global/keyRings/demo-key-ring/cryptoKeys/TestKey2/cryptoKeyVersions/1",
                "state": "ENABLED",
                "protectionLevel": "SOFTWARE",
                "algorithm": "RSA_DECRYPT_OAEP_3072_SHA256",
                "createTime": "2021-05-05T03:06:14.289985Z",
                "generateTime": "2021-05-05T03:06:14.289985Z",
                "destroyEventTime": null
            }
        }
    ]
}
The sample output displays that the Google Cloud key with the ID 2f18eade-2fd9-4c48-85f7-550107729299 has only one version represented by "version": 1.
Response Codes
| Response Code | Description | 
|---|---|
| 2xx | Success | 
| 4xx | Client errors | 
| 5xx | Server errors | 
Refer to HTTP status codes for details.