Entity List

Overview

Return the list of entities matching the search criteria.

API URI

This is the URI, OpsHub will execute to call this API:

POST: /entities/{entityTypeId}/search? 
projectId=<projectId>
&startIndex=<startIndex>
&maxResults=<maxResults>
&nextPageLink=<nextPageLink>

URI Parameters

Name
In
Required
Type
Description

entityTypeId

path

True

String

‘id’ of entity type for which the list of entities needs to be returned

projectId

query

False

String

‘id’ of the project for which the list of entities needs to be returned

startIndex

query

True

Integer

Start index from which matching entities need to be returned

maxResults

query

True

Integer

Number of entities from startIndex that need to be returned

nextPageLink

query

False

URL

Link to the next page of entity list response. If the connector returns the next page link in the response, in the subsequent paginated requests, OIM will pass that next page link. startIndex and pageSize will still be passed along with nextPageLink. Connector can utilize this parameter so that for subsequent pages, connector doesn't need to form the end system query again.


Request Body

It contains search criteria which is required to be applied in the end system to fetch the matching entities.

  • OpsHub has developed its own query format to query any end system.

  • Refer to OpsHub Query Format Guide for a detailed understanding of the OpsHub queries.

  • OpsHub Integration Manager will pass the query object as JSON payload which Connector SDK will parse and convert to end system’s native query.

  • Most queries done by OpsHub contain complex queries with the following fields:

    • project

    • entity id

    • created Date

    • updated Date

    • created By


Request Payload

Request Payload can be constructed using following details:

Example 1: Entities created by integration user after a given time:

Example 2: Entities updated after a given time and meets native criteria specified by end user in OpsHub. In the following sample request, the API must return entities updated after 2021-02-15T08:00:00Z and whose State = ‘Resolved’ and Team = ‘Marvels’.

Following are some search criteria that OpsHub will call Entity – List API for:

  • Polling query

    • updatedDate >= pollingTime and updatedDate <= maxTime

  • Entities created after given time by integration user

    • CreatedDate > time and createdBy = integrationUser

  • Is entity updated after given time?

    • UpdatedDate > time and entityId = <entityId>

  • Criteria

    • UpdatedDate >= pollingTime and <user condition>

    • <user condition> can be JSON or in native end system format, in which case conversion is not required.

  • Getting max time

    • UpdatedDate >= pollingTime

  • Target lookup

    • <user condition>, typically: entityId = <entityId>

    • Sometimes: entityId = <entityId> and customField = <someId>


Response Payload

The list of entities matching the selection criteria sent as part of the request payload should be returned.

Note: Fields provided in fieldNameInfo in response payload for Entity Type-Get API and any field which can be configured for end system criteria storage should be part of the response payload. For more details regarding end system criteria storage, refer to Criteria Configuration.

Last updated