Cloudability Vendor Credentials End Point (OCI)
Summary
This end point is used to manage credentials within Cloudability that support the integration and ingestion of data from public cloud vendors. This includes tasks such as initial setup, listing out current credentials and deleting deprecated credentials.
-
This end point does not support filtering and sorting.
End Point Particulars
end point
: /v3/vendors/oci/accounts for RESTful CRUD interactions
end point :
/v3/vendors/oci/accounts?viewId=0
end point :
/v3/vendors/oci/accounts/<account_id>?include=permissions&viewId=0
end point :
/v3/vendors/oci/accounts/<account_id>/terraform-template
end point :
/v3/vendors/oci/accounts/<account_
id>/verification?include=permissions,associatedAccounts&viewId=0
end point :
/v3/vendors/oci/accounts/<account_id>/archive?viewId=0
end point :
/v3/vendors/oci/accounts?include=permissions&viewId=0
The Credential Object
vendorAccountName (string) - tenancy name
vendorAccountId (string) - tenancy OCID
tenancyId (string) - tenancy OCID
userId (string) - user OCID
region - home region name
groupId - group OCID
bucket ) - tenancy OCID
namespace - currently hardcoded to “bling”
compartment - tenancy OCID
roleName (string) - currently hardcoded to "CloudabilityRole",
fingerprint (string) -fingerprint
passphrase (string) - optional field
secret (string) - private key
vendorKey (string) -oci
verification (object) - object containing details of verification state:
state (string) - examples "unverified", "verified", "error"
lastVerificationAttemptedAt (string) - date timestamp, example: "1970-01-01T00:00:00.000Z"
message (string) -error message for credentials in error state
authorization (object) -object contain vendor specific authorization details
type (string) - oci_user (this field will never change)
createdAt - (string) - date timestamp corresponding to Cloudability credential creation time
Example 'Verified' Linked Account Credentials Object
{
"result": {
"id": "ocid1.tenancy.oc1..aaaaaaaa2mbeta5wdp3lfkzak2xnfpr4alyt7qtj33z5h7qonk5ghuo2xcda",
"vendorAccountName": "sample tenant name",
"vendorAccountId": "ocid1.tenancy.oc1..aaaaaaaa2mbeta5wdp3lfkzak2xnfpr4alyt7qtj33z5h7qonk5ghuo2xcda",
"vendorKey": "oci",
"verification": {
"state": "verified",
"lastVerificationAttemptedAt": "2023-06-29T10:17:21Z"
} ,
"authorization"{
"type": "oci_user",
"permissions": [
"oci.list.imageShape.Compatibility",
"oci.list.computeImages",
"oci.get.metrics"
],
"tenantId": "ocid1.tenancy.oc1..aaaaaaaa2mbeta5wdp3lfkzak2xnfpr4alyt7qtj33z5h7qonk5ghuo2xcda",
"tenancyId": "ocid1.tenancy.oc1..aaaaaaaa2mbeta5wdp3lfkzak2xnfpr4alyt7qtj33z5h7qonk5ghuo2xcda",
"userId": "ocid1.user.oc1..aaaaaaaaiqsrsbmubcsqt5oema7k66qjijbjqmomj5m6a4bu3qpf7opgz7za",
"groupId": "ocid1.group.oc1..aaaaaaaakshgi7v72falvtgwxgtay3tprboehpai3tclpa2u7dn4veigmhxq",
"region": "uk-london-1"
},
"createdAt": "2023-06-24T09:56:07Z",
"parentAccountId": "ocid1.tenancy.oc1..aaaaaaaa4pjpasfply4eky7dl6msfdt3doqpfpmbuw2aesigtvedd4oxhufa",
"consumerOrgId": ""
}
}
Example Requests
To ensure the API returns all accounts with these credential requests, add viewId=0 as a URL parameter. This will ensure any default view on your user account isn't applied.
Create Credential for Root Tenancy
curl -X POST 'https://api.cloudability.com/v3/vendors/oci/accounts?viewId=0
\\
-H 'Content-Type: application/json' \\
-u ‘[auth_token]:’ \\
-d @- << EOF
{
"vendorAccountId": "sample tenant OCID",
"tenancyId": "sample tenant OCID",
"ociCostReportSpec": {
"namespace": "bling",
"bucket": "sample tenant OCID",
"compartment": "sample tenant OCID"
},
"type": "oci_user"
}
Upon successful creation the API will return the credentials object.
Retrieve a Tenancy
curl
'https://api.cloudability.com/v3/vendors/oci/accounts/[vendorAccountId]’\\
-u ‘[auth_token]:’
When reviewing a root tenancy you can get the payload to include all its linked tenancies by adding include=associatedAccounts as a query parameter. All linked accounts will return as a list of regular credential objects within the associatedAccounts attribute.
Delete Credential for a Tenancy
curl --X DELETE
'https://api.cloudability.com/v3/vendors/oci/accounts/<account_id>?viewId=0’
-u ‘[auth_token]:’
Verify Credential for a Tenancy
curl --X POST
'https://api.cloudability.com/v3/vendors/oci/<account_id>/verification?include=permissions,associatedAccounts&viewId=0’ \\
-u ‘[auth_token]:’
Get Terraform Template for a Tenancy
curl
'https://api.cloudability.com/v3/vendors/oci/<account_id>/terraform-template’ \\
-u ‘[auth_token]:’
Archive Tenancy
curl --X POST
'https://api.cloudability.com/v3/vendors/oci/<account_id>archive?viewId=0’ \\
-u ‘[auth_token]:’
Get All OCI Tenancies details
curl --X POST
'https://api.cloudability.com/v3/vendors/oci/<account?include=permissions&viewId=0’ \\
-u ‘[auth_token]:’