d-pac
Base URI
http://tool.d-pac.be/api
email
string
required
A valid, activated e-mail address
Example:
john.doe@example.com
password
string
required
Example:
Foo15^
password_confirm
string
required
Example:
Foo15^
Request-UUID
string
optional
Applied to all operations
Pass a unique id for each request for easier tracking of requests logs on the back-end
POST
/user/session
Creates a session, i.e. authenticates the user.
Request parameters
Request headers
Responses
200
OK
Body
Examples
POST http://tool.d-pac.be/api/user/session?email=john.doe@example.com&password=Foo15^&password_confirm=Foo15^ HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "53a984cca87b4b7d57a99858",
"email": "john.doe@example.com",
"name": {
"first": "John",
"last": "Doe"
}
}
POST http://tool.d-pac.be/api/user/session HTTP/1.1
Content-Type: application/json
{
"email": "john.doe@example.com",
"password": "Foo15^"
"password_confirm": "Foo15^"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "53a984cca87b4b7d57a99858",
"email": "john.doe@example.com",
"name": {
"first": "John",
"last": "Doe"
}
}
GET
/user/session
Retrieves the authentication status
Request headers
Responses
200
OK
Body
Access and modify account details
GET
/users
GET
/users/
{id}
PATCH
/users/
{id}
GET
/user
PATCH
/user
GET
/users
Request headers
Responses
200
OK
Body
GET
/users/
{id}
Path variables
id
string
optional
Request headers
Responses
200
OK
Body
PATCH
/users/
{id}
Allows updating all account details of the logged in user
Path variables
id
string
optional
Request parameters
Request headers
Responses
200
OK
Body
GET
/user
Request headers
Responses
200
OK
Body
PATCH
/user
Allows updating all account details of the logged in user
Request parameters
Request headers
Responses
200
OK
Body
Object
id
string
Example:
53a984cca87b4b7d57a99858
email
string
Example:
john.doe@example.com
name
Object
first
string
Example:
John
last
string
Example:
Doe
HTTP Status Error
Object
code
number
Example:
422
status
number
Example:
422
name
string
Example:
Http422Error
message
string
Example:
Validation failed
explanation
Array
of
string
Example:
Passwords must match
Responses:
Bad Request
Unauthorized
Object
user
Object
data_container