dev-master
9999999-dev
MIT
The Requires
by Jack Robertson
This package provides the core backend functionality for managing the users who can access the CMS., (*1)
This package can be installed through Composer., (*2)
composer require optimuscms/users
In Laravel 5.5 and above the package will autoregister the service provider., (*3)
In Laravel 5.4 you must install this service provider:, (*4)
// config/app.php 'providers' => [ ... Optimus\Users\UserServiceProvider::class, ... ];
The API follows standard RESTful conventions, with responses being returned in JSON. Appropriate HTTP status codes are provided, and these should be used to check the outcome of an operation., (*5)
Users, (*6)
List all registered users., (*7)
GET /admin/api/users
Request Body, (*8)
None, (*9)
Example Response, (*10)
{ "data": [ { "id": 1, "name": "Jack Robertson", "email": "jack@optixsolutions.co.uk", "username": "jack", "created_at": "2019-02-19 09:14:44", "updated_at": "2019-02-19 09:14:50" }, { "id": 2, "name": "Rich Moore", "email": "rich@optixsolutions.co.uk", "username": "rich", "created_at": "2019-02-19 09:36:23", "updated_at": "2019-02-19 09:36:23" } ] }
Create a new users who can access the CMS., (*11)
POST /admin/api/users
Request Body, (*12)
Parameter | Required | Type | Description |
---|---|---|---|
name |
Yes | string |
The name of the user |
email |
Yes | string |
The email address of the user |
username |
Yes | string |
A username which will be used to login to the CMS |
password |
Yes | string |
A password which will be used to login to the CMS |
Example Response, (*13)
Returns the details of the newly created user. See single user response example., (*14)
Get the details of a specific user., (*15)
GET /admin/api/users/{id}
Request Body, (*16)
None, (*17)
Example Response, (*18)
{ "data": { "id": 1, "name": "Jack Robertson", "email": "jack@optixsolutions.co.uk", "username": "jack", "created_at": "2019-02-19 09:14:44", "updated_at": "2019-02-19 09:14:50" } }
Update the details of a specific user., (*19)
PATCH /admin/api/users/{id}
Request Body, (*20)
Parameter | Required | Type | Description |
---|---|---|---|
name |
Yes | string |
The name of the user |
email |
Yes | string |
The email address of the user |
username |
Yes | string |
A username which will be used to login to the CMS |
password |
No | string |
A password which will be used to login to the CMS |
Example Response, (*21)
Returns the details of the updated user. See single user response example., (*22)
Delete a user so they can no longer access the CMS., (*23)
DELETE /admin/api/users/{id}
Request Body, (*24)
None, (*25)
Example Response, (*26)
The HTTP status code will be 204
if successful., (*27)
The MIT License (MIT). Please see License File for more information., (*28)
MIT