search

PutModels (POST /v1/data-receiver/models)

The PutModels method creates or updates one or more entities. 

Fields

FieldRequired?TypeDescription
detailedResponseNoBooleanProvide specific feedback when parsing fails (true) or no specific feedback (false). The default is false.
modelsYesArray

One or more entity specifications.

The remaining fields of this table specify an entity.

timestampYesNumber

The date and time for the entity, specified as milliseconds since the epoch (January 1, 1970 at 00:00:00 UTC).

Zenoss Cloud does not accept requests with timestamp values that are more than 24 hours old.

dimensionsYesObject

One or more key-value pairs that uniquely identify the entity. The values must be strings and the pairs may be arranged in any order.

Some reserved key-value pairs are either required or commonly used in this field. See Understanding entities.

metadataFieldsYesObject

One or more key-value pairs containing additional information about the entity. The pairs may be arranged in any order.

Some reserved key-value pairs are either required or commonly used in this field. See Understanding entities.

Status codes

  • 200 (full or partial success; see response message)
  • 500 (missing or invalid authentication key)

Example

PutModels Request
curl https://api.zenoss.io/v1/data-receiver/models \
  -H "content-type: application/json" \
  -H "zenoss-api-key: YOUR-API-KEY" \
  -X POST -s -S -d \
'{
  "detailedResponse": true,
  "models": [
    {
      "timestamp": 1600799308000,
      "dimensions": {
        "source": "my.simple.app",
        "source-type": "com.example.simple"
      },
      "metadataFields": {
        "name": "My.Simple.App"
      }
    }
  ]
}'
PutModels Response
{
  "succeeded": 1
}

Deleting an entity

To delete an entity, send a request with the following key-value pair in the metadataFields object: 

"_zen_deleted_entity": true