Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Role

Delete a role

Returns

Returns a resource object of type role.

Examples

1
DELETE https://site-api.datocms.com/roles/:role_id HTTP/1.1
2
Authorization: Bearer YOUR-API-TOKEN
3
Accept: application/json
4
X-Api-Version: 3
Terminal window
1
curl -g 'https://site-api.datocms.com/roles/:role_id' \
2
-X DELETE \
3
-H "Authorization: Bearer YOUR-API-TOKEN" \
4
-H "Accept: application/json" \
5
-H "X-Api-Version: 3"
1
await fetch("https://site-api.datocms.com/roles/:role_id", {
2
method: "DELETE",
3
headers: {
4
Authorization: "Bearer YOUR-API-TOKEN",
5
Accept: "application/json",
6
"X-Api-Version": "3",
7
},
8
});
1
HTTP/1.1 200 OK
2
Content-Type: application/json
3
Cache-Control: cache-control: max-age=0, private, must-revalidate
4
X-RateLimit-Limit: 30
5
X-RateLimit-Remaining: 28
6
7
{
8
"data": {
9
"type": "role",
10
"id": "34",
11
"attributes": {
12
"name": "Editor",
13
"can_edit_site": true,
14
"can_edit_favicon": true,
15
"can_edit_schema": true,
16
"can_manage_menu": true,
17
"can_manage_users": true,
18
"can_manage_shared_filters": true,
19
"can_manage_upload_collections": true,
20
"can_manage_environments": true,
21
"can_manage_webhooks": true,
22
"environments_access": "primary_only",
23
"can_manage_sso": true,
24
"can_access_audit_log": true,
25
"can_manage_workflows": true,
26
"can_edit_environment": true,
27
"can_promote_environments": true,
28
"can_manage_build_triggers": true,
29
"can_manage_access_tokens": true,
30
"can_perform_site_search": true,
31
"can_access_build_events_log": true,
32
"positive_item_type_permissions": [
33
{
34
"environment": "main",
35
"action": "all"
36
}
37
],
38
"negative_item_type_permissions": [
39
{
40
"environment": "main",
41
"action": "all"
42
}
43
],
44
"positive_upload_permissions": [
45
{
46
"action": "all",
47
"environment": "main"
48
}
49
],
50
"negative_upload_permissions": [
51
{
52
"action": "all",
53
"environment": "main"
54
}
55
],
56
"positive_build_trigger_permissions": [
57
{}
58
],
59
"negative_build_trigger_permissions": [
60
{}
61
]
62
},
63
"relationships": {
64
"inherits_permissions_from": {
65
"data": [
66
{
67
"type": "role",
68
"id": "34"
69
}
70
]
71
}
72
},
73
"meta": {
74
"final_permissions": {
75
"can_edit_site": true,
76
"can_edit_favicon": true,
77
"can_edit_schema": true,
78
"can_manage_menu": true,
79
"can_manage_users": true,
80
"can_manage_environments": true,
81
"can_manage_webhooks": true,
82
"environments_access": "primary_only",
83
"can_manage_sso": true,
84
"can_access_audit_log": true,
85
"can_manage_workflows": true,
86
"can_edit_environment": true,
87
"can_promote_environments": true,
88
"can_manage_shared_filters": true,
89
"can_manage_build_triggers": true,
90
"can_manage_upload_collections": true,
91
"can_manage_access_tokens": true,
92
"can_perform_site_search": true,
93
"can_access_build_events_log": true,
94
"positive_item_type_permissions": [
95
{
96
"environment": "main",
97
"action": "all"
98
}
99
],
100
"negative_item_type_permissions": [
101
{
102
"environment": "main",
103
"action": "all"
104
}
105
],
106
"positive_upload_permissions": [
107
{
108
"action": "all",
109
"environment": "main"
110
}
111
],
112
"negative_upload_permissions": [
113
{
114
"action": "all",
115
"environment": "main"
116
}
117
],
118
"positive_build_trigger_permissions": [
119
{}
120
],
121
"negative_build_trigger_permissions": [
122
{}
123
]
124
}
125
}
126
}
127
}