The community has a new login process
The community single sign-on system has been changed. Learn more about it HERE
Vitaliy Contributor.
Contributor.
406 views

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

Jump to solution

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 

0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

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

Jump to solution

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 Expert
Micro Focus Expert

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

Jump to solution

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?

Jump to solution

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

0 Likes
Mario Morelli Acclaimed Contributor.
Acclaimed Contributor.

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

Jump to solution

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?

Jump to solution

Hi Mario Morelli

Perfect! Thank you very much!

Vitaliy

 

0 Likes
Micro Focus Expert
Micro Focus Expert

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

Jump to solution

@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

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. 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.