Get Instances

Get Instances

Get all the instances for the given class

Request
URI
POST
https://{api_host}/tcsa.host.com/tcsa/api/topology/v1/instances
COPY
Request Body

Request object to get instances for the given class

InstanceRequest of type(s) application/json
Required

Show optional properties

{
    "className": "NetworkFunction"
}
{
    "className": "NetworkFunction",
    "targetType": "Switch",
    "traversal": false,
    "instanceName": "NetworkFunction-ebf940d1-9166-4e3b-bb17-c6b8d200bdc2$NetworkFunction$INCHARGE-SA-PRES",
    "relationshipName": "ConnectedSystems",
    "columnFilters": [
        "name"
    ],
    "from": 0,
    "groupby": [
        "elementUUID"
    ],
    "size": 0,
    "sortby": [
        {
            "order": "desc",
            "fieldName": "Severity"
        }
    ],
    "vsafilter": {
        "condition": "AND",
        "filterlist": [
            "Filter Object"
        ]
    }
}
string
className
Required

Device type or Class type to which instances are required

string
targetType
Optional

If traversal is true then we should provide the targetType of the relationship for which instance is required

boolean
traversal
Optional

Value can be true/false. If the instance is required on the traversed class then this attribute will be true

string
instanceName
Optional

Uniquely identifies the object across domains.

string
relationshipName
Optional

If traversal is true then we should provide the relationship name to get the targetType.

array of string
columnFilters
Optional

The name of column name which has to be filter.

integer As int32 As int32
from
Optional

The from parameter defines the offset from the first result you want to fetch.

array of string
groupby
Optional

The field name using which result will be groupby

integer As int32 As int32
size
Optional

The size parameter allows you to configure the maximum amount of records to be returned.

array of Sort
sortby
Optional

The Sort object defines on how and which field sorting has to be applied.

vsafilter
Optional

The VSAFilter object defines how the filters has to be applied on queries.

Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns InstanceResponse of type(s) application/json
{
    "data": [
        {
            "deviceType": "NetworkFunction",
            "_rev": "_et3ArLa--_",
            "source": "INCHARGE-SA-PRES",
            "_key": "NetworkFunction-ebf940d1-9166-4e3b-bb17-c6b8d200bdc2$NetworkFunction$INCHARGE-SA-PRES",
            "creationDate": "2022-09-02T12:52:40Z",
            "type": "NetworkFunction",
            "elementUUID_PM": "NetworkFunction-ebf940d1-9166-4e3b-bb17-c6b8d200bdc2$NetworkFunction$",
            "discoveryID": "INCHARGE-SA-PRES",
            "jobId": "1662122789071",
            "lastUpdationDate": "2022-09-02T12:52:40Z",
            "name": "NetworkFunction-ebf940d1-9166-4e3b-bb17-c6b8d200bdc2",
            "_id": "Nodes_INCHARGE_SA_PRES/NetworkFunction-ebf940d1-9166-4e3b-bb17-c6b8d200bdc2$NetworkFunction$INCHARGE-SA-PRES",
            "elementUUID": "NetworkFunction-ebf940d1-9166-4e3b-bb17-c6b8d200bdc2$NetworkFunction$INCHARGE-SA-PRES",
            "properties": {
                "IsEdgeHavingProblem": false,
                "Description": "",
                "ServiceName": "",
                "IsServiceDysFunctional": false,
                "CreationClassName": "NetworkFunction",
                "DisplayName": "kube-multus-ds-amd64-gv429",
                "IsManaged": true,
                "ServiceKey": "",
                "SystemName": "",
                "DisplayClassName": "NetworkFunction",
                "IsVMHostUnResponsive": false,
                "Name": "NetworkFunction-ebf940d1-9166-4e3b-bb17-c6b8d200bdc2"
            }
        }
    ],
    "count": 1
}
integer As int64 As int64
count
Optional

The number of available instances.

array of object
data
Optional

Contains an array of objects.


400

Invalid Request sent by the user

Operation doesn't return any data structure

401

User authentication failed

Operation doesn't return any data structure

403

Access to the requested resource/operation is forbidden

Operation doesn't return any data structure

404

Cannot find requested resource

Operation doesn't return any data structure

500

Internal server error

Operation doesn't return any data structure