Skip to content

Instantly share code, notes, and snippets.

@glye
Created September 28, 2015 13:21
Show Gist options
  • Save glye/e2d435814d90d9d7cd1f to your computer and use it in GitHub Desktop.
Save glye/e2d435814d90d9d7cd1f to your computer and use it in GitHub Desktop.
eZ\Publish\Core\REST\Server\Controller\Role::assignRoleToUser() REST content
"RoleAssignInput":{
"Role":{
"xhr":{},
"body":"{
"Role": {
"_media-type": "application/vnd.ez.api.Role+json",
"_href": "/api/ezp/v2/user/roles/6",
"identifier": "Subscriber",
"Policies": {
"_media-type": "application/vnd.ez.api.PolicyList+json",
"_href": "/api/ezp/v2/user/roles/6/policies"
}
}
}",
"document":{
"Role":{
"_media-type":"application/vnd.ez.api.Role+json",
"_href":"/api/ezp/v2/user/roles/6",
"identifier":"Subscriber",
"Policies":{
"_media-type":"application/vnd.ez.api.PolicyList+json",
"_href":"/api/ezp/v2/user/roles/6/policies"
}
}
},
"status":200,
"headers":"Date: Mon, 28 Sep 2015 12:33:18 GMT
Server: Apache/2.4.10 (Debian)
Cache-Control: no-cache
Accept-Patch: application/vnd.ez.api.RoleInput+json
X-Cache-Debug: 1
Vary: Cookie,Authorization
X-Debug-Token: fe2991
X-Debug-Token-Link: /_profiler/fe2991
Content-Length: 336
Keep-Alive: timeout=5, max=95
Connection: Keep-Alive
Content-Type: application/vnd.ez.api.Role+json"
},
"limitation":{}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment