/user
Some user methods are located beneath the Org endpoint. Others are under /users
Get current user
GET https://pm415.com/api/user
Gets info about the current user.
Headers
Authentication
string
Authorization: Bearer 50ca9ba0f7b1444fa55d5
{
"success": true,
"user": {
"id": 4,
"email": "mattreider@tmnail.com",
"firstName": "Matthew",
"lastName": "Reider",
"organizations": [
{
"id": 16,
"name": "Bar",
"roles": [
{
"id": 1,
"role": "Admin"
}
]
}
]
},
"organization": {
"id": 16,
"name": "Bar",
"roles": [
{
"id": 1,
"role": "Admin"
}
]
}
}Get API key
GET https://pm415.com/api/user/apikey
Gets the current user's API key.
Headers
Authentication
string
Authorization: Bearer 50ca9ba0f7b1444fa55d5
{
"success": true,
"apikey": "jfihf09dsf9fdnsdf"
}Create new API key
POST https://pm415.com/api/user/apikey
Creates a new API key for the current user.
Headers
Authentication
string
Authorization: Bearer 50ca9ba0f7b1444fa55d5
{
"success": true,
"apikey": "jfihf09dsf9fdnsdf"
}Update current user
PUT https://pm415.com/api/user
Updates the current user.
Headers
Authentication
string
Authorization: Bearer 50ca9ba0f7b1444fa55d5
Request Body
object
{"email" : "matt@matt.com", "password": "1111", "confirmation": "1111", "firstName": "Matt", "lastName": "Reider" }
{
"success": true,
"user": {
"id": 4,
"email": "mattreider@tmnail.com",
"firstName": "Matthew",
"lastName": "Reider",
"organizations": [
{
"id": 16,
"name": "Bar",
"roles": [
{
"id": 1,
"role": "Admin"
}
]
}
]
},
"organization": {
"id": 16,
"name": "Bar",
"roles": [
{
"id": 1,
"role": "Admin"
}
]
}
}Get orgs
GET https://pm415.com/api/user/orgs
Gets the orgs that current user has access to.
Headers
Authentication
string
Authorization: Bearer 50ca9ba0f7b1444fa55d5
{
"success": true,
"organizations": [
{
"orgId": 16,
"name": "Bar",
"role": "Admin"
}
]
}Last updated
Was this helpful?