Appearance
Knowledge Graphs API
All URIs are relative to https://api.syntheticusers.com/api/v1
| Method | HTTP request | Description |
|---|---|---|
| get_knowledge_graph | GET /knowledgeGraphs/ | Get Knowledge Graph |
| list_knowledge_graphs | GET /knowledgeGraphs | List Knowledge Graphs |
get_knowledge_graph
KnowledgeGraph get_knowledge_graph(knowledge_graph_id)
Get Knowledge Graph
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.knowledge_graph import KnowledgeGraph
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.KnowledgeGraphsApi(api_client)
knowledge_graph_id = 'knowledge_graph_id_example' # str |
try:
# Get Knowledge Graph
api_response = api_instance.get_knowledge_graph(knowledge_graph_id)
print("The response of KnowledgeGraphsApi->get_knowledge_graph:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling KnowledgeGraphsApi->get_knowledge_graph: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| knowledge_graph_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_knowledge_graphs
PageKnowledgeGraph list_knowledge_graphs(id=id, project_id=project_id, study_id=study_id, status=status, page=page, size=size)
List Knowledge Graphs
Example
- Bearer Authentication (HTTPBearer):
python
import syntheticusers
from syntheticusers.models.page_knowledge_graph import PageKnowledgeGraph
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.KnowledgeGraphsApi(api_client)
id = 'id_example' # str | Comma-separated list of studies IDs (optional)
project_id = 'project_id_example' # str | Comma-separated list of project IDs (optional)
study_id = 'study_id_example' # str | Comma-separated list of audiences IDs (optional)
status = 'status_example' # str | Status to filter by (optional)
page = 1 # int | Page number (optional) (default to 1)
size = 50 # int | Page size (optional) (default to 50)
try:
# List Knowledge Graphs
api_response = api_instance.list_knowledge_graphs(id=id, project_id=project_id, study_id=study_id, status=status, page=page, size=size)
print("The response of KnowledgeGraphsApi->list_knowledge_graphs:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling KnowledgeGraphsApi->list_knowledge_graphs: %s\n" % e)Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Comma-separated list of studies IDs | [optional] |
| project_id | str | Comma-separated list of project IDs | [optional] |
| study_id | str | Comma-separated list of audiences IDs | [optional] |
| status | str | Status to filter by | [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 | - |