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.
implementation 'dev.epilot.sdk:epilot-sdk-java:1.5.2'
To 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"]
}
package hello.world;
import dev.epilot.sdk.EpilotAPI;
import dev.epilot.sdk.models.shared.Security;
public class Application {
public static void main(String[] args) {
try {
EpilotAPI.Builder builder = EpilotAPI.builder();
builder.setSecurity(
new Security() {{
epilotAuth = new SchemeEpilotAuth() {{
authorization = "Bearer YOUR_BEARER_TOKEN_HERE";
}};
}}
);
EpilotAPI sdk = builder.build();
AttachActivityRequest req = new AttachActivityRequest() {{
pathParams = new AttachActivityPathParams() {{
id = "unde";
}};
queryParams = new AttachActivityQueryParams() {{
entities = new String[]{{
add("porro"),
add("nulla"),
add("id"),
}};
}};
}};
AttachActivityResponse res = sdk.activity.attachActivity(req);
if (res.activityItem.isPresent()) {
// handle response
}
} catch (Exception e) {
// handle exception
}
attachActivity
- attachActivitycreateActivity
- createActivitygetActivity
- getActivitygetEntityActivityFeed
- getEntityActivityFeed
autocomplete
- autocompletecreateEntity
- createEntitydeleteEntity
- deleteEntitygetEntity
- getEntitysearchEntities
- searchEntitiesupdateEntity
- updateEntityupsertEntity
- upsertEntity
exportEntities
- exportEntitiesimportEntities
- importEntities
createJourney
- createJourneygetJourney
- getJourneygetJourneysByOrgId
- getJourneysByOrgIdpatchUpdateJourney
- patchUpdateJourneyremoveJourney
- removeJourneysearchJourneys
- searchJourneysupdateJourney
- updateJourney
addRelations
- addRelationsdeleteRelation
- deleteRelationgetRelations
- getRelationsupdateRelation
- updateRelation
createSavedView
- createSavedViewdeleteSavedView
- deleteSavedViewgetSavedView
- getSavedViewlistSavedViews
- listSavedViewsupdateSavedView
- updateSavedView
createNewSchemaVersion
- createNewSchemaVersiondeleteSchemaById
- deleteSchemaByIdgetSchema
- getSchemagetSchemaVersions
- getSchemaVersionslistSchemaBlueprints
- listSchemaBlueprintslistSchemas
- listSchemaslistTaxonomyClassificationsForSchema
- listTaxonomyClassificationsForSchema
getTaxonomy
- getTaxonomylistTaxonomies
- listTaxonomiestaxonomiesClassificationsSearch
- taxonomiesClassificationsSearchtaxonomyAutocomplete
- taxonomyAutocompleteupdateClassificationsForTaxonomy
- updateClassificationsForTaxonomy
cancelExecution
- cancelExecutiongetExecution
- getExecutiongetExecutions
- getExecutionsretriggerAction
- retriggerActionstartExecution
- startExecution
createFlow
- createFlowdeleteFlow
- deleteFlowgetFlow
- getFlowputFlow
- putFlowsearchFlows
- searchFlows