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

Identity Manager 9.2 - REST API Reference Guide

Create a batch of single entities

To create a batch single entity, use the URL <baseURL>/api/entities.

Table 26: Create a batch of single entities request

HTTP method

URI

Body

Post

<BaseURL>/api/entities

{

"entities": [

{

"table": "string",

"values": {

"StringColumn": "string",

"IntColumn": 0,

"DateColumn": "2016-0519T11:21:33.579Z",

"DoubleColumn": 3.14,

"BoolColumn": true

}

}

]

}

Table 27: Create a batch of single entities parameters
Parameter Description Parameter type Data type
entities List of entities to create (required). Body array[InsertEntity]
Body schema:

BulkChangeBodyInsert {

entities(array[InsertEntity])

}

InsertEntity {

table(string),

values(SampleValues, optional)

}

SampleValues {

StringColumn(string, optional),

IntColumn(integer, optional),

DateColumn(date - time, optional),

BoolColumn (boolean, optional)

}

Response schema:

CreateBulkResult {

entities(Array[UidAndUri])

UidAndUri {

uid (string, optional),

uri (string, optional)

}

Example:

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

Body:

{

"entities": [

{

"table": "Person",

"values": {

"FirstName": "Jeremia",

"LastName": "Bodewell",

"IsExternal": True,

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

"Gender": 1

}

},

{

"table": "Person",

"values": {

"FirstName": "Rose",

"LastName": "Gladstone",

"IsExternal": False,

"BirthDate": "1991-03-21",

"Gender": 2

}

}

]

}

Response:

{

"entities": [

{

"uid": "8a2eee88-0615-4595-a903-8388ca74d877",

"uri": "/AppServer/api/entity/Person/8a2eee88-0615-4595-a903-8388ca74d877"

},

{

"uid": "df563a8c-203a-4132-8fcb-bc4adaee35b6",

"uri": "/AppServer/api/entity/Person/df563a8c-203a-4132-8fcb-bc4adaee35b6"

}

]

}

Get a single entity

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

Table 28: Get single entity request

HTTP method

URI

Body

Get

<BaseURL>/api/entity/{table}/{uid}

None

Table 29: Get single entity parameters

Parameter

Description

Parameter type

Data type

table

Table name (required).

path

string

uid

GUID of this entity (required).

path

string

Response schema:

SingleEntry {

uri (string),

uid (string, optional),

display (string, optional),

values (SampleValues, optional),

links (Array[Link], optional)

}

SampleValues {

StringColumn (string, optional),

IntColumn (integer, optional),

DateColumn (date-time, optional),

BoolColumn (boolean, optional)

}

Link {

name (string, optional)

}

Example:

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

Response:

{

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

"display": "Bodewell, Jeremia (JEREMIAB)",

"values": {

"ApprovalState": 0,

"AuthentifierLogins": "",

"BirthDate": "1993-05-14T00:00:00.0000000Z",

"Building": "",

"CanonicalName": "",

"CentralAccount": "JEREMIAB",

"CentralPassword": "",

"CentralSAPAccount": "BODEWELJ",

...

"XObjectKey": "<Key><T>Person</T><P>83b10e84-c64e-4f9f-9ecb-2d0d7c94e8ec</P></Key>",

"XTouched": "",

"XUserInserted": "<user name>",

"XUserUpdated": "<user name>",

"ZIPCode": ""

}

}

Change a single entity

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

Table 30: Change single entity request

HTTP method

URI

Body

Put

<BaseURL>/api/entity/{table}/{uid}

{"values": {

"StringColumn": "string",

"IntColumn": 0,

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

"BoolColumn": true

}

Table 31: Change single entity parameters

Parameter

Description

Parameter type

Data type

table

Table name (required).

path

string

uid

GUID of the entity (required).

path

string

values

Values to change.

body

SampleValues

Body schema:

SingleChangeBody {

values(SampleValues, optional)

}

SampleValues {

StringColumn(string, optional),

IntColumn(integer, optional),

DateColumn(date - time, optional),

BoolColumn (boolean, optional)

}

Response schema:

{}

Example:

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

Body:

{

"values": {

"LastName": "Garibaldi",

"IsExternal": false,

"UID_Locality": "83615878-7205-408d-a5fa-f260840c867c"

}

}

Response Code:

200

Response:

{}

Change a batch of single entities

To change a single entity, use the URL <baseURL>/api/entities.

Table 32: Change a batch of single entities request

HTTP method

URI

Body

Post

<BaseURL>/api/entities

{

"entities": [

{

"table": "string",

"uid": "string",

"values": {

"StringColumn": "string",

"IntColumn": 0,

"DateColumn": "2016-0519T11:21:33.579Z",

"DoubleColumn": 3.14,

"BoolColumn": true

}

}

],

"insertMissing": false

}

Table 33: Change a batch of single entities parameters
Parameter Description Parameter type Data type
entities List of entities to create (required). Body array[UpdateEntity]
insertMissing Insert entities that could not be found using the supplied keys. Body Boolean
Body schema:

BulkChangeBodyUpdate {

entities(Array[UpdateEntity]),

insertMissing(boolean,default: false)

}

UpdateEntity {

table(string),

uid(string),

values(SampleValues, optional)

}

SampleValues {

StringColumn(string, optional),

IntColumn(integer, optional),

DateColumn(date - time, optional),

BoolColumn (boolean, optional)

}

Response Code:

204

Example 1:

This sample demonstrates the change of existing entities while omitting the insertMissing parameter in the body.

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

Body:

{

"entities": [

{

"table": "Person",

"uid": "8a2eee88-0615-4595-a903-8388ca74d877",

"values": {

"LastName": "Coleman",

"IsExternal": false,

"ExitDate": "2032-12-31"

}

},

{

"table": "Person",

"uid": "df563a8c-203a-4132-8fcb-bc4adabb35b6",

"values": {

"FirstName": "Rosalie",

"LastName": "Meyer",

"IsExternal": True,

"BirthDate": "1991-03-21",

"Gender": 2,

"ExitDate": "2032-12-31",

}

}

]

}

Response Code:

204

Example 2:

This sample demonstrates the change of existing entities using the insertMissing parameter in the body to create non-existing entities.

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

Body:

{

"entities": [

{

"table": "Person",

"uid": "8a2eee88-0615-4595-a903-8388ca74d877",

"values": {

"FirstName": "Jeremy",

"LastName": "Coleman",

"IsExternal": false,

"ExitDate": "2032-12-31"

}

},

{

"table": "Person",

"uid": "df563a8c-203a-4132-8fcb-bc4adaee35b6",

"values": {

"FirstName": "Rosalie",

"LastName": "Meyer",

"IsExternal": True,

"ExitDate": "2032-12-31",

}

}

]

"insertMissing": True

}

Response Code:

204

相关文档

The document was helpful.

选择评级

I easily found the information I needed.

选择评级