Relatics Client API Reference
Overview of the RelaticsClient class and associated custom exceptions for interacting with the Relatics DataExchange API.
Client
relatics_toolkit.RelaticsClient(client_id, client_secret, environment)
Client for making OAuth2 get requests to relatics.
Client for making requests to relatics webservices. Will automatically request a token and subsequently do a get request to a webservice.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client_id
|
str
|
the OAUTH client id obtained from the Relatics environment studio. |
required |
client_secret
|
str
|
the OAUTH client secret obtained from the Relatics environment studio. |
required |
environment
|
str
|
The subdomain of relaticonline. in https://example.relaticsonline.com, example is the environment string. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
RelaticsClient |
RelaticsClient
|
Class capable of doing get requests to webservices in the specified environment. |
Source code in src/relatics_toolkit/ingestion/relatics_client.py
31 32 33 34 | |
get_request(workspace_id, operation, parameters={})
Executes a GET request to the Relatics DataExchange API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace_id
|
str
|
Workspace identifier |
required |
operation
|
str
|
API operation name |
required |
parameters
|
Dict[str, str]
|
Query parameters |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Element
|
Parsed XML root element |
Source code in src/relatics_toolkit/ingestion/relatics_client.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
Exceptions
relatics_toolkit.ingestion.relatics_client.TokenRequestError
Bases: Exception
Raised when token retrieval fails.
Source code in src/relatics_toolkit/ingestion/relatics_client.py
8 9 | |
relatics_toolkit.ingestion.relatics_client.APIRequestError
Bases: Exception
Raised when the API call fails.
Source code in src/relatics_toolkit/ingestion/relatics_client.py
11 12 | |
relatics_toolkit.ingestion.relatics_client.XMLParseError
Bases: Exception
Raised when XML parsing fails.
Source code in src/relatics_toolkit/ingestion/relatics_client.py
14 15 | |