Understanding REST API Specifications
Note:
Prefixhttp://<Webserverip>:<servletport>/<context>
to the values in the URL column.
For example,
/rest-api/idm/service/create/user must be
http://<Webserverip>:<servletport>/<context>/rest-api/idm/service/create/user
.
The following table provides details for the REST APIs:
Table 12-4 REST API specifications
No | Requirement | URL | Method Type | Request | Sample Request JSON | Comments |
---|---|---|---|---|---|---|
1 | Create User | /rest-api/idm/service/create/user | POST | JSON |
{ "attributes": { "user_id": "user_id", "user_name": "user_name", "user_password": "password", "user_start_date": "start_date", "user_end_date": "End_date", "user_is_authorized": true(/false), "user_is_enabled": true(/false), "user_logon_holiday": true(/false)
"smsauthonly": true(/false) } } |
All fields are mandatory. The Date format is mm/dd/yyyy. If user_is_authorized is set to true, then the User is authorized during User creation. If smsauthonly is set to true, then the User is authenticated only using the SMS Authentication type. If it is set to false, then the User can be authenticated using the SMS, LDAP and SSO authentication types. However, the smsauthonly configuration feature is available in the OFS AAI Release 8.1.1.1 and later versions. |
2 | Update User | /rest-api/idm/service/update/user | POST | JSON |
{ "attributes": { "user_id": "user_id", "user_name": "user_name", "user_password": "password", "user_start_date": "start_date", "user_end_date": "End_date", "user_is_authorized": true(/false), "user_is_enabled": true(/false), "user_logon_holiday": true(/false)
"smsauthonly": true(/false) } } |
All fields are mandatory. The Date format is mm/dd/yyyy. If user_is_authorized is set to true, then the User is authorized during User creation. If smsauthonly is set to true, then the User is authenticated only using the SMS Authentication type. If it is set to false, then the User can be authenticated using the SMS, LDAP and SSO authentication types. However, the smsauthonly configuration feature is available in the OFS AAI Release 8.1.1.1 and later versions. |
3 | Delete User | /rest-api/idm/service/delete/user | POST | TEXT | USERID | The User ID is mandatory. |
4 | Authorize User | /rest-api/idm/service/authorize/user | POST | TEXT | USERID | The User ID is mandatory. |
5 | Force User Delete | rest-api/idm/service/delete/user/force | POST | TEXT | USERID |
The User ID is mandatory. NOTE: This is applicable only after applying 8122 ML |
6 | Reinstate User | /rest-api/idm/service/reinstate/user | POST | TEXT | USERID | The User ID is mandatory. |
7 | Map User to Group | /rest-api/idm/service/map/groupmembers | POST | JSON |
{ "user_id": "user_id", "group": [ { "group_id": "group_id", "group_name": "groupname" }, ... ] } |
The mapping of the User ID to Groups. |
8 | Unmap User from Group | /rest-api/idm/service/unmap/groupmembers | POST | JSON |
{ "user_id": "user_id", "group": [ { "group_id": "group_id", "group_name": "groupname" }, ... ] } |
The unmapping of the User IDs from Groups. |
9 | User Status Report | /rest-api/v1/user/status?userId=<USERID>&userName=<USERNAME>&idledays=<Number of days idle>&gsUserID=<Logged-in user>&loggedIp=<IP Address>&enable=<Y/N>&delete=<Y/N>&loggedIn=<Y/N> | GET | - |
For example: https://<HOST_NAME:PORT>/<CONTEXTNAME>/rest-api/v1/user/status?userId=exampleUserID&userName=exampleUserName &idledays=&gsUserID=SYSADMN&loggedIp=<192.0.2.1>&enable=Y&delete=N&loggedIn=Y |
The JSON request displays the Report for the deleted, disabled, currently logged in, and idle Users. Note: The Get Response populates additional fields in v8.1.2.0.0+ on applying the 33150367 One-off Patch. See the Appendix B – Additional Information in REST APIs for User Status and User Access Reports Section for more details.
|
10 | User Attribute Report | /rest-api/v1/user/attributes?userId=<USERID>&userName=<USERNAME>&gsUserID=<Logged-in User>&loggedIp=<IP Address> | GET | - |
For example: https://<HOST_NAME:PORT>/<CONTEXTNAME>/rest-api/v1/user/attributes?userId=exampleUserID&userName=exampleUserName&gsUserID=SYSADMN&loggedIp=<192.0.2.1> |
The JSON request displays the Report for the various User attributes. Note:
|
11 | User Admin Activity Report | /rest-api/v1/user/useradminactivity?userId=<USERID>&userName=<USERNAME>&startdate=<mm/dd/yyyy>&enddate=<mm/dd/yyyy>&gsUserID=<Logged-in User>&loggedIp=<IP Address> | GET | - |
For example: https://<HOST_NAME:PORT>/<CONTEXTNAME>/rest-api/v1/user/useradminactivity?userId=exampleUserID&userName=exampleUserName&startdate=01/01/2020&enddate=12/31/2020&gsUserID=SYSADMN&loggedIp=<192.0.2.1> |
The JSON request displays the Report for the various activities of the User. Note:
|
12 | User Access Report | /rest-api/v1/user/useraccess?userId=<USERID>&userName=<USERNAME>&gsUserID=<Logged-in User>&loggedIp=<IP Address> | GET | - |
For example: https://<HOST_NAME:PORT>/<CONTEXTNAME>/rest-api/v1/user/useraccess?userId=exampleUserID&userName=exampleUserName&gsUserID=SYSADMN&loggedIp=<192.0.2.1> |
The JSON request displays the Report for User Access Rights. Note: The Get Response populates additional fields in v8.1.2.0.0+ on applying the 33150367 One-off Patch. See the Appendix B – Additional Information in REST APIs for User Status and User Access Reports Section for more details.
|
13 | Audit Trail Report | /rest-api/v1/audit/summary | POST | JSON |
{ "userId":"<User Id>", "fromdate":"<Date>", "todate":"<Date>", "action":"<add/copy/delete/authorize and other actions>",
"strlocale": "en_US", "msgsearchfld":"", "loggedIP":"<IP Address>", "gsUsrID":"<Logged-in User Id>" } |
The JSON request displays the Report for Audit Trail. Note:
Note: If you do not enter any value for this attribute, all records for the actions is displayed. Displays all actions performed by the selected user. When the audit trail report is generated the details of the associated activity/data field and the application rule IDs of the PMF process is also added as the Action details for all the displayed actions.
Displays add events performed by the selected user.
Displays advanced events performed by the selected user.
Displays authorization performed by the selected user.
Displays archive actions performed by the selected user.
Displays compare actions performed by the selected user.
Displays copy events performed by the selected user.
Displays any disable actions performed by the selected user.
Displays downloads done by the selected user.
Displays any edits done by the selected user.
Displays any enable actions done by the selected user.
Displays execute actions performed by the selected user.
Displays export events performed by the selected user.
Displays generate events performed by the selected user.
Displays ignore access events performed by the selected user.
Displays ignore lock events performed by the selected user.
Displays import events performed by the selected user.
Displays the latest events performed by the selected user.
Displays any link events performed by the selected user.
Displays any lock events linked to the selected user.
Displays login events performed by the selected user.
Displays logout events performed by the selected user.
Displays publish events performed by the selected user.
Displays purge events performed by the selected user.
Displays reject events performed by the selected user.
Displays delete events performed by the selected user.
Displays restore events performed by the selected user.
Displays review events performed by the selected user.
Displays revoke events performed by the selected user.
Displays submit events performed by the selected user.
Displays summary modifications performed by the selected user.
Displays trace events performed by the selected user.
Displays uploads performed by the selected user.
Displays validate events performed by the selected user.
Displays view events performed by the selected user.
|
NOTE:
|
||||||
14 | Create Application | /rest-api/v1/app/create | POST | JSON |
{ "appId": "application id", "appName": "application name", "appDesc": "application desc", "infodomId": "Infodom name", "enabled": true/false, "userLocale":"locale (en_US)" } |
All fields are mandatory. If Enabled is set to true then created application will be enabled else it will be disabled. |
15 | Delete Application | /rest-api/v1/app/ delete/app_Id | DELETE | Path param | Url Params are used so sample request will be as follows: rest-api/v1/app/app_id | app id is mandatory. |
16 | Create Infodom | /rest-api/v1/infodom/create | POST | JSON |
{ "appLogPath": "/scratch/test8123/ftpshare/ PAERTHTESTINFO /logs", "dbLogPath": "/scratch/test8123/ftpshare/ PAERTHTESTINFO /logs", "infodomName": "PAERTHTESTINFO", "infodomDesc": "PAERTHTESTINFO DESC", "authRSNRequired": false, "infodomTypeStaging": true, "dbName":"testparth", "dbServer":"100.76.146.194", --FIC_HOME IP "olapServer":"127.0.0.1", "olapType":"ESSBASE", "scriptRequired" : false --default is true [which creates AAI related tables] } |
|
17 | Delete Infodom | /rest-api/v1/infodom/delete/infodom_name | DELETE | Path param | Url Params are used so sample request will be as follows: rest-api/v1/app/infodom_name | Infodom name is mandatory. |
18 | Create segment | /rest-api/v1/segment /create | POST | JSON |
{ "segmentCode":"segment_code", "segmentName":"segment_name", "segmentDesc":"segment_desc", "segmentType":"segment_type", "dsnID":"infodom_id", "ownerCode":"user_id" } |
All fields are mandatory. Three types of segmentType (PUBLIC, PRIVATE, SHARED) ownerCode is user id if you have selected segmentType as private. |
19 | Authorize role group | /rest-api/v1/group/role/authorize?operation=map&auth=A | POST | JSON |
{ "groupid":"BUSINESSADMIN", "rolecodes" : ["QLOCAUTHRL","QLOCVIEWRL"] } |
operation=map/unmap[based on roles are mapped or unmapped auth=A/R [A:authorize, R:reject] |
20 | Authorize domain group | /rest-api/v1/group/domain/authorize?operation=map&auth=A | POST | JSON |
{ "groupid":"IDENTITYMGMTAUTH", "domainnames" : ["PARTHTESTINFO-PTFLD","PARTHTESTINFO-PARFLD"] } |
operation=map/unmap[based on domains are mapped or unmapped] auth=A/R [A:authorize, R:reject] |
21 | Create Database Details | /rest-api/v1/ database-details/create | POST | JSON |
{ "dbServer":"100.76.146.194", "dbName":"aaipatest", "dbSchemaName":"aaiptest", "dbDateFormat":"mm-dd-yyyy", "authAliasName":"aaipatest", "authAliasUserName":"aaipatest", "authAliasPassword":"aaipatest", "dataSourceString":"SMSOCI19PDB", "jdbcConnString":"jdbc:oracle:thin:@100.76.146.194:1521/SMSOCI19PDB",
For Wallet: jdbc:oracle:thin:/@july25_als where july25_als is the alias created for new schema user created.
"jndiName":"AAIPATESTINFO" } |
All Fields Are required. |