Real API Example Resources
| Resource | Endpoint | Description |
|---|---|---|
| User | Get Users | Gets a list of all users. |
| User | Update user | Updates the user’s information. |
| User | Get user | Get user’s information. |
| User | Acting as User | Start acting as an other user. |
User
Get Users
GET
https://api.example.org/v1/usersGets a list of all users.
Response Body
| Field | Type | Description |
|---|---|---|
| data | Array[] | No description |
| id | Integer | No description |
| username | String | No description |
| slug | String | No description |
| String | No description | |
| overlay_token | String | No description |
| avatar | String | No description |
| acting_as | Object | No description |
| id | Integer | No description |
| username | String | No description |
| slug | String | No description |
| String | No description | |
| overlay_token | String | No description |
| avatar | String | No description |
| scopes | String[] | No description |
| created_at | Datetime | No description |
| scopes | String[] | No description |
| created_at | Datetime | No description |
Example response
{
"data": [
{
"id": 42,
"username": "hello world",
"slug": "hello world",
"email": "hello world",
"overlay_token": "hello world",
"avatar": "hello world",
"acting_as": {
"id": 42,
"username": "hello world",
"slug": "hello world",
"email": "hello world",
"overlay_token": "hello world",
"avatar": "hello world",
"scopes": [
"hello world"
],
"created_at": "2022-01-01T00:00:00Z"
},
"scopes": [
"hello world"
],
"created_at": "2022-01-01T00:00:00Z"
}
]
}
Update user
PATCH
https://api.example.org/v1/users/{user}Updates the user’s information.
Response Body
| Field | Type | Description |
|---|---|---|
| id | Integer | No description |
| username | String | No description |
| slug | String | No description |
| String | No description | |
| overlay_token | String | No description |
| acting_as | Object | No description |
| id | Integer | No description |
| username | String | No description |
| slug | String | No description |
| String | No description | |
| overlay_token | String | No description |
| avatar | String | No description |
| scopes | String[] | No description |
| created_at | Datetime | No description |
| scopes | String[] | No description |
| created_at | Datetime | No description |
Example response
{
"id": 42,
"username": "hello world",
"slug": "hello world",
"email": "hello world",
"overlay_token": "hello world",
"acting_as": {
"id": 42,
"username": "hello world",
"slug": "hello world",
"email": "hello world",
"overlay_token": "hello world",
"avatar": "hello world",
"scopes": [
"hello world"
],
"created_at": "2022-01-01T00:00:00Z"
},
"scopes": [
"hello world"
],
"created_at": "2022-01-01T00:00:00Z"
}
Get user
GET
https://api.example.org/v1/users/{user}Get user’s information.
Response Body
| Field | Type | Description |
|---|---|---|
| id | Integer | No description |
| username | String | No description |
| slug | String | No description |
| String | No description | |
| overlay_token | String | No description |
| avatar | String | No description |
| acting_as | Object | No description |
| id | Integer | No description |
| username | String | No description |
| slug | String | No description |
| String | No description | |
| overlay_token | String | No description |
| avatar | String | No description |
| scopes | String[] | No description |
| created_at | Datetime | No description |
| scopes | String[] | No description |
| created_at | Datetime | No description |
Example response
{
"id": 42,
"username": "hello world",
"slug": "hello world",
"email": "hello world",
"overlay_token": "hello world",
"avatar": "hello world",
"acting_as": {
"id": 42,
"username": "hello world",
"slug": "hello world",
"email": "hello world",
"overlay_token": "hello world",
"avatar": "hello world",
"scopes": [
"hello world"
],
"created_at": "2022-01-01T00:00:00Z"
},
"scopes": [
"hello world"
],
"created_at": "2022-01-01T00:00:00Z"
}
Acting as User
POST
https://api.example.org/v1/user/acting-as/Start acting as an other user.
Request Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| user_id | Integer | Yes | User ID of the other user. |
Response Body
| Field | Type | Description |
|---|---|---|
| id | Integer | No description |
| username | String | No description |
| slug | String | No description |
| String | No description | |
| overlay_token | String | No description |
| avatar | String | No description |
| scopes | String[] | No description |
| created_at | Datetime | No description |
Example response
{
"id": 42,
"username": "hello world",
"slug": "hello world",
"email": "hello world",
"overlay_token": "hello world",
"avatar": "hello world",
"scopes": [
"hello world"
],
"created_at": "2022-01-01T00:00:00Z"
}