OCI Compartments API
Use the post /v1/cckm/oci/get-compartments
API to view the list of OCI compartments based on a connection with the CipherTrust Manager.
Syntax
curl -k '<IP>/api/v1/cckm/oci/get-compartments' -X POST -H 'Authorization: AUTHTOKEN' -H 'accept: application/json' --compressed
Request Parameters
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authentication token. |
connection | string | Name or ID of the OCI connection. |
Example Request
curl -k 'https://127.0.0.1/api/v1/cckm/oci/get-compartments' -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJmMDYzMTBmYy02NGVhLTQ4OTgtYmI3Mi05YTIwYzBkOTUxYzIiLCJzdWIiOiJsb2NhbHxmYzg2MjhkMC1mNjczLTRhMWYtYjQ3Yi1hM2I0ODVhMWU3OTQiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiYzk4YzkyZTUtMjM0OS00YzU5LWJlZWYtODc2OTQ4ZjIwNzM0Iiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6IjJmYmEzOGFmLTFkNzUtNGQ3NS04NTUzLWQ1NDljYzBjYmRlMiIsImlhdCI6MTYzMzMyNzkxNCwiZXhwIjoxNjMzMzI4MjE0fQ.L9sMTuMAEdwHy1qH1nlhDTyy0e7L03WO_bhcOBI4SnU' -H 'accept: application/json' --compressed
Example Response
{
"data": [
{
"id": "ocid1.compartment.oc1..aaaaaaaae3nhawsedrftgyhujikolwzqam4azefyg6obsxbrnymii6ezrva",
"compartmentId": "ocid1.tenancy.oc1..aaaaaaaadixbawsedrftgyhujikol5aaal6hb2vg7audpd4d4mcf5zluymff6sq",
"name": "test",
"description": "test",
"timeCreated": "2017-09-21T05:05:13.911Z",
"lifecycleState": "ACTIVE",
"inactiveStatus": null,
"isAccessible": true,
"freeformTags": {},
"definedTags": {}
},
{
"id": "ocid1.compartment.oc1..aaaaaaaasys76jxn2mrjawsedrftgyhujikol4tfba7npxnal7whxiiztzva",
"compartmentId": "ocid1.tenancy.oc1..aaaaaaaadixb52q2mvlsn63awsedrftgyhujikolaudpd4d4mcf5zluymff6sq",
"name": "vault-dev",
"description": "vault-dev users",
"timeCreated": "2021-11-11T07:35:14.577Z",
"lifecycleState": "ACTIVE",
"inactiveStatus": null,
"isAccessible": true,
"freeformTags": {
"team": "cckm"
},
"definedTags": {}
}
]
}
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.