Open API v2 / Files & System / Admin Roles
Admin Roles
→
Every request needs a bearer token: Authorization: Bearer <token>. Base URL https://your-site.webinone.com. New to field types? See the type reference.
Retrieves a list of admin roles by using a "where" filtering
Parameters
Wherestring · query
JSON filter expression. Combine operators ($eq, $contains, $gt, $in, …) with $and / $or.
Order_Bystring · query
Sort field. Prefix with - for descending; comma-separate for tie-breakers.
Semantic_Querystring · query
Natural-language search, ranked by relevance.
Min_Scorenumber · query
Lowest relevance score to include when using Semantic_Query.
Offsetinteger · query
Number of items to skip before returning results. Defaults to 0.
Limitinteger · query
Maximum number of items to return. Defaults to 100.
Response
Idstring · nullable
Unique identifier assigned by the platform.
Namestring · nullable
Name of the admin role.
curl "https://your-site.webinone.com/api/v2/admin/admin-roles" \ -H "Authorization: Bearer <token>"
await fetch("https://your-site.webinone.com/api/v2/admin/admin-roles", { method: "GET", headers: { "Authorization": "Bearer <token>" } });
import requests requests.get( "https://your-site.webinone.com/api/v2/admin/admin-roles", headers={"Authorization": "Bearer <token>"} )
$client = new GuzzleHttp\Client(); $response = $client->request('GET', 'https://your-site.webinone.com/api/v2/admin/admin-roles', [ 'headers' => [ 'Authorization' => 'Bearer <token>' ] ]);
using var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://your-site.webinone.com/api/v2/admin/admin-roles"); request.Headers.Add("Authorization", "Bearer <token>"); var response = await client.SendAsync(request);
Response · 200
{
"Items": [
{
"Id": "string",
"Name": "Example"
}
],
"TotalItemsCount": 0
}Creates a new admin role
Body parameters
Namestring · nullable
Name of the admin role.
Restrictionsobject · nullable
Per-entity access rules that define what this role can see and do across CMS, Ecommerce, CRM and other modules.
HasAccessToFtpboolean
Grants the role access to the site's file storage over FTP.
Response
Idstring · nullable
Unique identifier assigned by the platform.
Namestring · nullable
Name of the admin role.
Restrictionsobject · nullable
Per-entity access rules that define what this role can see and do across CMS, Ecommerce, CRM and other modules.
HasAccessToFtpboolean
Whether the role has access to the site's file storage over FTP.
curl -X POST "https://your-site.webinone.com/api/v2/admin/admin-roles" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"Name":"Example","Restrictions":{},"HasAccessToFtp":false}'
await fetch("https://your-site.webinone.com/api/v2/admin/admin-roles", { method: "POST", headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" }, body: JSON.stringify({ "Name": "Example", "Restrictions": {}, "HasAccessToFtp": false }) });
import requests requests.post( "https://your-site.webinone.com/api/v2/admin/admin-roles", headers={"Authorization": "Bearer <token>"}, json={ "Name": "Example", "Restrictions": { }, "HasAccessToFtp": False } )
$client = new GuzzleHttp\Client(); $response = $client->request('POST', 'https://your-site.webinone.com/api/v2/admin/admin-roles', [ 'headers' => [ 'Authorization' => 'Bearer <token>', 'Content-Type' => 'application/json' ], 'json' => [ 'Name' => 'Example', 'Restrictions' => [ ], 'HasAccessToFtp' => false ] ]);
using var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "https://your-site.webinone.com/api/v2/admin/admin-roles"); request.Headers.Add("Authorization", "Bearer <token>"); request.Content = new StringContent( "{\"Name\":\"Example\",\"Restrictions\":{},\"HasAccessToFtp\":false}", Encoding.UTF8, "application/json"); var response = await client.SendAsync(request);
Response · 200
{
"Id": "string",
"Name": "Example",
"Restrictions": {},
"HasAccessToFtp": false
}Retrieves a admin role
Parameters
idinteger · pathrequired
Resource identifier.
Response
Idstring · nullable
Unique identifier assigned by the platform.
Namestring · nullable
Name of the admin role.
Restrictionsobject · nullable
Per-entity access rules that define what this role can see and do across CMS, Ecommerce, CRM and other modules.
HasAccessToFtpboolean
Whether the role has access to the site's file storage over FTP.
curl "https://your-site.webinone.com/api/v2/admin/admin-roles/1" \ -H "Authorization: Bearer <token>"
await fetch("https://your-site.webinone.com/api/v2/admin/admin-roles/1", { method: "GET", headers: { "Authorization": "Bearer <token>" } });
import requests requests.get( "https://your-site.webinone.com/api/v2/admin/admin-roles/1", headers={"Authorization": "Bearer <token>"} )
$client = new GuzzleHttp\Client(); $response = $client->request('GET', 'https://your-site.webinone.com/api/v2/admin/admin-roles/1', [ 'headers' => [ 'Authorization' => 'Bearer <token>' ] ]);
using var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://your-site.webinone.com/api/v2/admin/admin-roles/1"); request.Headers.Add("Authorization", "Bearer <token>"); var response = await client.SendAsync(request);
Response · 200
{
"Id": "string",
"Name": "Example",
"Restrictions": {},
"HasAccessToFtp": false
}Updates an existing admin role
Parameters
idinteger · pathrequired
Resource identifier.
Body parameters
Namestring · nullable
Name of the admin role.
Restrictionsobject · nullable
Per-entity access rules that define what this role can see and do across CMS, Ecommerce, CRM and other modules.
HasAccessToFtpboolean
Grants the role access to the site's file storage over FTP.
Response
Idstring · nullable
Unique identifier assigned by the platform.
Namestring · nullable
Name of the admin role.
Restrictionsobject · nullable
Per-entity access rules that define what this role can see and do across CMS, Ecommerce, CRM and other modules.
HasAccessToFtpboolean
Whether the role has access to the site's file storage over FTP.
curl -X PUT "https://your-site.webinone.com/api/v2/admin/admin-roles/1" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"Name":"Example","Restrictions":{},"HasAccessToFtp":false}'
await fetch("https://your-site.webinone.com/api/v2/admin/admin-roles/1", { method: "PUT", headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" }, body: JSON.stringify({ "Name": "Example", "Restrictions": {}, "HasAccessToFtp": false }) });
import requests requests.put( "https://your-site.webinone.com/api/v2/admin/admin-roles/1", headers={"Authorization": "Bearer <token>"}, json={ "Name": "Example", "Restrictions": { }, "HasAccessToFtp": False } )
$client = new GuzzleHttp\Client(); $response = $client->request('PUT', 'https://your-site.webinone.com/api/v2/admin/admin-roles/1', [ 'headers' => [ 'Authorization' => 'Bearer <token>', 'Content-Type' => 'application/json' ], 'json' => [ 'Name' => 'Example', 'Restrictions' => [ ], 'HasAccessToFtp' => false ] ]);
using var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Put, "https://your-site.webinone.com/api/v2/admin/admin-roles/1"); request.Headers.Add("Authorization", "Bearer <token>"); request.Content = new StringContent( "{\"Name\":\"Example\",\"Restrictions\":{},\"HasAccessToFtp\":false}", Encoding.UTF8, "application/json"); var response = await client.SendAsync(request);
Response · 200
{
"Id": "string",
"Name": "Example",
"Restrictions": {},
"HasAccessToFtp": false
}Deletes an existing admin role
Parameters
idstring · pathrequired
Admin role identification.
curl -X DELETE "https://your-site.webinone.com/api/v2/admin/admin-roles/1" \ -H "Authorization: Bearer <token>"
await fetch("https://your-site.webinone.com/api/v2/admin/admin-roles/1", { method: "DELETE", headers: { "Authorization": "Bearer <token>" } });
import requests requests.delete( "https://your-site.webinone.com/api/v2/admin/admin-roles/1", headers={"Authorization": "Bearer <token>"} )
$client = new GuzzleHttp\Client(); $response = $client->request('DELETE', 'https://your-site.webinone.com/api/v2/admin/admin-roles/1', [ 'headers' => [ 'Authorization' => 'Bearer <token>' ] ]);
using var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Delete, "https://your-site.webinone.com/api/v2/admin/admin-roles/1"); request.Headers.Add("Authorization", "Bearer <token>"); var response = await client.SendAsync(request);
Retrieves a admin roles default restrictions
Response
EntityAliasstring · nullable
Machine alias of the entity the restrictions apply to, such as a specific custom module or CRM group.
EntityTypestring · nullable
Kind of entity the restrictions target, for example a page, module or ecommerce section.
Namestring · nullable
Name of the admin role restriction.
Aliasstring · nullable
Machine-readable alias for the admin role restriction.
Restrictionsarray of objects
The individual permission toggles granted or denied for this entity.
Labelstring · nullable
Human-readable name of the permission shown in the admin panel, such as View, Create or Delete.
Aliasstring · nullable
Machine-readable alias for the restriction.
Valueboolean
Whether this permission is granted for the role.
curl "https://your-site.webinone.com/api/v2/admin/admin-roles/admin-roles-default-restrictions" \ -H "Authorization: Bearer <token>"
await fetch("https://your-site.webinone.com/api/v2/admin/admin-roles/admin-roles-default-restrictions", { method: "GET", headers: { "Authorization": "Bearer <token>" } });
import requests requests.get( "https://your-site.webinone.com/api/v2/admin/admin-roles/admin-roles-default-restrictions", headers={"Authorization": "Bearer <token>"} )
$client = new GuzzleHttp\Client(); $response = $client->request('GET', 'https://your-site.webinone.com/api/v2/admin/admin-roles/admin-roles-default-restrictions', [ 'headers' => [ 'Authorization' => 'Bearer <token>' ] ]);
using var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://your-site.webinone.com/api/v2/admin/admin-roles/admin-roles-default-restrictions"); request.Headers.Add("Authorization", "Bearer <token>"); var response = await client.SendAsync(request);
Response · 200
[
{
"EntityAlias": "string",
"EntityType": "string",
"Name": "Example",
"Alias": "string",
"Restrictions": [
{
"Label": "string",
"Alias": "string",
"Value": false
}
]
}
]