Get OCI Report Data

get

/appstore/publisher/v1/appusagedata

Reports provide valuable data about customer usage of your apps and services. You can tailor reports to your needs and export report data for presentations to management. You can view the following reports related to application usage in Oracle Cloud Marketplace.
  • OCI Customer Instances Report
  • Paid Listing Usage Report
  • Billed Customer Usage Report
  • Disbursement Report
  • US Sales and Tax Report
Oracle Cloud Infrastructure (OCI) Customer Instances report provide information about the instances created by customers for each of your listings. You can see the date an instance was created, along with its current status, shape, and tenancy.
The Paid Listing Usage report provides information about customer usage of your paid listings. Note that the information in this report is provided only for your reference. Don't rely on this information for determining paid listing payments. This report is based on preliminary information that is subject to change.
Billed Customer Usage Report provides data about the billed amount that customer has paid for usage of your paid listings. The report displays the amount that Oracle bills to the customer for usage of your paid listings, but not the amount that has been collected from the customer.
Disbursement Report provides data about the amount that Oracle has collected from the customer for usage of your paid listings and the amount that Oracle has disbursed to your bank account.
US Sales and Tax Report provides data about the sales or use tax in the US that Oracle collects from the customer for usage of your paid listings in Oracle Cloud Marketplace.

Request

Query Parameters
  • This query parameter is used to get the result set for instances created before the given date.
  • This query parameter is used to get the result set for instances created after the given date.
  • Retrieves results for instances which are in the state that you have specified. You can specify the following states: Running, Stopped, Terminated.
  • Specifies the number of results that should be displayed starting from the specified offset. Use this in conjunction with the offset parameter to filter the retrieved results. Permissible values are any integer from 0 to 100. The default value is 30.
  • This is a filter option used to retrieves the results for the specified listing name of the product in the Oracle Cloud Marketplace.
  • Determines the starting index of the records to display from the retrieved results. Specify a value equal to or greater than zero. The default value is zero. Use this in conjunction with the limit parameter.
  • Sorts the retrieved results in ascending or descending order based on the values of the listing name, customer name, or instance creation date. Specify one of the following values: LISTINGNAME, CUSTOMER, or INSTANCECREATIONDATE. Use this field in conjunction with the sortorder parameter.
  • Specifies the type of report that you want to retrieve. You can specify one of the following values: PAIDLISTINGS, PARTNERSERVICE, DISBURSEMENT, TAX. By default, data for the OCI Customer Instances Report is retrieved.
  • Sorts the retrieved results in ascending or descending order. Use this parameter in conjunction with the orderby field. Specify one of the following values: ASC or DESC.
Back to Top

Response

Supported Media Types

200 Response

Successful Operation
Body ()
Root Schema : collection
Type: object
The collection of report data, which belongs to one of these reports: OCI Customer Instances Report, Paid Listing Usage Report, Billed Customer Usage Report, Disbursement Report and US Sales and Tax Report.
Show Source
Nested Schema : items
Type: array
Show Source
Example:
[
    {
        "$ref":"#/definitions/OciAppUsageData"
    },
    {
        "$ref":"#/definitions/PaidListingUsageData"
    },
    {
        "$ref":"#/definitions/PartnerServiceUsageData"
    },
    {
        "$ref":"#/definitions/DisbursementReportData"
    },
    {
        "$ref":"#/definitions/SalesAndTaxReportData"
    }
]
Nested Schema : items
Type: object

400 Response

Invalid Parameter Value/Bad Request

401 Response

Not Authorized

500 Response

System Error
Back to Top

Examples

1. Get OCI Customer Instance Report

The following example retrieves OCI Customer Instance Report.

cURL Example

curl -X GET -H "X-Oracle-UserId: partner-email" -H "Authorization: Bearer Access-token" "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/appusagedata"

Request Header

X-Oracle-UserId: fname.lname@oracle.com
Authorization: Bearer Access-token
Content-Type: application/json

HTTP Status Code:

200 OK

JSON Response:

  {
    "items": [
        {
            "OciAppUsageData": {
                "listingName": "Example Listing",
                "id": 16021223,
                "customer": "oracle",
                "tenantAdminEmail": "oracle@oracle.com",
                "tenantAdmin": "Oracle Admin",
                "instanceCreatedDate": "2019-11-26T19:16:01.000Z",
                "shape": "VM.Standard2.1",
                "status": "Running",
                "package": "Example_8.0.12-1"
            }
        }
    ],
    "hasMore": false,
    "count": 1,
    "totalResults": 1,
    "links": [
        {
            "rel": "CANONICAL",
            "href": "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/appusagedata"
        },
        {
            "rel": "SELF",
            "href": "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/appusagedata"
        }
    ]
}

2. Paid Listing Usage Report

The following example retrieves Paid Listing Usage Report.

cURL Example

curl -X GET -H "X-Oracle-UserId: partner-email" -H "Authorization: Bearer Access-token" "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/appusagedata?reportType=PAIDLISTINGS"

Request Header

X-Oracle-UserId: fname.lname@oracle.com
Authorization: Bearer Access-token
Content-Type: application/json

HTTP Status Code:

