You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Some times OCI usage api currency getting empty #771
I am facing an issue with the Usage API currency field. Sometimes, the currency value returns as None. Please let me know if any changes are required—I will make them accordingly. @adizohar
Gopi, customer sign with one currency, this not an SDK issue but service issue, if you want quicker respond, I would suggest to open SR using Oracle Support
Activity
adizohar commentedon Jun 5, 2025
Hi Gopi,
Please specify the call to the API including the parameters
Gopichand-Heeddata commentedon Jun 6, 2025
Hi @adizohar
I am using below api call to get the usage data
import oci
config = oci.config.from_file()
tenant_id = config['tenancy']
time_usage_started = "2024-04-01T00:00:00Z"
time_usage_ended = "2024-04-21T00:00:00Z"
lis=[]
usage_client = oci.usage_api.UsageapiClient(config,timeout=(10,3000))
requestSummarizedUsagesDetails = oci.usage_api.models.RequestSummarizedUsagesDetails(
tenant_id=tenant_id,
granularity='DAILY',
query_type='USAGE',
group_by=[ 'resourceId','service','compartmentName'],
time_usage_started=time_usage_started,
time_usage_ended=time_usage_ended,
compartment_depth=2
)
Retrieve summarized usage data
request_summarized_usages = usage_client.request_summarized_usages(
requestSummarizedUsagesDetails,
retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY
)
for item in request_summarized_usages.data.items:
print(len(item.resource_id))
print("---------------------------------------------------------------------------------")
adizohar commentedon Jun 6, 2025
Gopi, customer sign with one currency, this not an SDK issue but service issue, if you want quicker respond, I would suggest to open SR using Oracle Support