Roles Management
Assign Roles by UID
curl -X PUT \'https://api.loginradius.com/identity/v2/manage/account/{uid}/role?apikey=&apisecret=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \-d "{ "roles" : [ "roles" ] }"
The above command returns JSON structured like this:
{"Roles" : ["" , ""]}
This API is used to assign your desired roles to a given user.
HTTP Request
Put /identity/v2/manage/account/{uid}/role?apikey=&apisecret=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
Body Attributes
Attribute | Description | |
---|---|---|
Roles | Array of String, which represents the role name | Model Class containing Definition of payload for Create Role API [Required] |
Upsert Context
curl -X PUT \'https://api.loginradius.com/identity/v2/manage/account/{uid}/roleContext?apikey=&apisecret=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \-d "{ "roleContext" : [ {"additionalPermissions" => ["<additionalPermissions>" ] ,"context" => "<context>" ,"expiration" => "<expiration>" ,"roles" => ["<roles>" ]} ] }"
The above command returns JSON structured like this:
{"Data" : [{}]}
This API creates a Context with a set of Roles
HTTP Request
Put /identity/v2/manage/account/{uid}/roleContext?apikey=&apisecret=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
Body Attributes
Attribute | Description | |
---|---|---|
RoleContext | Array of RoleContext object, see body tab for structure | Model Class containing Definition of RoleContext payload [Required] |
Add Permissions to Role
curl -X PUT \'https://api.loginradius.com/identity/v2/manage/role/{role}/permission?apikey=&apisecret=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \-d "{ "permissions" : [ "permissions" ] }"
The above command returns JSON structured like this:
{"Name" : "Array of String, which represents the role name","Permissions" : {"key1":"value1","key2":"value2"}}
This API is used to add permissions to a given role.
HTTP Request
Put /identity/v2/manage/role/{role}/permission?apikey=&apisecret=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
Body Attributes
Attribute | Description | |
---|---|---|
Permissions | Any Permission name for the role | Model Class containing Definition for PermissionsModel Property [Required] |
Roles Create
curl -X POST \'https://api.loginradius.com/identity/v2/manage/role?apikey=&apisecret=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \-d "{ "roles" : [ {"name" => "<name>" ,"permissions" => {"Permission_name"=>true}} ] }"
The above command returns JSON structured like this:
{"Count" : 0,"data" : [{}]}
This API creates a role with permissions.
HTTP Request
Post /identity/v2/manage/role?apikey=&apisecret=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
Body Attributes
Attribute | Description | |
---|---|---|
Roles | Array of String, which represents the role name | Model Class containing Definition of payload for Roles API [Required] |
Roles by UID
curl -X GET \'https://api.loginradius.com/identity/v2/manage/account/{uid}/role?apikey=&apisecret=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \
The above command returns JSON structured like this:
{"Roles" : ["" , ""]}
API is used to retrieve all the assigned roles of a particular User.
HTTP Request
Get /identity/v2/manage/account/{uid}/role?apikey=&apisecret=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
Get Context with Roles and Permissions
curl -X GET \'https://api.loginradius.com/identity/v2/manage/account/{uid}/roleContext?apikey=&apisecret=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \
The above command returns JSON structured like this:
{"Data" : [{}]}
This API Gets the contexts that have been configured and the associated roles and permissions.
HTTP Request
Get /identity/v2/manage/account/{uid}/roleContext?apikey=&apisecret=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
Role Context profile
curl -X GET \'https://api.loginradius.com/identity/v2/manage/account/roleContext/{contextName}?apikey=&apisecret=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \
The above command returns JSON structured like this:
{"Data" : [{}]}
The API is used to retrieve role context by the context name.
HTTP Request
Get /identity/v2/manage/account/roleContext/{contextName}?apikey=&apisecret=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
Roles List
curl -X GET \'https://api.loginradius.com/identity/v2/manage/role?apikey=&apisecret=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \
The above command returns JSON structured like this:
{"Count" : 0,"data" : [{}]}
This API retrieves the complete list of created roles with permissions of your app.
HTTP Request
Get /identity/v2/manage/role?apikey=&apisecret=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
Unassign Roles by UID
curl -X DELETE \'https://api.loginradius.com/identity/v2/manage/account/{uid}/role?apikey=&apisecret=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \-d "{ "roles" : [ "roles" ] }"
The above command returns JSON structured like this:
{"IsDeleted" : true,"RecordsDeleted" : 0}
This API is used to unassign roles from a user.
HTTP Request
Delete /identity/v2/manage/account/{uid}/role?apikey=&apisecret=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
Body Attributes
Attribute | Description | |
---|---|---|
Roles | Array of String, which represents the role name | Model Class containing Definition of payload for Create Role API [Required] |
Delete Role Context
curl -X DELETE \'https://api.loginradius.com/identity/v2/manage/account/{uid}/roleContext/{contextName}?apikey=&apisecret=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \
The above command returns JSON structured like this:
{"IsDeleted" : true,"RecordsDeleted" : 0}
This API Deletes the specified Role Context
HTTP Request
Delete /identity/v2/manage/account/{uid}/roleContext/{contextName}?apikey=&apisecret=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
Delete Role from Context
curl -X DELETE \'https://api.loginradius.com/identity/v2/manage/account/{uid}/roleContext/{contextName}/role?apikey=&apisecret=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \-d "{ "roles" : [ "roles" ] }"
The above command returns JSON structured like this:
{"IsDeleted" : true,"RecordsDeleted" : 0}
This API Deletes the specified Role from a Context.
HTTP Request
Delete /identity/v2/manage/account/{uid}/roleContext/{contextName}/role?apikey=&apisecret=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
Body Attributes
Attribute | Description | |
---|---|---|
Roles | Array of String, which represents the role name | Model Class containing Definition of payload for RoleContextRemoveRole API [Required] |
Delete Additional Permission from Context
curl -X DELETE \'https://api.loginradius.com/identity/v2/manage/account/{uid}/roleContext/{contextName}/additionalPermission?apikey=&apisecret=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \-d "{ "additionalPermissions" : [ "additionalPermissions" ] }"
The above command returns JSON structured like this:
{"IsDeleted" : true,"RecordsDeleted" : 0}
This API Deletes Additional Permissions from Context.
HTTP Request
Delete /identity/v2/manage/account/{uid}/roleContext/{contextName}/additionalPermission?apikey=&apisecret=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
Body Attributes
Attribute | Description | |
---|---|---|
AdditionalPermissions | Array of String, which represents the additional permissions | Model Class containing Definition of payload for RoleContextAdditionalPermissionRemoveRole API [Required] |
Account Delete Role
curl -X DELETE \'https://api.loginradius.com/identity/v2/manage/role/{role}?apikey=&apisecret=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \
The above command returns JSON structured like this:
{"IsDeleted" : true,"RecordsDeleted" : 0}
This API is used to delete the role.
HTTP Request
Delete /identity/v2/manage/role/{role}?apikey=&apisecret=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
Remove Permissions
curl -X DELETE \'https://api.loginradius.com/identity/v2/manage/role/{role}/permission?apikey=&apisecret=' \-H 'Cache-Control: no-cache' \-H 'content-Type: application/json' \-d "{ "permissions" : [ "permissions" ] }"
The above command returns JSON structured like this:
{"Name" : "Array of String, which represents the role name","Permissions" : {"key1":"value1","key2":"value2"}}
API is used to remove permissions from a role.
HTTP Request
Delete /identity/v2/manage/role/{role}/permission?apikey=&apisecret=
Query Parameters
Parameter | Default | Description |
---|---|---|
apikey | none | LoginRadius API Key [Required] |
apisecret | none | LoginRadius API Secret [Required] |
Body Attributes
Attribute | Description | |
---|---|---|
Permissions | Any Permission name for the role | Model Class containing Definition for PermissionsModel Property [Required] |