Chat now with support
Chat with Support

Identity Manager 8.2 - REST API Reference Guide

Get collection using GET method

To get a list of entities using the GET method, use the URL <baseURL>/api/entities/{table}

Table 16: Get collection (GET) request

HTTP method

URI

Body

Get

<BaseURL>/api/entities/{table}

None

Table 17: Get collection (GET) parameters

Parameter

Description

Parameter type

Data type

table

Table name (required).

path

string

where

WHERE clause.

query

string

orderBy

ORDER BY clause.

query

string

offset

Offset of first item.

query

integer

limit

Maximum number of results.

query

integer

displayColumns

Additional display columns, semicolon separated.

query

string

loadType

Collection load type. Specify one of the values listed in the following table.

query

string

noUrls

Allow to omit the URI property from the response to reduce the response size especially if used while retrieving large M:N tables like PersonHasObject.

query

boolean

Table 18: Values of parameter loadType

Value

Description

Default

Loads read-only entities according to the supplied query. Loaded columns include the primary key, display columns according to the display pattern, some special columns, and the columns defined in the select clause of the query. The entries are sorted by the defined display or the optional orderBy clause of the query. This load type is the default and be omitted.

Slim

Works mostly like Default but does not load display columns and does not build an orderBy clause per default. This type is useful when loading data not intended for display and can save much time by using database indexes.

BulkReadOnly

Loads read-only entities with all columns filled. The columns defined in the query are overridden.

ForeignDisplays

Loads display values for foreign keys contained in the display pattern. This allows showing displays instead of UIDs for foreign keys.

ForeignDisplaysForAllColumns

Like ForeignDisplays, but loads displays for all foreign keys contained in the select clauses of the query, not only columns referenced in the display pattern.

Response schema:

CollectionEntry {

uri(string),

display(string, optional),

longDisplay(string, optional),

values(SampleValues, optional)

}

SampleValues {

StringColumn(string, optional),

IntColumn(integer, optional),

DateColumn(date - time, optional),

BoolColumn (boolean, optional)

}

Example 1:

This sample demonstrates the use of the query by example parameters.

https://<Hostname>/AppServer/api/entities/Person?lastname=adams&limit=2

Response:

[{

"uri": "https://<Hostname>/AppServer/api/entity/Person/7f6bcca9-05dc-4857-9dc5-eff915590752",

"display": "Adams, Alexander (ALEXANDERA)",

"longDisplay": "Adams, Alexander (ALEXANDERA)",

"values": {

"CentralAccount": "ALEXANDERA",

"InternalName": "Adams, Alexander",

"UID_Person": "7f6bcca9-05dc-4857-9dc5-eff915590752",

"XMarkedForDeletion": 0

}},

{

"uri": "https://<Hostname>/AppServer/api/entity/Person/f79c30fd-87bb-4958-a812-0683ddcac7c9",

"display": "Adams, David (DAVIDA)",

"longDisplay": "Adams, David (DAVIDA)",

"values": {

"CentralAccount": "DAVIDA",

"InternalName": "Adams, David",

"UID_Person": "f79c30fd-87bb-4958-a812-0683ddcac7c9",

"XMarkedForDeletion": 0

}

}]

Example 2:

This sample demonstrates the use of the loadType=Slim.

https://<Hostname>/AppServer/api/entities/Person?lastname=adams&limit=2&loadType=Slim

Response:

[{

"uri": "https://<Hostname>/AppServer/api/entity/Person/18e51519-f751-4df6-8f39-24ed065c80a9",

"values": {

"UID_Person": "18e51519-f751-4df6-8f39-24ed065c80a9"

}},

{

"uri": "https://<Hostname>/AppServer/api/entity/Person/26822a10-32bb-4268-ac59-36188301b768",

"values": {

"UID_Person": "26822a10-32bb-4268-ac59-36188301b768"

}

}]

Example 3:

This sample demonstrates the use of the parameter noUrls=true while using the same parameters as in example 2.

https://<Hostname>/AppServer/api/entities/Person?lastname=adams&limit=2&loadType=Slim&noUrls=true

Response:

[{

"values": {

"UID_Person": "18e51519-f751-4df6-8f39-24ed065c80a9"

}},

{

"values": {

"UID_Person": "26822a10-32bb-4268-ac59-36188301b768" }

}]

Get collection using POST method

To get a list of entities using the POST method, use the URL <baseURL>/api/entities/{table}

Table 19: Get collection (GET) request

HTTP method

URI

Body

Get

<BaseURL>/api/entities/{table}

{"where": "", "orderBy": ""}

Table 20: Get collection (GET) parameters

Parameter

Description

Parameter type

Data type

table

Table name (required).

path

string

where

WHERE clause.

body

string

orderBy

ORDER BY clause.

body

string

offset

Offset of first item.

query

integer

limit

Maximum number of results.

query

integer

displayColumns

Additional display columns, semicolon separated.

query

string

loadType

Collection load type. Specify one of the values listed in the following table.

query

string

noUrls

