Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Orion/Server API/User API"
< Orion | Server API
(→Getting a user) |
(→Deleting a user) |
||
Line 51: | Line 51: | ||
=== Updating a user === | === Updating a user === | ||
− | === | + | === Delete a user === |
+ | |||
+ | {{Orion/ServerAPI | ||
+ | | method = DELETE | ||
+ | | overview = To delete a user account profile, send a DELETE request. | ||
+ | | reqhead = /users/newuser HTTP/1.1 | ||
+ | Orion-Version: 1.0 | ||
+ | | resphead = 200 OK | ||
+ | | explain = The request needs to be authenticated as newuser or an admin user. | ||
+ | }} | ||
=== Listing users === | === Listing users === |
Revision as of 19:32, 19 November 2014
The User API is a web server API for browsing and manipulating users.
Contents
Actions on users
Create a user
- Overview
- To create a new user account, send a POST request with the UserName and Password.
- HTTP Method
- POST
- Example Request
POST /users HTTP/1.1
Orion-Version: 1.0
Content-Type: application/json
{
"UserName" : "newuser",
"Password" : "newPassw0rd"
"FullName": "New User",
}
- Example Response
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"EmailConfirmed": false,
"FullName": "New User",
"HasPassword": true,
"Location": "/users/newuser",
"UserName": "newuser"
}
- Detailed Explanation
- FullName and Email are optional fields that can be added to the request. The request does not need to be authenticated unless the server specifies the orion.auth.user.creation preference to allow only the admin user to create accounts.
Read a user
- Overview
- To read a user account profile, send a GET request.
- HTTP Method
- GET
- Example Request
GET /users/newuser HTTP/1.1
Orion-Version: 1.0
- Example Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"EmailConfirmed": false,
"FullName": "New User",
"HasPassword": true,
"Location": "/users/newuser",
"UserName": "newuser"
}
- Detailed Explanation
- The request needs to be authenticated as newuser or an admin user.
Updating a user
Delete a user
- Overview
- To delete a user account profile, send a DELETE request.
- HTTP Method
- DELETE
- Example Request
DELETE /users/newuser HTTP/1.1
Orion-Version: 1.0
- Example Response
HTTP/1.1 200 OK
- Detailed Explanation
- The request needs to be authenticated as newuser or an admin user.