REST API Reference > Platform REST API version 3 resources > Metering data
  

Metering data

If your organization has the Intelligent Cloud Data Management feature, you can download metering usage data using the REST API.
To download the metering data, you send an export job request, check the job status, and then download a ZIP file that contains the data.
You can download the following data:
Summary IPU usage data
You can download summary IPU usage data for production organizations, additional production organizations, sub-organizations, and sandbox organizations for a specified date range. The ZIP file includes data for the requesting organization and the organizations under it.
For example, if the requesting organization is the production organization, the ZIP file contains data for the production organization and its additional production organizations, sub-organizations, and sandbox organizations. If the requesting organization is an additional production organization that has a sub-organization, the ZIP file contains data for the additional production organization and its sub-organization.
You can send a request to receive usage information for all meters in one CSV file or receive individual CSV files for each meter. To receive usage information for all meters in one CSV file, set the combinedMeterUsage field value to TRUE.
Job-level details
If a service supports job-level detail reports, you can download job-level details for a specified date range. You can request job-level details for a particular meter or for all meters. The ZIP file includes data for the requesting organization.
In the export job request, include a date range and either a meter ID for a particular meter or the allMeters field with a value of TRUE to specify the data to include in the ZIP file. To see if you can download job-level details for your service and to find the meter ID to use in the request, see Meter IDs.
Note: An organization can have a maximum of 5 active jobs. A job is active when the status is CREATED or PROCESSING.

Sending an export job request for IPU usage data

You can run a job to export summary IPU usage data for the parent organization and its linked organizations such as additional production organizations, sub-organizations, and sandbox organizations for a specified date range.
After the job starts, you can check the job status. When the job completes successfully, you can send a request to download the data.

POST request

To request and receive summary IPU usage data, you must have access rights to the parent organization and all of the linked organizations.
To send the export job request, use the following URI:
/public/core/v3/license/metering/ExportMeteringDataAllLinkedOrgsAcrossRegion
Include the following fields in the request:
Field
Type
Required
Description
startDate
Date/time
Yes
Start of the date range.
endDate
Date/time
Yes
End of the date range.
The range can be a maximum of 180 days.
combinedMeterUsage
Boolean
-
Whether to return usage information for all meters in one CSV file. Include one of the following values:
  • - TRUE. Return usage information for all meters in one CSV file.
  • - FALSE. Return usage information in a separate CSV file for each meter.
Default is FALSE.
callbackUrl
String
-
A valid, publicly available URL.
The service posts the job status to the callbackURL.

POST request example

You might use a request similar to the following example:
POST <baseApiUrl>/public/core/v3/license/metering/ExportMeteringDataAllLinkedOrgsAcrossRegion
Content-Type: application/json
Accept: application/json
INFA-SESSION-ID: <sessionId>

{
"startDate":"2022-08-12T00:00:00Z",
"endDate":"2022-10-25T00:00:00Z",
"combinedMeterUsage":"FALSE"
"callbackUrl":"https://MyExportJobStatus.com"
}

POST response

The response includes the following fields:
Field
Type
Description
jobID
String
ID of the export job.
status
String
Status of the export job.
errorMessage
String
Error message, if any, that is associated with the job.
orgId
String
Organization ID for the requesting organization.
userId
String
ID of the user who sent the request.
selectedOrgId
String
Organization ID for the requesting organization.
startDate
Date/time
Start of the date range.
endDate
Date/time
End of the date range.
callbackUrl
String
The URL that the service uses to post the job status.
createTime
String
Time the export job was created.
updateTIme
String
Time the export job was last updated.
combinedMeterUsage
Boolean
Whether usage data for all meters is returned in one CSV file.

POST response example

If successful, you might receive a response similar to the following example:
{
"jobId": "cYjwJNEF7OckWEmkSC1tSI",
"status": "CREATED",
"orgId": "4wMFqGlxAKVlIFTixlTSOY",
"userId": "aMxRLnYzdWtlkJvDbtPZOr",
"selectedOrgId": "4wMFqGlxAKVlIFTixlTSOY",
"startDate": "2020-01-01T10:00:00Z",
"endDate": "2022-12-31T00:00:00Z",
"callbackUrl": "https://MyExportJobStatus.com",
"createTime": null,
"updateTime": null
"combinedMeterUsage":"FALSE"
}
If an error occurs, the response might be similar to the following example:
{
"jobId": "cYjwJNEF7OckWEmkSC1tSI",
"status": "FAILED",
"errorMessage": "Exception occurred while processing request for org:
4wMFqGlxAKVlIFTixlTSOY.\ncom.informatica.cloud.errorutil.MicroServiceException: Get
meter usage request failed with exception: I/O error on POST request",
"orgId": "4wMFqGlxAKVlIFTixlTSOY",
"userId": "aMxRLnYzdWtlkJvDbtPZOr",
"selectedOrgId": "4wMFqGlxAKVlIFTixlTSOY",
"startDate": "2020-01-01T10:00:00Z",
"endDate": "2022-12-31T00:00:00Z",
"callbackUrl": "https://MyExportJobStatus.com",
"createTime": null,
"updateTime": null
"combinedMeterUsage":"FALSE"
}

