To get a list of entities, you have the option to use a GET or POST request against the REST API. Both methods support to query by example. Simply provide the columns to query in the form Name=Value in the URL.
To get a list of entities, you have the option to use a GET or POST request against the REST API. Both methods support to query by example. Simply provide the columns to query in the form Name=Value in the URL.
To get a list of entities using the GET method, use the URL <baseURL>/api/entities/{table}.
Query parameters to be used in WHERE clauses and predefined WHERE clauses can be provided in the form @paramname=value. Per default they have the type string. Additionally, it is possible to pass the type with the name: @otherParam[int]=3. Types originate from DbVal class.
HTTP method |
URI |
Body |
---|---|---|
Get |
<BaseURL>/api/entities/{table} |
None |
Parameter |
Description |
Parameter type |
Data type |
---|---|---|---|
table |
Table name (required). |
path |
string |
where |
WHERE clause. |
query |
string |
whereKey |
Predefined WHERE clause from QBMLimitedSQL (Key [UID] or ID [Ident_QBMLimitedSQL]). |
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:
|
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 |
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)
}
This sample demonstrates the use of the query by example parameters.
https://<Hostname>/AppServer/api/entities/Person?lastname=adams&limit=2
[{
"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
}
}]
This sample demonstrates the use of the loadType=Slim.
https://<Hostname>/AppServer/api/entities/Person?lastname=adams&limit=2&loadType=Slim
[{
"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"
}
}]
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
[{
"values": {
"UID_Person": "18e51519-f751-4df6-8f39-24ed065c80a9"
}},
{
"values": {
"UID_Person": "26822a10-32bb-4268-ac59-36188301b768" }
}]
To get a list of entities using the POST method, use the URL <baseURL>/api/entities/{table}.
HTTP method |
URI |
Body |
---|---|---|
Get |
<BaseURL>/api/entities/{table} |
{"where": "", "orderBy": ""} |
Parameter |
Description |
Parameter type |
Data type |
---|---|---|---|
table |
Table name (required). |
path |
string |
where |
WHERE clause. |
body |
string |
whereKey |
Predefined WHERE clause from QBMLimitedSQL (Key [UID] or ID [Ident_QBMLimitedSQL]). |
body |
string |
queryParameters |
Parameters to be used in where or whereKey clause. |
body |
string |
queryByExample |
Sample values to filter the entries. |
body |
string |
orderBy |
ORDER BY clause. |
body |
string |
offset |
Offset of first item. |
body |
integer |
limit |
Maximum number of results. |
body |
integer |
displayColumns |
Additional display columns, semicolon separated. |
body |
string |
loadType |
Collection load type. Specify one of the values:
|
body |
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. |
body |
boolean |
CollectionQueryParms{
where string
WHERE clause.
whereKey string
Predefined WHERE clause from QBMLimitedSQL.
orderBy string
ORDER BY clause.
offset integer
Offset of first item.
limit integer($int32)
Maximum number of results.
displayColumns [...]
loadType string
default: Default
Collection load type.
Enum:
Array [ 6 ]
queryParameters {
Parameters to be used in where or whereKey clause.
}
queryByExample {
Sample values to filter the entries.
}
noUrls boolean
Do not return URLs for the entries.
}
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)
{
"where": "string",
"whereKey": "string",
"orderBy": "string",
"offset": 0,
"limit": 0,
"displayColumns": [
"string"
],
"loadType": "Default",
"queryParameters": {
"lastname": "Miller",
"age": 42
},
"queryByExample": {
"lastname": "Einstein",
"firstname": "Albert"
},
"noUrls": true
}
This sample demonstrates the use of the where and orderBy parameters in the body.
https://<Hostname>/AppServer/api/entities/Person?limit=2
{
"where": "UID_Department in (Select UID_Department from Department where DepartmentName = 'Service & Support')",
"orderBy": "LastName ASC, FirstName DESC"
}
[{
"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
}
}]
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
{
"where": "UID_Department in (Select UID_Department from Department where DepartmentName = 'Service & Support')",
"orderBy": "LastName ASC, FirstName DESC"
}
[{
"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
}
}]
To get only the count for a list of entities using the GET method, use the URL <baseURL>/api/entities/{table}/count.
Query parameters to be used in WHERE clauses and predefined WHERE clauses can be provided in the form @paramname=value. Per default they have the type string. Additionally, it is possible to pass the type with the name: @otherParam[int]=3. Types originate from DbVal class.
HTTP method | URI | Body |
---|---|---|
Get | <BaseURL>/api/entities/{table}/count | None |
Parameter | Description | Parameter type | Data type |
---|---|---|---|
table | Table name (required). | path | string |
where | WHERE clause. | query | string |
whereKey |
Predefined WHERE clause from QBMLimitedSQL (Key [UID] or ID [Ident_QBMLimitedSQL]). |
query |
string |
Count(integer)
This sample demonstrates the use of the query by example parameters.
https://<Hostname>/AppServer/api/entities/Person/count?lastname=adams
2
© 2024 One Identity LLC. ALL RIGHTS RESERVED. 利用規約 プライバシー Cookie Preference Center