Appearance
Solutions API
All URIs are relative to https://api.syntheticusers.com/api/v1
| Method | HTTP request | Description |
|---|---|---|
| create_solution | POST /solutions | Create Solution |
| delete_solution | DELETE /solutions/ | Delete Solution |
| edit_solution | PATCH /solutions/ | Edit Solution |
| get_solution | GET /solutions/ | Get Solution |
| list_solutions | GET /solutions | List Solutions |
create_solution
Solution create_solution(solution_create)
Create Solution
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.solution import Solution
from syntheticusers.models.solution_create import SolutionCreate
from syntheticusers.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.syntheticusers.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = syntheticusers.Configuration(
host = "https://api.syntheticusers.com/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: HTTPBearer
configuration = syntheticusers.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with syntheticusers.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = syntheticusers.SolutionsApi(api_client)
solution_create = syntheticusers.SolutionCreate() # SolutionCreate |
try:
# Create Solution
api_response = api_instance.create_solution(solution_create)
print("The response of SolutionsApi->create_solution:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling SolutionsApi->create_solution: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| solution_create | SolutionCreate |
Return type
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]
delete_solution
object delete_solution(solution_id)
Delete Solution
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.syntheticusers.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = syntheticusers.Configuration(
host = "https://api.syntheticusers.com/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: HTTPBearer
configuration = syntheticusers.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with syntheticusers.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = syntheticusers.SolutionsApi(api_client)
solution_id = 'solution_id_example' # str |
try:
# Delete Solution
api_response = api_instance.delete_solution(solution_id)
print("The response of SolutionsApi->delete_solution:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling SolutionsApi->delete_solution: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| solution_id | str |
Return type
object
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]
edit_solution
Solution edit_solution(solution_id, solution_update)
Edit Solution
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.solution import Solution
from syntheticusers.models.solution_update import SolutionUpdate
from syntheticusers.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.syntheticusers.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = syntheticusers.Configuration(
host = "https://api.syntheticusers.com/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: HTTPBearer
configuration = syntheticusers.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with syntheticusers.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = syntheticusers.SolutionsApi(api_client)
solution_id = 'solution_id_example' # str |
solution_update = syntheticusers.SolutionUpdate() # SolutionUpdate |
try:
# Edit Solution
api_response = api_instance.edit_solution(solution_id, solution_update)
print("The response of SolutionsApi->edit_solution:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling SolutionsApi->edit_solution: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| solution_id | str | ||
| solution_update | SolutionUpdate |
Return type
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]
get_solution
Solution get_solution(solution_id)
Get Solution
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.solution import Solution
from syntheticusers.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.syntheticusers.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = syntheticusers.Configuration(
host = "https://api.syntheticusers.com/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: HTTPBearer
configuration = syntheticusers.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with syntheticusers.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = syntheticusers.SolutionsApi(api_client)
solution_id = 'solution_id_example' # str |
try:
# Get Solution
api_response = api_instance.get_solution(solution_id)
print("The response of SolutionsApi->get_solution:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling SolutionsApi->get_solution: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| solution_id | str |
Return type
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]
list_solutions
PageSolution list_solutions(page=page, size=size)
List Solutions
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.page_solution import PageSolution
from syntheticusers.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.syntheticusers.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = syntheticusers.Configuration(
host = "https://api.syntheticusers.com/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: HTTPBearer
configuration = syntheticusers.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with syntheticusers.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = syntheticusers.SolutionsApi(api_client)
page = 1 # int | Page number (optional) (default to 1)
size = 50 # int | Page size (optional) (default to 50)
try:
# List Solutions
api_response = api_instance.list_solutions(page=page, size=size)
print("The response of SolutionsApi->list_solutions:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling SolutionsApi->list_solutions: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| page | int | Page number | [optional] [default to 1] |
| size | int | Page size | [optional] [default to 50] |
Return type
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 | - |