Identity Manager 8.1 - REST API Reference Guide

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"

}

}]

Get collection using POST method

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

Table 15: Get collection (GET) request

HTTP method

URI

Body

Get

<BaseURL>/api/entities/{table}

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

Table 16: 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 table Values of parameter loadType.

query

string

Table 17: 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

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

}

}]

Related Documents