Sending an export job request for job-level metering data

For certain meters, you can run a job to export job-level details for a particular service and meter for a specified date range.
After the job starts, you can check the job status. When the job completes successfully, you can send a request to download the data.

POST request

To send the export job request, use the following URI:
/public/core/v3/license/metering/ExportServiceJobLevelMeteringData
Include the following fields in the request:
Field
Type
Required
Description
startDate
Date/time
Yes
Start of the date range.
endDate
Date/time
Yes
End of the date range.
The range can be a maximum of 180 days.
allMeters
Boolean
Required when meterId is blank.
Whether to return usage information for all meters. Include one of the following values:
  • - TRUE. Return usage information for all meters.
  • - FALSE. Return usage information for meter specified in meterId field.
Default is FALSE.
meterId
String
Required when allMeters is FALSE.
Meter ID. For allowable values, see Meter IDs
callbackUrl
String
-
A valid, publicly available URL.
The service posts the job status to the callbackURL.

POST request example

You might use a request similar to the following example:
POST <baseApiUrl>/public/core/v3/license/metering/ExportServiceJobLevelMeteringData
Content-Type: application/json
Accept: application/json
INFA-SESSION-ID: <sessionId>

{
"startDate":"2022-08-12T00:00:00Z"
"endDate":"2022-10-25T00:00:00Z"
"allMeters":"FALSE"
"meterId":"3TaYTMo6BFYeNIABfVmH0n"
"callbackUrl":"https://MyExportJobStatus.com"
}

POST response

The response includes the following fields:
Field
Type
Description
jobID
String
ID of the export job.
status
String
Status of the export job.
errorMessage
String
Error message, if any, that is associated with the job.
orgId
String
Organization ID for the requesting organization.
userId
String
ID of the user who sent the request.
selectedOrgId
String
Organization ID for the requesting organization.
allMeters
Boolean
Whether usage information for all meters is included.
meterId
String
Meter ID.
startDate
Date/time
Start of the date range.
endDate
Date/time
End of the date range.
callbackUrl
String
The URL that the service uses to post the job status.
createTime
String
Time the export job was created.
updateTIme
String
Time the export job was last updated.

POST response example

If successful, you might receive a response similar to the following example:
{
"jobId": "cYjwJNEF7OckWEmkSC1tSI",
"status": "CREATED",
"orgId": "4wMFqGlxAKVlIFTixlTSOY",
"userId": "aMxRLnYzdWtlkJvDbtPZOr",
"selectedOrgId": "4wMFqGlxAKVlIFTixlTSOY",
"allMeters":"FALSE",
"meterId": 3TaYTMo6BFYeNIABfVmH0n,
"startDate": "2020-01-01T10:00:00Z",
"endDate": "2022-12-31T00:00:00Z",
"callbackUrl": "https://MyExportJobStatus.com",
"createTime": null,
"updateTime": null
}
If an error occurs, the response might be similar to the following example:

{
"jobId": "cYjwJNEF7OckWEmkSC1tSI",
"status": "FAILED",
"errorMessage": "Exception occurred while processing request for org:
4wMFqGlxAKVlIFTixlTSOY.\ncom.informatica.cloud.errorutil.MicroServiceException: Get
meter usage request failed with exception: I/O error on POST request",
"orgId": "3TaYTMo6BFYeNIABfVmH0n",
"userId": "aMxRLnYzdWtlkJvDbtPZOr",
"selectedOrgId": "3TaYTMo6BFYeNIABfVmH0n",
"allMeters":"FALSE",
"meterId": 3TaYTMo6BFYeNIABfVmH0n,
"startDate": "2020-01-01T10:00:00Z",
"endDate": "2022-12-31T00:00:00Z",
"callbackUrl": "https://MyExportJobStatus.com",
"createTime": null,
"updateTime": null
}

Meter IDs

