Appearance
Users API
All URIs are relative to https://api.syntheticusers.com/api/v1
| Method | HTTP request | Description |
|---|---|---|
| getUser | GET /users/ | Get User |
| listUsers | GET /users | List Users |
getUser
User getUser()
Example
typescript
import { createConfiguration, UsersApi } from '';
import type { UsersApiGetUserRequest } from '';
const configuration = createConfiguration();
const apiInstance = new UsersApi(configuration);
const request: UsersApiGetUserRequest = {
userId: "user_id_example",
id: "id_example",
email: "email_example",
emailValidated: true,
createdAt: new Date('1970-01-01T00:00:00.00Z'),
generatedCounter: 1,
};
const data = await apiInstance.getUser(request);
console.log('API called successfully. Returned data:', data);Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| userId | [string] | defaults to undefined | |
| id | [string] | defaults to undefined | |
| [string] | defaults to undefined | ||
| emailValidated | [boolean] | defaults to undefined | |
| createdAt | [Date] | defaults to undefined | |
| generatedCounter | [number] | defaults to undefined |
Return type
User
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to SDK]
listUsers
PageUser listUsers()
Example
typescript
import { createConfiguration, UsersApi } from '';
import type { UsersApiListUsersRequest } from '';
const configuration = createConfiguration();
const apiInstance = new UsersApi(configuration);
const request: UsersApiListUsersRequest = {
// Comma-separated list of user IDs (optional)
id: "id_example",
// Comma-separated list of workspace IDs (optional)
workspaceId: "workspaceId_example",
// Page number (optional)
page: 1,
// Page size (optional)
size: 50,
};
const data = await apiInstance.listUsers(request);
console.log('API called successfully. Returned data:', data);Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | [string] | Comma-separated list of user IDs | (optional) defaults to undefined |
| workspaceId | [string] | Comma-separated list of workspace IDs | (optional) defaults to undefined |
| page | [number] | Page number | (optional) defaults to 1 |
| size | [number] | Page size | (optional) defaults to 50 |
Return type
PageUser
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |