Resource Warnings APIs

Resource Warnings APIs

APIs for managing Resource Warnings

Table of Contents

1. Get Resource Warnings

1.1. Prerequisites API

The following data is optional

  • ResourceType

  • ResourceIds

1.2. Steps API

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/resource-warnings' -i -X GET \
    -H 'Accept-Language: fr' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/resource-warnings HTTP/1.1
Accept-Language: fr
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1320

{
  "elements" : [ {
    "id" : "4fea700c-db83-4c1e-8360-8985c15c3b63",
    "message" : "Some default warning message",
    "remediationMessage" : "Message with key [null.remedy]. Arguments:",
    "resourceId" : "dffa70cc-1575-4cd9-b8ef-c3059ab11b14",
    "resourceType" : "HOST",
    "resourceName" : "esxi-1.vrack.vsphere.local",
    "warningType" : "VALIDATION",
    "severity" : "MINOR",
    "occurredAtTimestamp" : "2024-06-21T02:46:27.000Z"
  }, {
    "id" : "4e7c5eae-8011-41be-b5a8-c8981bf921fa",
    "message" : "Some default warning message",
    "remediationMessage" : "Message with key [null.remedy]. Arguments:",
    "resourceId" : "e0dd2c55-6b67-42e6-97b6-7be688e36e47",
    "resourceType" : "HOST",
    "resourceName" : "esxi-1.vrack.vsphere.local",
    "warningType" : "VALIDATION",
    "severity" : "MINOR",
    "occurredAtTimestamp" : "2024-06-21T02:46:27.000Z"
  }, {
    "id" : "308d60d6-3f2d-4759-8cd9-b6f688fcdb41",
    "message" : "Some default warning message",
    "remediationMessage" : "Message with key [null.remedy]. Arguments:",
    "resourceId" : "d6702e15-d5b6-460d-97e2-27574223d1cc",
    "resourceType" : "HOST",
    "resourceName" : "esxi-1.vrack.vsphere.local",
    "warningType" : "VALIDATION",
    "severity" : "MINOR",
    "occurredAtTimestamp" : "2024-06-21T02:46:27.000Z"
  } ]
}

[_getresourcewarnings] API [_getresourcewarning] API

2. Get a Resource Warning by ID

2.1. Prerequisites API

The following data is required

  • ID of the Resource Warning

2.2. Steps API

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/resource-warnings/33c90a7f-c218-4273-a97b-2572d9f53b7c' -i -X GET \
    -H 'Accept-Language: fr' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/resource-warnings/33c90a7f-c218-4273-a97b-2572d9f53b7c HTTP/1.1
Accept-Language: fr
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 411

{
  "id" : "33c90a7f-c218-4273-a97b-2572d9f53b7c",
  "message" : "Some default warning message",
  "remediationMessage" : "Message with key [null.remedy]. Arguments:",
  "resourceId" : "91538b91-ecb6-4bfd-be71-90dc5e158f1e",
  "resourceType" : "HOST",
  "resourceName" : "esxi-1.vrack.vsphere.local",
  "warningType" : "VALIDATION",
  "severity" : "MINOR",
  "occurredAtTimestamp" : "2024-06-21T02:46:28.000Z"
}

[_getresourcewarnings] API [_getresourcewarning] API
Last updated 2024-06-21 01:22:12 -0700

Operations
POST
Create Resource Warning
Create a new Resource Warning
GET
Get Resource Warning
Get a Resource Warning by ID
GET
Get Resource Warnings
Get Resource Warnings