When you create a request to export job-level metering data, include the meter ID in the request to specify the meter.
The following table lists meter IDs for the meters that support exporting job-level metering data.
Meter name
Meter ID
Data Integration
a2nB20h1o0lc7k3P9xtWS8
Data Integration with Advanced Serverless
35m9fB23Tykj4Fb3rN5q2J
Data Integration Elastic
3TaYTMo6BFYeNIABfVmH0n
Data Integration Elastic with Advanced Serverless
8tXWie0ZQLWlG1cyxxLwQM
Application Integration
3uIRkIV5Rt9lBbAPzeR5Kj
Application Integration with Advanced Serverless
bN6mes5n4GGciiMkuoDlCz
Mass Ingestion Streaming
hr7GsCwFFmyfvfZQFn8v81
Mass Ingestion Database
24WXkCWzeSHjFlQvLPDegF
Mass Ingestion Files
lCwc4CfL7EEhv9773egFC8
Mass Ingestion Application
i3H6LcmMIYjhUKa9VCi7CI
Advanced Pushdown Optimization
dMN0VeTW4cThHyPovp4GEX
Data Integration - Change Data Capture
0sDTANKFZBSbqjzKaXKlmB
Mass Ingestion Database - Change Data Capture
aluxJ8jOKmzdXwD0JuHRS1
Mass Ingestion Application - Change Data Capture
4cPkZ5cZxjzc4SK2RHoqgy
Integration Hub
fqttkiGnSaHeXW255z4IcD
Catalog Records
5hflTd89LojbuPtkRvPd8o
Governance Records
3sY0I8UHjyTiXcLzZI1fqj
Marketplace Records
6J969du5ipFiRR3hRANP81
Metadata Record Consumption
xQ7fB0n3HtM8JlZk2W6sX1
Scanner Execution
1XzBBPzFTAlk77lGUvVPIS
Scanner Execution with Serverless
beRTNuPByiheJDCgYuIOIo

Getting the metering data export job status

Use a GET request to get the status of an export job for metering data.

GET request

To get the status of the export job, use the following URI:
/public/core/v3/license/metering/ExportMeteringData/<jobId>

GET response

The response includes the following fields:
Field
Type
Description
jobID
String
ID of the export job.
status
String
Status of the export job. One of the following values can be returned:
  • - CREATED
  • - PROCESSING
  • - SUCCESS
  • - FAILED
  • - PARTIAL_SUCCESS
If the status is PARTIAL_SUCCESS, the job completed but data couldn't be collected for all of the linked organizations due to errors.
errorMessage
String
Error message, if any, that is associated with the job.
orgId
String
Organization ID for the requesting organization.
userId
String
ID of the user who sent the request.
selectedOrgId
String
Organization ID for the requesting organization.
meterId
String
Meter ID.
Applicable for jobs requesting job-level details.
startDate
Date/time
Start of the date range.
endDate
Date/time
End of the date range.
callbackUrl
String
The URL that the service uses to post the job status.
createTime
String
Time the export job was created.
updateTIme
String
Time the export job was last updated.

GET response example

If successful, you might receive a response similar to the following example:
{
"jobId": "4l1eKlA9ngChmu6gdv3FKs",
"status": "SUCCESS",
"orgId": "4wMFqGlxAKVlIFTixlTSOY",
"userId": "aMxRLnYzdWtlkJvDbtPZOr",
"selectedOrgId": "4wMFqGlxAKVlIFTixlTSOY",
"meterId": null,
"startDate": "2022-08-01T10:00:00Z",
"endDate": "2022-12-31T00:00:00Z",
"callbackUrl": "https://MyExportJobStatus.com",
"createTime": "2022-11-23T10:04:37Z",
"updateTime": "2022-11-23T10:04:37Z"
}
If the job is partially successful, the response might be similar to the following example:

{
"jobId": "cYjwJNEF7OckWEmkSC1tSI",
"status": "PARTIAL_SUCCESS",
"errorMessage": "Short error message: [fetchEligibleJobForExecution] Exception in executing
job. org.springframework.web.client.HttpServerErrorException$ServiceUnavailable: 503 Service
Unavailable: \"<html><body><h1>503 Service Unavailable</h1><EOL>No server is available to handle
this request.<EOL></body></html><EOL>\",
"orgId": "4wMFqGlxAKVlIFTixlTSOY",
"userId": "aMxRLnYzdWtlkJvDbtPZOr",
"selectedOrgId": "4wMFqGlxAKVlIFTixlTSOY",
"meterId": null,
"startDate": "2020-01-01T10:00:00Z",
"endDate": "2022-12-31T00:00:00Z",
"callbackUrl": "https://MyExportJobStatus.com",
"createTime": null,
"updateTime": null
}

Downloading the metering data

When the export job completes successfully, use a GET request to download a ZIP file that contains the requested metering data.
The ZIP file is available to download for 3 days after the job completes with a status of SUCCESS or PARTIAL_SUCCESS.
Note: You can download the ZIP file when the status of the job is PARTIAL_SUCCESS. However, the data in the ZIP file might be not be complete.

GET request

To download the ZIP file, use the following URI:
public/core/v3/license/metering/ExportMeteringData/<jobId>/download

GET response

If successful, you receive the ZIP stream in the response body and the response type will be application/zip. To download the file, save the response to a file as shown in the following image using Postman:
The image shows the body of a GET response that contains a zip stream. From the Save Response menu, Save to a file is selected.