[{"label":"Latest (2.0.1)","version":"latest"}]
telco-cloud-service-assurance

Get Instances

Description

Get all the instances for the given class

Request

Request

URL

URL


post
https://{api_host}tcsa.host.com/tcsa/api/topology/v1/instances
Copy

Request Body

Request Body

InstanceRequest of mimetype application/json Required

Request object to get instances for the given class

{
    "className": "NetworkFunction"
}
string
className Required

Device type or Class type to which instances are required


array of string
columnFilters Optional

The name of column name which has to be filter.


integer 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


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.


integer 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.


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


vsafilter Optional

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

Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

Response Body

Response Body

200 OK

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

The number of available instances.


array of object
data Optional

Contains an array of objects.

Errors

Errors

400

Invalid Request sent by the user


401

User authentication failed


403

Access to the requested resource/operation is forbidden


404

Cannot find requested resource


500

Internal server error

Code Samples

Code Samples

cURL Command

curl -X POST -H "Content-Type: application/json" -d '{"className":"NetworkFunction","from":0,"groupby":["elementUUID"],"instanceName":"NetworkFunction-ebf940d1-9166-4e3b-bb17-c6b8d200bdc2$NetworkFunction$INCHARGE-SA-PRES","limit":10,"relationshipName":"ConnectedSystems","size":1000,"sortby":[{"fieldName":"name","order":"ASC"}],"targetType":"Switch","vsafilter":{"condition":"OR","filterlist":[{"condition":"AND","propfilter":[{"matchtype":"IN","propname":"source","values":["INCHARGE-SA-PRES","sam"]},{"matchtype":"CONTAINS","propname":"properties.DisplayName","values":["kube-multus-ds-amd64-gv429"]}]},{"condition":"AND","propfilter":[{"matchtype":"IN","propname":"source","values":["INCHARGE-SA-PRES","sam"]},{"matchtype":"CONTAINS","propname":"name","values":["kube-multus-ds-amd64-gv429"]},{"matchtype":"EQUALS","propname":"properties.DisplayName","values":[""]}]}]}}' https://{api_host}tcsa.host.com/tcsa/api/topology/v1/instances


[{"label":"Latest (2.0.1)","version":"latest"}]
telco-cloud-service-assurance
Feedback

Was this page helpful?