Viewing OCI Key Versions
Use the get /v1/cckm/oci/keys/{id}/versions API to view the list of OCI key versions.
Syntax
curl -k '<IP>/api/v1/cckm/oci/keys/{id}/versions' -H 'Authorization: Bearer AUTHTOKEN'  -H 'accept: application/json' --compressed
Here, {id} is the resource ID of the OCI key.
Request Parameters
| Parameter | Type | Description | 
|---|---|---|
| AUTHTOKEN | string | Authentication token. | 
| origin | string | Origin of the OCI key version. | 
| version_id | string | Internal id of the OCI key version. | 
| is_primary | boolean | Whether the version is primary. Specify truefor primary key versions. | 
| 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. | 
Example Request
curl -k 'https://127.0.0.1/api/v1/cckm/oci/keys/69f02b1d-c7c7-45fb-84e3-7d2f86a3f60b/versions?skip=0&limit=10&sort=updatedAt' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiIxYzU1ZWY0Yi01MThjLTQ5ZmMtODRmMy1mYjk4MGY4YTQ3ODQiLCJzdWIiOiJsb2NhbHwyZjBmZWViNC02MjkwLTQ4ZWQtYmU1Yy0wYmU4NTVkMzE4NzMiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiODU3ZDEyYjItNjljZi00OWY1LThkYjktMjI0NWMwODNiODg5Iiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6IjBjYTM2YTI5LWUyYzktNDkyZi05YjE3LTIwODM2MDIyNWVjOSIsImlhdCI6MTY0Mzg2Mzg4MywiZXhwIjoxNjQzODY0MTgzfQ.lcwHs7FhSH3oe32vWdyShTvsTGLrmO5WIFvMdu_l-wo' -H 'accept: application/json' --compressed
Example Response
{
    "skip": 0,
    "limit": 10,
    "total": 2,
    "resources": [
        {
            "id": "0d14b497-68db-474a-8d94-9e47507a122d",
            "uri": "kylo:kylo:cckm:oci-key-version:0d14b497-68db-474a-8d94-9e47507a122d",
            "account": "kylo:kylo:admin:accounts:kylo",
            "createdAt": "2022-02-03T04:19:44.207633Z",
            "updatedAt": "2022-02-03T04:19:44.206423Z",
            "cloud_name": "oci",
            "key_material_origin": "native",
            "refreshed_at": "2022-02-03T04:19:44.206205Z",
            "gone": false,
            "oci_key_version_params": {
                "compartment_id": "ocid1.tenancy.oc1..aaaaaaaadixb52q2mvlsn634ql5aaal6hb2vg7audpd4d4mcf5zluymff6sq",
                "version_id": "ocid1.keyversion.oc1.iad.b5q6uxdhaahdg.aueimh37hmyaa.abuwcljrbk43ltuxvvemkwpbbb3bub6omxng5cmfd4drqykeqaotarhxzzna",
                "key_id": "ocid1.key.oc1.iad.b5q6uxdhaahdg.abuwcljrbluqjkyywbhoho652oxrngjibgq5yhtxbeonszmmj7g4zgj4efma",
                "time_created": "2022-01-31T14:35:31.428Z",
                "vault_id": "ocid1.vault.oc1.iad.b5q6uxdhaahdg.abuwcljs6qwagycytfmnryece3u55fswvaioqfeozixgt5if5f354umdamdq",
                "lifecycle_state": "ENABLED",
                "origin": "INTERNAL",
                "is_primary": true
            }
        },
        {
            "id": "ec7acd24-bbe7-40c1-9c66-efb4467559c9",
            "uri": "kylo:kylo:cckm:oci-key-version:ec7acd24-bbe7-40c1-9c66-efb4467559c9",
            "account": "kylo:kylo:admin:accounts:kylo",
            "createdAt": "2022-02-03T04:51:54.435551Z",
            "updatedAt": "2022-02-03T04:51:54.43417Z",
            "gone": false,
            "oci_key_version_params": {
                "compartment_id": "ocid1.tenancy.oc1..aaaaaaaadixb52q2mvlsn634ql5aaal6hb2vg7audpd4d4mcf5zluymff6sq",
                "version_id": "ocid1.keyversion.oc1.iad.b5q6uxdhaahdg.avaimh5v62iaa.abuwcljstdcbcw2rpy56v5m55t5ygq4xucitd6wdqrmk4dazymr2zya7zabq",
                "key_id": "ocid1.key.oc1.iad.b5q6uxdhaahdg.abuwcljrbluqjkyywbhoho652oxrngjibgq5yhtxbeonszmmj7g4zgj4efma",
                "time_created": "2022-02-03T04:51:54.139Z",
                "vault_id": "ocid1.vault.oc1.iad.b5q6uxdhaahdg.abuwcljs6qwagycytfmnryece3u55fswvaioqfeozixgt5if5f354umdamdq",
                "lifecycle_state": "CREATING",
                "origin": "INTERNAL",
                "is_primary": true
            }
        }
    ]
}
Response Codes
| Response Code | Description | 
|---|---|
| 2xx | Success | 
| 4xx | Client errors | 
| 5xx | Server errors | 
Refer to HTTP status codes for details.