Cloud Cruiser became HPE Consumption Analytics on Nov. 1st. You'll still see the old name in places while we update this site.

 

 

Consumption Analytics Documentation

Home > Cloud Cruiser 4 > REST API reference > Usage data > Publish or delete JSON data

Publish or delete JSON data

Publishes JSON data to a file on the HPE Consumption Analytics Portal server via any of the HTTP methods DELETE, POST, or PUT. The data is appended to the file <usageDir>/<feedPath>/<accountingDate>-<method>.json, where:

  • <feedPath> is the value of the feedPath parameter
  • <accountingDate> is the current date in yyyyMMdd format
  • <method> is the HTTP method used

The directory and file are created if they do not exist.

For example, if <usageDir> is c:\cc-working\usage_files then invoking this method via DELETE on September 15, 2014 with a feedPath of 3PAR would write to the file c:\cc-working\usage_files\3PAR\20140915-DELETE.json.

Resource URL

One of the following:

  • DELETE http://<ccServerURL>/rest/v2/usages/<feedPath>
  • POST http://<ccServerURL>/rest/v2/usages/<feedPath>
  • PUT http://<ccServerURL>/rest/v2/usages/<feedPath>

Request

Parameters
  Name Type Description
URL path parameters (required) feedPath string The directory in which to write the JSON data
Content-Type

application/json

Body

The data to publish, in JSON format.

Response

None

Example

URL invocation

POST http://localhost:8080/rest/v2/usages​​/myfeed

Java invocation
Request body
[
  {
    "Id":677,
    "Name":"3P01-PLA-W2K8-bfs001",
    "Provisioning":"tpvv",
    "Type":"base",
    "CopyOf":"---",
    "BaseId":677,
    "ReadPerms":"RW",
    "State":"normal",
    "SnapAdmSpace":256,
    "SnapSpace":512,
    "UserSpace":13696,
    "Size":71680,
    "UserCPG":"USTIL1SCL-3P01-X2R5"
  },
  {
    "Id":685,
    "Name":"3P01-PLA-W2K8-bfs002",
    "Provisioning":"tpvv",
    "Type":"base",
    "CopyOf":"---",
    "BaseId":685,
    "ReadPerms":"RW",
    "State":"normal",
    "SnapAdmSpace":256,
    "SnapSpace":512,
    "UserSpace":10368,
    "Size":71680,
    "UserCPG":"USTIL1SCL-3P01-X2R5"
  }
]
Last modified

Tags

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP