Run requests for a specific user - Intergraph Smart Engineering Manager - 4.0 - Installation & Upgrade - Hexagon

Intergraph Smart Engineering Manager Web API Installation and Configuration

Language
English
Product
Intergraph Smart Engineering Manager
Subproduct
Web API
Search by Category
Installation & Upgrade
Smart Engineering Manager Web Version
4.0

As mentioned for user creation, the 'Subject' parameter value defines each user uniquely. Since the value may include characters that are not allowed in OData requests, it is necessary to encode the 'Subject' parameter as a Base 64 value and then to use this encoded result in the requests.

Perform Base 64 encoding

  1. Run the GET Users request, for example:

    https://WebApiServer1.APIServerDomain.com/webapi4.0/sem/v4/Users

  2. Go to URL: https://www.base64encode.org/.

  3. Copy the 'Subject' parameter value for the required user and paste it into the top field on the Web page.

  4. Press ENCODE.

  5. In the lower field (Results), copy the encoded value and paste it into the request you want to run for this user.

  • Encoded output values are case-sensitive; however, if recognition of the 'Subject' parameter is not case-sensitive, either upper-case or lower-case alternatives are accepted, for example:

    • Subject: semadmin; encoded value: c2VtYWRtaW4=

    • Subject: SEMAdmin; encoded value: U0VNQWRtaW4=

  • To check the 'Subject' parameter value for an encoded string, go to https://www.base64decode.org/, copy the value into the top field, and press DECODE.

View a user

Use the GET method to view a user with the following input:

  • Service Root URI: https://<Server Name>/<IIS Application Name>/sem/v4

  • Resource path: /Users('Encrypted Subject')

The parameters for the service root URI below are provided as an example. The server and domain name you provide depend on your specific environment.

GET

https://WebApiServer1.APIServerDomain.com/webapi4.0/sem/v4/Users('c2VtYWRtaW4=')

Update specific user details

Use the PATCH method with the following input:

https://<Server Name>/<IIS Application Name>/sem/v4/Users('Encrypted Subject')

PATCH

https://WebApiServer1.APIServerDomain.com/webapi4.0/sem/v4/Users('c2VtYWRtaW4=')

Sample JSON request

In this request, 'Everyone' is specified as the only group to be associated with this user. After running this request, any other groups the user was previously associated with will be removed from the user's details.

{

"Name": "AD User A",

"Email": "semadminAD1@MyDomain.com",

"Groups": [

"1be7f17e-6b60-4e14-94af-e38241efbfe0"]

}

Update user details for a specific group

Use the PATCH method with the following input:

  • Service Root URI: https://<Server Name>/<IIS Application Name>/sem/v4

  • Resource path: /Groups('GroupId')/Users('Encrypted Subject')

PATCH

https://WebApiServer1.APIServerDomain.com/webapi4.0/sem/v4/Groups('1be7f17e-6b60-4e14-94af-e38241efbfe0')/Users('c2VtYWRtaW4=')

Sample JSON request

This request checks that the user is assigned to the specified group and then updates the parameters in the body of the request.

{

"Name": "AD User A",

"Email": "semadminAD1@MyDomain.com"

}

Delete user details for a specific group

Use the DELETE method with the following input:

  • Service Root URI: https://<Server Name>/<IIS Application Name>/sem/v4

  • Resource path: /Groups('GroupId')/Users('Encrypted Subject')

DELETE

https://WebApiServer1.APIServerDomain.com/webapi4.0/sem/v4/Groups('1be7f17e-6b60-4e14-94af-e38241efbfe0')/Users('c2VtYWRtaW4=')

Delete a user

Use the DELETE method with the following input:

  • Service Root URI: https://<Server Name>/<IIS Application Name>/sem/v4

  • Resource path: /Users('Encrypted Subject')

DELETE

https://WebApiServer1.APIServerDomain.com/webapi4.0/sem/v4/Users('c2VtYWRtaW4=')