Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Orion/Server API/User API"

m
(Creating users)
Line 3: Line 3:
 
== Actions on users ==
 
== Actions on users ==
  
=== Creating users ===
+
=== Create a user ===
  
 
{{Orion/ServerAPI
 
{{Orion/ServerAPI
| overview = Overview
 
 
| method = POST
 
| method = POST
 +
| overview = To create a new user account, send a POST request with the UserName and Password.
 
| reqhead = /users HTTP/1.1
 
| reqhead = /users HTTP/1.1
 
  Orion-Version: 1.0
 
  Orion-Version: 1.0
 
  Content-Type: application/json
 
  Content-Type: application/json
 
| reqbody = {
 
| reqbody = {
   "Login" : "Login",
+
   "UserName" : "newuser",
   "Password" : "Password"
+
   "Password" : "newPassw0rd"
 +
  "FullName": "New User",
 
  }
 
  }
| resphead = 201 OK
+
| resphead = 201 CREATED
| respbody = {
+
Content-Type: application/json
   "Login" : "Login"
+
| respbody =  
 +
{
 +
   "EmailConfirmed": false,
 +
  "FullName": "New User",
 +
  "HasPassword": true,
 +
  "Location": "/users/newuser",
 +
  "UserName": "newuser"
 
  }
 
  }
| explain = TBD.
+
| explain = 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.
 
}}
 
}}
  

Revision as of 19:26, 19 November 2014

The User API is a web server API for browsing and manipulating users.

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.


Getting a user

Updating a user

Deleting a user

Listing users

Actions on user roles

JSON representations

User

Back to the top