200 OK

JSON Response:

  {
    "items": [
      {
        {
          "PaidListingUsageData": {
              "listingName": "Eample Listing",
              "listingId": 60874068,
              "tenancyId": "ocid1.tenancy.oc1..aaaaaaaane...q",
              "emailDomain": "@oracle.com",
              "state": "Unknown",
              "city": "Unknown",
              "zipcode": 0,
              "usageDate": "2019-11-04 00:00:00.0",
              "usage": 8320.0,
              "unit": "core hours",
              "currency": "USD"
          }
        }
      }      
    ],
    "hasMore": false,
    "count": 1,
    "totalResults": 1,
    "links": [
        {
            "rel": "CANONICAL",
            "href": "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/appusagedata?reportType=PAIDLISTINGS"
        },
        {
            "rel": "SELF",
            "href": "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/appusagedata?reportType=PAIDLISTINGS"
        }
    ]
}

3. Billed Customer Usage Report

The following example retrieves Billed Customer Usage Report.

cURL Example

curl -X GET -H "X-Oracle-UserId: partner-email" -H "Authorization: Bearer Access-token" "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/appusagedata?reportType=PARTNERSERVICE"

Request Header

X-Oracle-UserId: fname.lname@oracle.com
Authorization: Bearer Access-token
Content-Type: application/json

HTTP Status Code:

200 OK

JSON Response:

  {
    "items": [
      {
        "PartnerServiceUsageData": {
            "listingName": "Example Listing",
            "listingId": 63628618,
            "transactionRefId": 10738315,
            "customerId": 1016128070,
            "emailDomain": "@oracle.com",
            "ociSku": "MP00008",
            "billedAmount": 8589.12,
            "usage": 9336,
            "usageDate": "2019-01-01 00:09:00.0",
            "unit": "OCPU Per Hour",
            "currency": "USD"
        }
      }
    ],
    "hasMore": false,
    "count": 1,
    "totalResults": 1,
    "links": [
        {
            "rel": "CANONICAL",
            "href": "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/appusagedata?reportType=PARTNERSERVICE
        },
        {
            "rel": "SELF",
            "href": "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/appusagedata?reportType=PARTNERSERVICE
        }
    ]
}

4. Get Disbursement Report

The following example retrieves Disbursement Report.

cURL Example

curl -X GET -H "X-Oracle-UserId: partner-email" -H "Authorization: Bearer Access-token" "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/appusagedata?reportType=DISBURSEMENT"

Request Header

X-Oracle-UserId: fname.lname@oracle.com
Authorization: Bearer Access-token
Content-Type: application/json

HTTP Status Code:

200 OK

JSON Response:

  {
    "items": [
      {
        "DisbursementReportData": {
          "listingName": "Aviatrix Secure Networking Platform",
          "listingId": 37179841,
          "transactionRefId": 10738520,
          "childProductNumber": "MP00011",
          "customerId": 1026108783,
          "customerName": "Oracle America, Inc. - Internal",
          "endUserCustomerId": 1026108783,
          "endUserCustomerName": "Oracle America, Inc. - Internal",
          "usagePeriod": "2019-11-01 00:00:00.0",
          "customerBilledAmount": 11.2,
          "disbursementAmount": 0.0,
          "currency": "USD"
        }
      }        
    ],
    "hasMore": false,
    "count": 1,
    "totalResults": 1,
    "links": [
        {
            "rel": "CANONICAL",
            "href": "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/appusagedata?reportType=DISBURSEMENT"
        },
        {
            "rel": "SELF",
            "href": "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/appusagedata?reportType=DISBURSEMENT"
        }
    ]
}

5. Get US Sales and Tax Report

The following example retrieves US Sales and Tax Report.

cURL Example

curl -X GET -H "X-Oracle-UserId: partner-email" -H "Authorization: Bearer Access-token" "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/appusagedata?reportType=TAX"

Request Header

X-Oracle-UserId: fname.lname@oracle.com
Authorization: Bearer Access-token
Content-Type: application/json

HTTP Status Code:

200 OK

JSON Response:

  {
    "items": [
      {
        "SalesAndTaxReportData": {
            "listingId": 37179841,
            "invoiceNumber": "8409529",
            "transactionRefId": 10200801,
            "childProductNumber": "MP00013",
            "productTitle": "ShieldIO MySQL Secure Autonomous Driver",
            "transactionDate": "2020-01-01 00:00:00.0",
            "totalAdjustedPrice": "100.05",
            "totalTax": "0",
            "currency": "USD",
            "taxableSaleAmount": "0",
            "nontaxableSaleAmount": "100.05",
            "customerName": "Centroid",
            "customerId": 1053174800,
            "customerCountry": "US",
            "customerState": "MI",
            "customerCity": "Northville",
            "customerZipcode": "48168"
        }
      }
    ],
    "hasMore": false,
    "count": 1,
    "totalResults": 1,
    "links": [
        {
            "rel": "CANONICAL",
            "href": "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/appusagedata?reportType=TAX"
        },
        {
            "rel": "SELF",
            "href": "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/appusagedata?reportType=TAX"
        }
    ]
}
Back to Top