NOTICE: Branded Content
NOTICE: Certain versions of content (“Material”) accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.
SMAX User Discussions
cancel

SMA-X REST API: how to get Persons and Groups?

SOLVED
Go to solution
Vitaliy Contributor.
Contributor.

SMA-X REST API: how to get Persons and Groups?

Is it possible to retrieve tenant Persons and Groups using REST API?

As mentioned in Manage Persons API reference it is bulk create/update/delete API . But how to GET ?

GET request to /rest/<tenant>/ums/Person runs but returns null 

1 ACCEPTED SOLUTION

Accepted Solutions
Micro Focus Frequent Contributor Leslie_Nian Micro Focus Frequent Contributor
Micro Focus Frequent Contributor
Solution

Re: SMA-X REST API: how to get Persons and Groups?

The UMS RESE API is used to create/update/delete users/persons. It does not support query. To query person records, you need to use the EMS REST API. Below is the syntax of the REST API to query person and group respectively.

https://<server>:<port>/rest/<tenant id>/ems/Person?<layout>

https://<server>:<port>/rest/<tenant id>/ems/PersonGroup?<layout>

Please note the layout is mandatory. 

5 REPLIES
Micro Focus Frequent Contributor Leslie_Nian Micro Focus Frequent Contributor
Micro Focus Frequent Contributor
Solution

Re: SMA-X REST API: how to get Persons and Groups?

The UMS RESE API is used to create/update/delete users/persons. It does not support query. To query person records, you need to use the EMS REST API. Below is the syntax of the REST API to query person and group respectively.

https://<server>:<port>/rest/<tenant id>/ems/Person?<layout>

https://<server>:<port>/rest/<tenant id>/ems/PersonGroup?<layout>

Please note the layout is mandatory. 

Vitaliy Contributor.
Contributor.

Re: SMA-X REST API: how to get Persons and Groups?

Hi Leslie_Nian
It works, thank you very much! Could you please also advice what syntax to use in order to get Change / Models ?

https://<server>:<port>/rest/<tenant id>/ems/Model?<layout> does not work

And in general, how to detect correct <entity> for ems API?

It not always corresponds to items name from Entities dropdown in Studio.

Thank you in advance

Vitaliy

Mario Morelli Acclaimed Contributor.
Acclaimed Contributor.

Re: SMA-X REST API: how to get Persons and Groups?

Here you go

<>ems/EntityModel?layout=Id,DisplayLabel

The way I do it, is go into a record, then it will normally show the "Table Name" in the URL, and I use Connect-IT to connect, which displays all records that SMA-X exposes which makes it easier to find

 

Vitaliy Contributor.
Contributor.

Re: SMA-X REST API: how to get Persons and Groups?

Hi Mario Morelli

Perfect! Thank you very much!

Vitaliy

 

 Micro Focus Expert Brindusa Kevorkian  Micro Focus Expert
 Micro Focus Expert

Re: SMA-X REST API: how to get Persons and Groups?

@Vitaliy

If you are not familiar with the REST APIs for SMAX, I strongly recommend revieiwing the documentation:

https://docs.microfocus.com/ITSMA/2018.05/NG/SM_X/Content/8000_DeveloperGuide/DeveloperReference.htm

as well as watching the Practitioner forum presentation from Feb 28th (SMA-X best practice presentation and discussion: REST APIs, Data Load):

https://community.softwaregrp.com/t5/SMAX-Learn/Live-Meetings-for-SMA-X-Software-Community-for-the-Technical/ta-p/1616351

Best regards,

Brindusa