Appearance
Problems API
All URIs are relative to https://api.syntheticusers.com/api/v1
| Method | HTTP request | Description |
|---|---|---|
| create_problem | POST /problems | Create Problem |
| delete_problem | DELETE /problems/ | Delete Problem |
| edit_problem | PATCH /problems/ | Edit Problem |
| get_problem | GET /problems/ | Get Problem |
| list_problems | GET /problems | List Problems |
create_problem
Problem create_problem(problem_create)
Create Problem
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.problem import Problem
from syntheticusers.models.problem_create import ProblemCreate
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.ProblemsApi(api_client)
problem_create = syntheticusers.ProblemCreate() # ProblemCreate |
try:
# Create Problem
api_response = api_instance.create_problem(problem_create)
print("The response of ProblemsApi->create_problem:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProblemsApi->create_problem: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| problem_create | ProblemCreate |
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_problem
object delete_problem(problem_id)
Delete Problem
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.ProblemsApi(api_client)
problem_id = 'problem_id_example' # str |
try:
# Delete Problem
api_response = api_instance.delete_problem(problem_id)
print("The response of ProblemsApi->delete_problem:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProblemsApi->delete_problem: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| problem_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_problem
Problem edit_problem(problem_id, problem_update)
Edit Problem
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.problem import Problem
from syntheticusers.models.problem_update import ProblemUpdate
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.ProblemsApi(api_client)
problem_id = 'problem_id_example' # str |
problem_update = syntheticusers.ProblemUpdate() # ProblemUpdate |
try:
# Edit Problem
api_response = api_instance.edit_problem(problem_id, problem_update)
print("The response of ProblemsApi->edit_problem:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProblemsApi->edit_problem: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| problem_id | str | ||
| problem_update | ProblemUpdate |
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_problem
Problem get_problem(problem_id)
Get Problem
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.problem import Problem
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.ProblemsApi(api_client)
problem_id = 'problem_id_example' # str |
try:
# Get Problem
api_response = api_instance.get_problem(problem_id)
print("The response of ProblemsApi->get_problem:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProblemsApi->get_problem: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| problem_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_problems
PageProblem list_problems(id=id, page=page, size=size)
List Problems
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.page_problem import PageProblem
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.ProblemsApi(api_client)
id = 'id_example' # str | Comma-separated list of problem IDs (optional)
page = 1 # int | Page number (optional) (default to 1)
size = 50 # int | Page size (optional) (default to 50)
try:
# List Problems
api_response = api_instance.list_problems(id=id, page=page, size=size)
print("The response of ProblemsApi->list_problems:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProblemsApi->list_problems: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Comma-separated list of problem IDs | [optional] |
| 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 | - |