Epilot is the digital foundation for sales, service, network and implementation processes in the context of the energy transition. This SDK is for the Epilot Journey, Entity and Automation APIs. Please see the Epilot developer documentation for more information.
pip install epilotapiTo call epilot APIs, requests must be authorized using a valid Access Token.
The access token should be passed in the Authorization request header.
Authorization: Bearer <your-access-token>Users logged into the epilot 360 portal can manage their Access Tokens from Settings > Access Tokens.
Creating access tokens requires the token:create permission.
Access Token API Authenticated users can generate long-term access tokens for 3rd party applications using the epilot Access Token API createAccessToken operation.
POST /v1/access-tokens
{
"name": "Token for my application"
}Optionally, you can pass a list of Role IDs, to define the roles the access token will have access to. By default, the access token inherits the caller's roles.
POST /v1/access-tokens
{
"name": "Postman Access Token",
"assume_roles": ["123:owner"]
}Each Access Token generated via the API gets a generated a unique ID.
// 201 - success
{
"id": "api_5ZugdRXasLfWBypHi93Fk",
"created_at": "2019-08-24T14:15:22Z",
"name": "Postman Access Token",
"assignments": ["123:owner"]
}Access tokens may also be revoked using the revokeAccessToken operation
DELETE /v1/access-tokens/api_5ZugdRXasLfWBypHi93Fk
// 200 - success
{
"id": "api_5ZugdRXasLfWBypHi93Fk",
"created_at": "2019-08-24T14:15:22Z",
"name": "Postman Access Token",
"assignments": ["123:owner"]
}import epilotapi
from epilotapi.models import operations, shared
s = epilotapi.EpilotAPI()
s.config_security(
security=shared.Security(
epilot_auth=shared.SchemeEpilotAuth(
authorization="Bearer YOUR_BEARER_TOKEN_HERE",
),
)
)
req = operations.AttachActivityRequest(
path_params=operations.AttachActivityPathParams(
id="unde",
),
query_params=operations.AttachActivityQueryParams(
entities=[
"porro",
"nulla",
"id",
],
),
)
res = s.activity.attach_activity(req)
if res.activity_item is not None:
# handle responseattach_activity- attachActivitycreate_activity- createActivityget_activity- getActivityget_entity_activity_feed- getEntityActivityFeed
autocomplete- autocompletecreate_entity- createEntitydelete_entity- deleteEntityget_entity- getEntitysearch_entities- searchEntitiesupdate_entity- updateEntityupsert_entity- upsertEntity
export_entities- exportEntitiesimport_entities- importEntities
create_journey- createJourneyget_journey- getJourneyget_journeys_by_org_id- getJourneysByOrgIdpatch_update_journey- patchUpdateJourneyremove_journey- removeJourneysearch_journeys- searchJourneysupdate_journey- updateJourney
add_relations- addRelationsdelete_relation- deleteRelationget_relations- getRelationsupdate_relation- updateRelation
create_saved_view- createSavedViewdelete_saved_view- deleteSavedViewget_saved_view- getSavedViewlist_saved_views- listSavedViewsupdate_saved_view- updateSavedView
create_new_schema_version- createNewSchemaVersiondelete_schema_by_id- deleteSchemaByIdget_schema- getSchemaget_schema_versions- getSchemaVersionslist_schema_blueprints- listSchemaBlueprintslist_schemas- listSchemaslist_taxonomy_classifications_for_schema- listTaxonomyClassificationsForSchema
get_taxonomy- getTaxonomylist_taxonomies- listTaxonomiestaxonomies_classifications_search- taxonomiesClassificationsSearchtaxonomy_autocomplete- taxonomyAutocompleteupdate_classifications_for_taxonomy- updateClassificationsForTaxonomy
cancel_execution- cancelExecutionget_execution- getExecutionget_executions- getExecutionsretrigger_action- retriggerActionstart_execution- startExecution
create_flow- createFlowdelete_flow- deleteFlowget_flow- getFlowput_flow- putFlowsearch_flows- searchFlows