Skip to main content
O&M Management/Monitoring APIs/Monitoring and Alarm APIs/Time Series Data (Metric)
POSTTime Series Data (Metric)Since 0.6SynchronousAuth Required

Create a Metric Data HTTP Receiver

Create a Metric Data HTTP Receiver

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • nameStringRequired

    Resource name

  • urlStringRequired

    地址。

  • descriptionString

    Detailed description of the resource

  • defaultEnableboolean

    默认启用。

  • resourceUuidString

    Resource UUID

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    操作是否成功。

  • inventoryMetricDataHttpReceiverInventoryRequired

    For details, see inventory

    • uuidStringRequired

      Resource UUID. Uniquely identifies the resource

    • nameStringRequired

      Resource name

    • urlStringRequired

      地址。

    • descriptionStringRequired

      Detailed description of the resource

    • createDateTimestampRequired

      Creation time

    • lastOpDateTimestampRequired

      Last modification time

    • stateReceiverStateRequired

      For details, see state

      • EnabledReceiverStateRequired

        已启用。

      • DisabledReceiverStateRequired

        已禁用。

  • errorErrorCodeRequired

    Error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error

    • codeStringRequired

      Error code. The globally unique error identifier, for example, SYS.1000, HOST.1001

    • descriptionStringRequired

      Brief description of the error

    • detailsStringRequired

      Detailed error information

    • elaborationStringRequired

      Reserved field. Default is null

    • opaqueLinkedHashMapRequired

      Reserved field. Default is null

    • causeErrorCodeRequired

      Root error. The source error that caused the current error. This field is null if no root error exists

Endpoint

POST/zstack/v1/zwatch/metrics/httpreceivers

/zstack/v1/zwatch/metrics/httpreceivers

Operation ID

CreateMetricDataHttpReceiver

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/zwatch/metrics/httpreceivers' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"name":"<name>","url":"<url>","description":"<description>","defaultEnable":true,"resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"],"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "3c4b2b282e4134579df0b8f74fb9a2b7", "name": "CloudMonitor", "url": "http://127.0.0.1/xxx", "createDate": "Nov 14, 2017 2:20:57 PM", "lastOpDate": "Nov 14, 2017 2:20:57 PM", "state": "Enabled" } }

Change History

This API has no change history records yet.

View all change history