Allow to omit the URI property from the response to reduce the response size especially if used while retrieving large M:N tables like PersonHasObject.

query

boolean

Table 21: Values of parameter loadType

Value

Description

Default

Loads read-only entities according to the supplied query. Loaded columns include the primary key, display columns according to the display pattern, some special columns, and the columns defined in the select clause of the query. The entries are sorted by the defined display or the optional orderBy clause of the query. This load type is the default and be omitted.

Slim

Works mostly like Default but does not load display columns and does not build an orderBy clause per default. This type is useful when loading data not intended for display and can save much time by using database indexes.

BulkReadOnly

Loads read-only entities with all columns filled. The columns defined in the query are overridden.

ForeignDisplays

Loads display values for foreign keys contained in the display pattern. This allows showing displays instead of UIDs for foreign keys.

ForeignDisplaysForAllColumns

Like ForeignDisplays, but loads displays for all foreign keys contained in the select clauses of the query, not only columns referenced in the display pattern.

Response schema:

CollectionEntry {

uri(string),

display(string, optional),

longDisplay(string, optional),

values(SampleValues, optional)

}

SampleValues {

StringColumn(string, optional),

IntColumn(integer, optional),

DateColumn(date - time, optional),

BoolColumn (boolean, optional)

}

Example 1:

This sample demonstrates the use of the where and orderBy parameters in the body.

https://<Hostname>/AppServer/api/entities/Person?limit=2

Body:

{

"where": "UID_Department in (Select UID_Department from Department where DepartmentName = 'Service & Support')",

"orderBy": "LastName ASC, FirstName DESC"

}

Response:

[{

"uri": "https://<Hostname>/AppServer/api/entity/Person/20bac746-2121-4b24-a4dc-918b69584272",

"display": "Ackermann, Steffen (STEFFENA)",

"longDisplay": "Ackermann, Steffen (STEFFENA)",

"values": {

"CentralAccount": "STEFFENA",

"FirstName": "Steffen",

"InternalName": "Ackermann, Steffen",

"LastName": "Ackermann",

"UID_Person": "20bac746-2121-4b24-a4dc-918b69584272",

"XMarkedForDeletion": 0

}},

{

"uri": "https://<Hostname>/AppServer/api/entity/Person/f45092af-4725-4f99-b87c-00de84b7dcd7",

"display": "Becker, Robert (ROBERTB4)",

"longDisplay": "Becker, Robert (ROBERTB4)",

"values": {

"CentralAccount": "ROBERTB4",

"FirstName": "Robert",

"InternalName": "Becker, Robert",

"LastName": "Becker",

"UID_Person": "f45092af-4725-4f99-b87c-00de84b7dcd7",

"XMarkedForDeletion": 0

}

}]

Example 2:

This sample demonstrates the use of the parameter noUrls=true while using the same parameters as in example 1.

https://<Hostname>/AppServer/api/entities/Person?limit=2&noUrls=true

Body:

{

"where": "UID_Department in (Select UID_Department from Department where DepartmentName = 'Service & Support')",

"orderBy": "LastName ASC, FirstName DESC"

}

Response:

[{

"display": "Ackermann, Steffen (STEFFENA)",

"longDisplay": "Ackermann, Steffen (STEFFENA)",

"values": {

"CentralAccount": "STEFFENA",

"FirstName": "Steffen",

"InternalName": "Ackermann, Steffen",

"LastName": "Ackermann",

"UID_Person": "20bac746-2121-4b24-a4dc-918b69584272",

"XMarkedForDeletion": 0

}},

{

"display": "Becker, Robert (ROBERTB4)",

"longDisplay": "Becker, Robert (ROBERTB4)",

"values": {

"CentralAccount": "ROBERTB4",

"FirstName": "Robert",

"InternalName": "Becker, Robert",

"LastName": "Becker",

"UID_Person": "f45092af-4725-4f99-b87c-00de84b7dcd7",

"XMarkedForDeletion": 0

}

}]

Get count of collection using GET method

To get only the count for a list of entities using the GET method, use the URL <baseURL>/api/entities/{table}/count

Table 22: Get count of collection (GET) request
HTTP method URI Body
Get <BaseURL>/api/entities/{table}/count None
Table 23: Get count of collection (GET) parameters
Parameter Description Parameter type Data type
table Table name (required). path string
where WHERE clause. query string
Response schema:

Count(integer)

Example:

This sample demonstrates the use of the query by example parameters.

https://<Hostname>/AppServer/api/entities/Person/count?lastname=adams

Response:

2

Get count of collection using POST method

To get only the count for a list of entities using the POST method, use the URL <baseURL>/api/entities/{table}/count

Table 24: Get count of collection (POST) request

HTTP method

URI

Body

Get <BaseURL>/api/entities/{table}/count {"where": ""}
Table 25: Get count of collection (POST) parameters
Parameter Description Parameter type Data type
table Table name (required). path string
where WHERE clause. body string
Response schema:

Count(integer)

Example:

https://<Hostname>/AppServer/api/entities/Person/count

Body:

{"where": "LastName=adams"}

Response:

2

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating