User
GET /v3/user
Get user list
Acl Action: USER list
Arguments:
page
- integer: Page number for paginated results.per_page
- int: Per page offset for pagination.order
- string: Valid property to order by. Will default toname
.dir
- string: Eitherasc
ordesc
.
Example Response:
{
"items": [
{
"id": "2",
"uuid": "AAAA-1234",
"name": "A test",
"slug": "a_test",
"email": "atest@statenews.com",
"is_snworks": "0",
"srn": "srn:tsn:ceo-core\/user:AAAA-1234",
"roles": [
{
"name": "Administrator",
"description": "Super-admin"
}
]
},
{
"id": "5",
"uuid": "BBBB-1234",
"name": "Another Tester",
"slug": "another_tester",
"email": "anothertester@statenews.com",
"is_snworks": "0",
"srn": "srn:tsn:ceo-core\/user:BBBB-1234",
"roles": [
{
"name": "Administrator",
"description": "Super-admin"
}
]
}
],
"first": 1,
"before": 1,
"current": 1,
"last": 1,
"next": 1,
"total_pages": 1,
"total_items": 2,
"limit": 50
}
GET /v3/user/{uuid}
Get a single user by UUID
Acl Action: USER get
Example Response:
[
{
"id": "2",
"uuid": "AAAA-1234",
"name": "A test",
"slug": "a_test",
"email": "atest@statenews.com",
"is_snworks": "0",
"srn": "srn:tsn:ceo-core\/user:AAAA-1234",
"roles": [
{
"name": "Administrator",
"description": "Super-admin"
}
]
}
]
POST /v3/user
Create a new user. In addition to the user properties, POST accepts two flags:
email_updated_password
- set to1
to generate a new password email for the user.create_as_author
- set to1
to also create an author with the same information as the new user.
Acl Action: USER create
Example Request:
{
'name': 'user name',
'slug': 'user-name',
'email': 'test@example.com',
'password': 'myawesomepassword',
'roles': ['Role1', 'Role2'],
'email_updated_password': 1
'create_as_author': 1
}
Example Response:
See GET /v3/user/{uuid}
PUT /v3/user/{uuid}
Update existing user. This also accepts email_updated_password
but does not accept create_as_author
.
Acl Action: USER update
Example Request:
See POST /v3/user
Example Response:
See POST /v3/user
DELETE /v3/user/{uuid}[,{uuid}]
Delete one or more users
Acl Action: USER delete
Example Response:
{
"message": "ok"
}