立即与支持人员聊天
与支持团队交流

Identity Manager 9.2 - REST API Reference Guide

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.

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.

Table 20: Get count of collection (GET) request
HTTP method URI Body
Get <BaseURL>/api/entities/{table}/count None
Table 21: Get count of collection (GET) parameters
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

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 22: Get count of collection (POST) request

HTTP method

URI

Body

Get <BaseURL>/api/entities/{table}/count {"where": ""}
Table 23: Get count of collection (POST) parameters
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

Body schema:

CollectionQueryCountParms{

where string

WHERE clause.

whereKey string

Predefined WHERE clause from QBMLimitedSQL.

queryParameters {

Parameters to be used in where or whereKey clause.

}

queryByExample {

Sample values to filter the entries.

}

}

Response schema:

Count(integer)

Example: Body

{

"where": "string",

"whereKey": "string",

"queryParameters": {

"lastname": "Miller",

"age": 42

},

"queryByExample": {

"lastname": "Einstein",

"firstname": "Albert"

}

}

Example:

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

Body:

{"where": "LastName=adams"}

Response:

2

Single entities

The following APIs are used to handle entities of One Identity Manager. You can create, read, update, and delete single entities as well as call methods of an entity and generate events.

Detailed information about this topic

Create a single entity

To create a single entity, use the URL <baseURL>/api/entity/{table}.

Table 24: Create single entity request

HTTP method

URI

Body

Post

<BaseURL>/api/entity/{table}

{"values": {

"StringColumn": "string",

"IntColumn": 0,

"DateColumn": "2016-05-19T11:21:33.579Z",

"BoolColumn":  True

}

Table 25: Create single entity parameters

Parameter

Description

Parameter type

Data type

table

Table name (required).

path

string

values

Values to set.

body

SampleValues

Body schema:

SingleChangeBody {

values(SampleValues, optional)

}

SampleValues {

StringColumn(string, optional),

IntColumn(integer, optional),

DateColumn(date - time, optional),

BoolColumn (boolean, optional)

}

Response schema:

CreateSingleResult {

uid (string, optional),

uri (string, optional)

}

Example:

https://<Hostname>/AppServer/api/entity/Person

Body:

{

"values": {

"FirstName": "Jeremia",

"LastName": "Bodewell",

"IsExternal": True,

"BirthDate": "1993-05-14",

"Gender": 1

}

}

Response:

{

"uid": "83b10e84-c64e-4f9f-9ecb-2d0d7c94e8ec",

"uri": "https://<Hostname>/AppServer/api/entity/Person/83b10e84-c64e-4f9f-9ecb-2d0d7c94e8ec"

}

相关文档

The document was helpful.

选择评级

I easily found the information I needed.

选择评级