View Resource Usage tags applied on an Account
get
/metering/api/v1/usage/{accountId}/tags
Retrieve all tags applied on usage posted for a given account.
Request
Path Parameters
-
accountId: string
Account name, starts with cacct.
Query Parameters
-
tagType: string
tagType can be NATIVE , NON-NATIVE or ALL. OCI tags are non-nativeDefault Value:
NATIVE
Response
Supported Media Types
- application/vnd.com.oracle.oraclecloud.metering.usage+json
200 Response
Success
Nested Schema : UsageTag
Type:
object
Title:
Show Source
UsageTag
-
createdOn(optional):
object createdOn
-
tag(optional):
string
Text representing a tag.
-
tagType(optional):
string
Native or non-native. OCI tags are non-native.
Nested Schema : createdOn
Type:
object
Default Response
Unexpected error.
Examples
cURL Command
The following example shows how to retrieve details about resource usage tags for a given account by submitting a GET
request on the REST resource using cURL. For more information about cURL, see Use cURL.
Enter the command on a single line. Line breaks are used in this example for readability.
curl -X GET -u joe@example.com -H "X-ID-TENANT-NAME:myDomain" "https://itra.oraclecloud.com/metering/api/v1/usage/cacct-b08a16eb7b034d99b1bd6de5f62fd302/tags?tagType=ALL"
Example of Request Body
There is no request body to submit with the HTTP request.
Example of Response Body
The following example shows the response body in JSON format.
{ "accountId":"cacct-b08a16eb7b034d99b1bd6de5f62fd302", "items":[ { "tag":"ORCL:OCICompartment=ocid1.compartment.region1..aaaaaaaantw322yfvj55frntzszxe7khcfyvmg73bnccysxcr5zzybn4xboa", "tagType":"NON_NATIVE", "createdOn":"2018-02-08T14:19:45.627" }, { "tag":"ORCL:OCIService=Networking", "tagType":"NON_NATIVE", "createdOn":"2018-02-08T14:19:45.627" }, { "tag":"ORCL:OCICompartment=ocid1.compartment.region1..aaaaaaaaqlq3e4bffx2z7y7uwdpk4jj3ruuh5kdfycgw6phbplp6dkdbtrra", "tagType":"NON_NATIVE", "createdOn":"2018-05-23T00:28:06.609" }, { "tag":"ORCL:OCIService=Block Storage", "tagType":"NON_NATIVE", "createdOn":"2018-05-23T00:28:06.609" }, { "tag":"ORCL:OCICompartmentName=ManagedCompartmentForPaaS", "tagType":"NON_NATIVE","createdOn":"2018-05-23T00:35:29.367" }, { "tag":"ORCL:OCICompartmentName=dev", "tagType":"NON_NATIVE", "createdOn":"2018-05-23T01:17:47.486" } ], "canonicalLink":"/metering/api/v1/usage/cacct-b08a16eb7b034d99b1bd6de5f62fd302/tags?tagType=ALL" }