Create Resource Using Adapter Kind

Create Resource Using Adapter Kind

This adapter kind (referred to as 'Push' adapter kind) will be created if it does not
exist in the system and an instance of it will be associated with the Resource being created.
This adapter kind if it already exists must of OPENAPI adapter kind type.
The API will also create the missing Adapter Kind and Resource Kind
contained within the ResourceKey of the Resource if they do not exist.


Additional implementation notes:


  • When creating a Resource, if the Resource Identifiers that are unique and required
    are not specified, the API would return an error with HTTP status code of 500
    and an error message indicating the set of missing Resource Identifiers.

  • When creating a Resource, if the Resource Identifiers that are unique but not required
    are not specified, the Resource is created where the uniquely identifying Resource Identifiers
    that were not specified will have their value as an empty string.

Request
URI
POST
https://{api_host}/suite-api/api/resources/adapterkinds/{adapterKindKey}
COPY
Path Parameters
string
adapterKindKey
Required

The adapter kind key


Request Body

The request object that contains info necessary to create a new resource

resource of type(s) application/json
Required

Show optional properties

{
    "creationTime": 0,
    "resourceKey": {
        "name": "string",
        "adapterKindKey": "string",
        "resourceKindKey": "string"
    },
    "resourceStatusStates": [
        {}
    ],
    "resourceHealth": "string",
    "resourceHealthValue": "number"
}
"{\n  \"description\" : \"Description of this virtual machine\",\n  \"resourceKey\" : {\n    \"name\" : \"VM1\",\n    \"adapterKindKey\" : \"VMWARE\",\n    \"resourceKindKey\" : \"VirtualMachine\",\n    \"resourceIdentifiers\" : [ {\n      \"identifierType\" : {\n        \"name\" : \"VMEntityObjectID\",\n        \"dataType\" : \"STRING\",\n        \"isPartOfUniqueness\" : true\n      },\n      \"value\" : \"vm-123\"\n    }, {\n      \"identifierType\" : {\n        \"name\" : \"VMEntityVCID\",\n        \"dataType\" : \"STRING\",\n        \"isPartOfUniqueness\" : true\n      },\n      \"value\" : \"CBAD174A-622E-4650-805A-064F824FFA76\"\n    }, {\n      \"identifierType\" : {\n        \"name\" : \"VMEntityName\",\n        \"dataType\" : \"STRING\",\n        \"isPartOfUniqueness\" : true\n      },\n      \"value\" : \"VM1\"\n    } ]\n  },\n  \"credentialInstanceId\" : \"51f8f60d-4a39-4839-9924-698d022e2e10\",\n  \"resourceStatusStates\" : [ ],\n  \"dtEnabled\" : true,\n  \"monitoringInterval\" : 5,\n  \"badges\" : [ ],\n  \"relatedResources\" : [ ]\n}"
string
description
Optional

Description of the Resource

integer As int64 As int64
creationTime
Required

Time the Resource was created in the system. This is a 'read-only' property and is system generated.The server ignores any changes to this field when trying to update a resource.

object
resourceKey
Required

Represents a composite key for uniquely identifying a Resource.

string As uuid As uuid
credentialInstanceId
Optional

Credential instance identifier assigned to this Resource, applicable only for adapter instances.

object
geoLocation
Optional

Represents a geographical location on planet earth.

array of object
resourceStatusStates
Required
Constraints: minItems: 0 maxItems: 0

The resource status and resource state for this resource as reported by one or more adapter instances. The server ignores any changes to this field when trying to update a resource.

string
resourceHealth
Required

Enumeration that identifies the health of a Resource

Possible values are : GREEN, YELLOW, ORANGE, RED, GREY,
number As double As double
resourceHealthValue
Required

Resource Health Score. This is a 'read-only' property and its value is computed by the system. The server ignores any changes to this field when trying to update a resource.

boolean
dtEnabled
Optional

DT calculation enabled or not. By default DT calculation for a resource is enabled (during its creation).

integer As int32 As int32
monitoringInterval
Optional
Constraints: minimum: 0

Minutes part of the monitoring Interval of the resource, applicable only for adapter instances.

integer As int32 As int32
monitoringIntervalSeconds
Optional
Constraints: minimum: 0

Seconds part of the monitoring Interval of the resource, applicable only for adapter instances.

array of object
badges
Optional
Constraints: minItems: 0 maxItems: 0

The various major and minor badges and their values for a Resource. If certain badges are not present in the list then either those badges are not applicable to this resource or the calculation of those badges has been disabled for this resource.

