This request allows you to add a Windows user group as a role to your plant.
Use the POST method to create a role with the following input:
-
Service Root URI: https://<Server Name>/<IIS Application Name>/sem/V2
-
Resource path: /Sites('<Site Name>')/Plants('<Plant Name>')/Roles
-
Resource path strings are case-sensitive.
-
The parameters for the service root URI below are provided as an example. The server and domain name you provide depend on the environment on which you create your Smart APIs.
Sample URI
POST
https://WebApiServer1.APIServerDomain.com/sem-webapi/sem/V2/Sites('WebAPISite_01')/Plants('WebAPIPlant_01')/Roles
Sample JSON request
{
"Name": "YourDomain.com/API-DG-Develop",
"Description": "Role for all developers"
}
Sample JSON response
The response to the request is:
{
"@odata.context": "https://localhost/sem-webapi/sem/V2/$metadata#Sites('WebAPISite_01')/Plants('WebAPIPlant_01')/Roles/$entity",
"Id": "29715330B28649DDB3029D33259EDF3B",
"ConcurrencyToken": "5248391437335767454",
"Name": "YourDomain.com/API-DG-Develop",
"Description": "Role for all developers"
}