Appearance
Plans API
All URIs are relative to https://api.syntheticusers.com/api/v1
| Method | HTTP request | Description |
|---|---|---|
| createPlan | POST /plans | Create Plan |
| deletePlan | DELETE /plans/ | Delete Plan |
| getPlan | GET /plans/ | Get Plan |
| listPlans | GET /plans | List Plans |
| updatePlan | PATCH /plans/ | Update Plan |
createPlan
Plan createPlan(planCreate)
Example
typescript
import { createConfiguration, PlansApi } from '';
import type { PlansApiCreatePlanRequest } from '';
const configuration = createConfiguration();
const apiInstance = new PlansApi(configuration);
const request: PlansApiCreatePlanRequest = {
planCreate: {
name: "name_example",
projectId: "projectId_example",
audience: "audience_example",
researchGoal: "researchGoal_example",
createdAt: new Date('1970-01-01T00:00:00.00Z'),
},
};
const data = await apiInstance.createPlan(request);
console.log('API called successfully. Returned data:', data);Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| planCreate | PlanCreate |
Return type
Plan
Authorization
HTTP request headers
- Content-Type: application/json
- 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]
deletePlan
any deletePlan()
Example
typescript
import { createConfiguration, PlansApi } from '';
import type { PlansApiDeletePlanRequest } from '';
const configuration = createConfiguration();
const apiInstance = new PlansApi(configuration);
const request: PlansApiDeletePlanRequest = {
planId: "plan_id_example",
};
const data = await apiInstance.deletePlan(request);
console.log('API called successfully. Returned data:', data);Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| planId | [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 | - |
[Back to top] [Back to API list] [Back to SDK]
getPlan
Plan getPlan()
Example
typescript
import { createConfiguration, PlansApi } from '';
import type { PlansApiGetPlanRequest } from '';
const configuration = createConfiguration();
const apiInstance = new PlansApi(configuration);
const request: PlansApiGetPlanRequest = {
planId: "plan_id_example",
};
const data = await apiInstance.getPlan(request);
console.log('API called successfully. Returned data:', data);Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| planId | [string] | defaults to undefined |
Return type
Plan
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]
listPlans
PagePlan listPlans()
Example
typescript
import { createConfiguration, PlansApi } from '';
import type { PlansApiListPlansRequest } from '';
const configuration = createConfiguration();
const apiInstance = new PlansApi(configuration);
const request: PlansApiListPlansRequest = {
// Comma-separated list of plans IDs (optional)
id: "id_example",
// Comma-separated list of project IDs (optional)
projectId: "projectId_example",
// Page number (optional)
page: 1,
// Page size (optional)
size: 50,
};
const data = await apiInstance.listPlans(request);
console.log('API called successfully. Returned data:', data);Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | [string] | Comma-separated list of plans IDs | (optional) defaults to undefined |
| projectId | [string] | Comma-separated list of project IDs | (optional) defaults to undefined |
| page | [number] | Page number | (optional) defaults to 1 |
| size | [number] | Page size | (optional) defaults to 50 |
Return type
PagePlan
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]
updatePlan
Plan updatePlan(planUpdate)
Example
typescript
import { createConfiguration, PlansApi } from '';
import type { PlansApiUpdatePlanRequest } from '';
const configuration = createConfiguration();
const apiInstance = new PlansApi(configuration);
const request: PlansApiUpdatePlanRequest = {
planId: "plan_id_example",
planUpdate: {
name: "name_example",
audience: "audience_example",
researchGoal: "researchGoal_example",
createdAt: new Date('1970-01-01T00:00:00.00Z'),
graphData: {
"key": null,
},
},
};
const data = await apiInstance.updatePlan(request);
console.log('API called successfully. Returned data:', data);Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| planUpdate | PlanUpdate | ||
| planId | [string] | defaults to undefined |
Return type
Plan
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |