Appearance
Projects API
All URIs are relative to https://api.syntheticusers.com/api/v1
| Method | HTTP request | Description |
|---|---|---|
| getProject | GET /projects/ | Get Project |
| listProjects | GET /projects | List Projects |
| streamEvents | GET /projects/{project_id}/stream | Stream Events |
getProject
Project getProject()
This method fetches and returns a list of all workspaces where the user is active. The list that is returned also includes all the data included in the workspaces. Returns: - List[WorkspaceSchema]: A list of all workspaces and its data where the user is active.
Example
typescript
import { createConfiguration, ProjectsApi } from '';
import type { ProjectsApiGetProjectRequest } from '';
const configuration = createConfiguration();
const apiInstance = new ProjectsApi(configuration);
const request: ProjectsApiGetProjectRequest = {
projectId: "project_id_example",
};
const data = await apiInstance.getProject(request);
console.log('API called successfully. Returned data:', data);Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | [string] | defaults to undefined |
Return type
Project
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]
listProjects
PageProject listProjects()
This method fetches and returns a list of all workspaces where the user is active. The list that is returned also includes all the data included in the workspaces. Returns: - List[WorkspaceSchema]: A list of all workspaces and its data where the user is active.
Example
typescript
import { createConfiguration, ProjectsApi } from '';
import type { ProjectsApiListProjectsRequest } from '';
const configuration = createConfiguration();
const apiInstance = new ProjectsApi(configuration);
const request: ProjectsApiListProjectsRequest = {
// Page number (optional)
page: 1,
// Page size (optional)
size: 50,
};
const data = await apiInstance.listProjects(request);
console.log('API called successfully. Returned data:', data);Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| page | [number] | Page number | (optional) defaults to 1 |
| size | [number] | Page size | (optional) defaults to 50 |
Return type
PageProject
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]
streamEvents
any streamEvents()
SSE endpoint for streaming model events.
Example
typescript
import { createConfiguration, ProjectsApi } from '';
import type { ProjectsApiStreamEventsRequest } from '';
const configuration = createConfiguration();
const apiInstance = new ProjectsApi(configuration);
const request: ProjectsApiStreamEventsRequest = {
projectId: "project_id_example",
};
const data = await apiInstance.streamEvents(request);
console.log('API called successfully. Returned data:', data);Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | [string] | defaults to undefined |
Return type
any
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 | - |