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

Intergraph Smart Engineering Manager Web Installation and Configuration

Language
English
Product
Intergraph Smart Engineering Manager
Subproduct
Web
Search by Category
Installation & Upgrade
Smart Engineering Manager Web Version
3.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/webapibe3.0/sa/v3/Companies('dfbbe4ae-bfb2-44a3-9169-cd6f9f6159b7')/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>/sa/v3

  • 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/webapibe3.0/sa/v3/Companies('dfbbe4ae-bfb2-44a3-9169-cd6f9f6159b7')/Users('c2VtYWRtaW4=')

Update specific user details under a company

Use the PATCH method with the following input:

https://<Server Name>/<IIS Application Name>/sa/v3/Companies('CompanyId')/Users('Encrypted Subject')

PATCH

https://WebApiServer1.APIServerDomain.com/webapibe3.0/sa/v3/Companies('dfbbe4ae-bfb2-44a3-9169-cd6f9f6159b7')/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": "User A",

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

"AssociatedGroups": [

"bc755e3d-6533-4a74-8688-84b4ce26ccf2"]

}

Delete user details under a company

Use the DELETE method with the following input:

  • Service Root URI: https://<Server Name>/<IIS Application Name>/sa/v3

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

DELETE

https://WebApiServer1.APIServerDomain.com/webapibe3.0/sa/v3/Companies('dfbbe4ae-bfb2-44a3-9169-cd6f9f6159b7')/Users('c2VtYWRtaW4=')

If the user is assigned to multiple companies, this request removes the user from the specified company. If the user is assigned to one company only, on completion of this request, the user is deleted.

Delete user details for a specific group under a company

Use the DELETE method with the following input:

  • Service Root URI: https://<Server Name>/<IIS Application Name>/sa/v3

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

DELETE

https://WebApiServer1.APIServerDomain.com/webapibe3.0/sa/v3/Companies('dfbbe4ae-bfb2-44a3-9169-cd6f9f6159b7')/Groups('bc755e3d-6533-4a74-8688-84b4ce26ccf2')/Users('c2VtYWRtaW4=')

If the user is assigned to multiple companies or multiple groups under a company, this request removes the user from the specified group. If the user is assigned to one group under one company only, on completion of this request, the user is deleted.