array of string
relatedResources
Optional
Constraints: minItems: 0 maxItems: 0

Collection of related resource identifiers

object
extension
Optional

extension

array of object
links
Optional

Represents a HTTP 'link' element.
It is implicit that all the link tags support http 'GET' method.

string As uuid As uuid
identifier
Optional

Identifier of the Resource (typically a UUID).

Authentication
This operation uses the following authentication methods.
Responses
201

The created Resource

Returns resource of type(s) application/json
"{\n  \"creationTime\" : 1744473855350,\n  \"resourceKey\" : {\n    \"name\" : \"VM1\",\n    \"adapterKindKey\" : \"VMWARE\",\n    \"resourceKindKey\" : \"VirtualMachine\",\n    \"resourceIdentifiers\" : [ {\n      \"identifierType\" : {\n        \"name\" : \"VMEntityObjectID\",\n        \"dataType\" : \"STRING\",\n        \"isPartOfUniqueness\" : true\n      },\n      \"value\" : \"vm-123\"\n    }, {\n      \"identifierType\" : {\n        \"name\" : \"VMEntityVCID\",\n        \"dataType\" : \"STRING\",\n        \"isPartOfUniqueness\" : true\n      },\n      \"value\" : \"CBAD174A-622E-4650-805A-064F824FFA76\"\n    }, {\n      \"identifierType\" : {\n        \"name\" : \"VMEntityName\",\n        \"dataType\" : \"STRING\",\n        \"isPartOfUniqueness\" : true\n      },\n      \"value\" : \"VM1\"\n    } ]\n  },\n  \"credentialInstanceId\" : \"51f8f60d-4a39-4839-9924-698d022e2e10\",\n  \"resourceStatusStates\" : [ ],\n  \"dtEnabled\" : true,\n  \"badges\" : [ ],\n  \"relatedResources\" : [ ],\n  \"identifier\" : \"19ec06c1-d61a-4a1d-9a39-f8096aa89180\"\n}"
string
description
Optional

Description of the Resource

integer As int64 As int64
creationTime
Required

Time the Resource was created in the system. This is a 'read-only' property and is system generated.The server ignores any changes to this field when trying to update a resource.

object
resourceKey
Required

Represents a composite key for uniquely identifying a Resource.

string As uuid As uuid
credentialInstanceId
Optional

Credential instance identifier assigned to this Resource, applicable only for adapter instances.

object
geoLocation
Optional

Represents a geographical location on planet earth.

array of object
resourceStatusStates
Required
Constraints: minItems: 0 maxItems: 0

The resource status and resource state for this resource as reported by one or more adapter instances. The server ignores any changes to this field when trying to update a resource.

string
resourceHealth
Required

Enumeration that identifies the health of a Resource

Possible values are : GREEN, YELLOW, ORANGE, RED, GREY,
number As double As double
resourceHealthValue
Required

Resource Health Score. This is a 'read-only' property and its value is computed by the system. The server ignores any changes to this field when trying to update a resource.

boolean
dtEnabled
Optional

DT calculation enabled or not. By default DT calculation for a resource is enabled (during its creation).

integer As int32 As int32
monitoringInterval
Optional
Constraints: minimum: 0

Minutes part of the monitoring Interval of the resource, applicable only for adapter instances.

integer As int32 As int32
monitoringIntervalSeconds
Optional
Constraints: minimum: 0

Seconds part of the monitoring Interval of the resource, applicable only for adapter instances.

array of object
badges
Optional
Constraints: minItems: 0 maxItems: 0

The various major and minor badges and their values for a Resource. If certain badges are not present in the list then either those badges are not applicable to this resource or the calculation of those badges has been disabled for this resource.

array of string
relatedResources
Optional
Constraints: minItems: 0 maxItems: 0

Collection of related resource identifiers

object
extension
Optional

extension

array of object
links
Optional

Represents a HTTP 'link' element.
It is implicit that all the link tags support http 'GET' method.

string As uuid As uuid
identifier
Optional

Identifier of the Resource (typically a UUID).


500

The ResourceKey of the Resource is missing the uniquely identifying and required Resource Identifiers

Operation doesn't return any data structure

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"creationTime:"integer","resourceHealth:"string","resourceHealthValue:"number","resourceKey:"object","resourceStatusStates":["object"]}' https://{api_host}/suite-api/api/resources/adapterkinds/{adapterKindKey}