This method creates a new Role. The client makes a POST request providing input parameters CompanyID, LanguageID and with XML data includes information of new role. The output will be either in json or xml format depending on the request type.
| Name | Value | |
|---|---|---|
| REST-API METHOD | CREATE ROLE | |
| HTTP METHOD | POST | |
| RESPONSE TYPE | XML | |
| URL | https://api.csm.next4biz.net/services/RoleService/{CompanyID}/role.json/{LangID} | https://api.csm.next4biz.net/services/RoleService/{CompanyID}/role.xml/{LangID} |
| REQUEST HEAD | Authorization: Basic {base64 encoded username:password} Accept: text/html,application/xhtml+json,application/json;q=0.9,*/*;q=0.8 Content-Type: application/json | Authorization: Basic {base64 encoded username:password} Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Content-Type: application/xml |
<CreateRoleRequest>
<ApplicationFunctions>
<ApplicationFunction>
<GroupID>{GroupID}</GroupID>
<GroupName>{GroupName}</GroupName>
<ID>{ID}</ID>
<Name>{Name}</Name>
</ApplicationFunction>
</ApplicationFunctions>
<CreatorID>{CreatorID}</CreatorID>
<RoleName>{RoleName}</RoleName>
</CreateRoleRequest>
{
"ApplicationFunctions": {
"ApplicationFunction": {
"GroupID": "{GroupID}",
"GroupName": "{GroupName}",
"ID": "{ID}",
"Name": "{Name}"
}
},
"CreatorID": "{CreatorID}",
"RoleName": "{RoleName}"
}
<Response
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Message i:nil="true"/>
<Result>{Result}</Result>
</Response>
{
"Message": {},
"Result": "{Result}"
}