https://github.com/epilot-dev/sdk-java
Java SDK for Epilot APIs
https://github.com/epilot-dev/sdk-java
ecommerce energy energy-platform energy-transition epilot java sdk
Last synced: about 1 year ago
JSON representation
Java SDK for Epilot APIs
- Host: GitHub
- URL: https://github.com/epilot-dev/sdk-java
- Owner: epilot-dev
- License: apache-2.0
- Created: 2023-02-06T15:42:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-28T17:59:04.000Z (over 3 years ago)
- Last Synced: 2025-03-14T14:46:05.610Z (about 1 year ago)
- Topics: ecommerce, energy, energy-platform, energy-transition, epilot, java, sdk
- Language: Java
- Homepage: https://docs.epilot.io/docs/intro
- Size: 516 KB
- Stars: 2
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Epilot Java SDK
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.
## SDK Installation
### Gradle
```groovy
implementation 'dev.epilot.sdk:epilot-sdk-java:1.5.2'
```
## Authentication
To call epilot APIs, requests must be authorized using a valid Access Token.
### Using Access Token Authorization
The access token should be passed in the Authorization request header.
```bash
Authorization: Bearer
```
### Creating Access Tokens
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.
```bash
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.
```bash
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.
```bash
// 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
```bash
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"]
}
```
## SDK Example Usage
```java
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
}
```
## SDK Available Operations
### activity
* `attachActivity` - attachActivity
* `createActivity` - createActivity
* `getActivity` - getActivity
* `getEntityActivityFeed` - getEntityActivityFeed
### entities
* `autocomplete` - autocomplete
* `createEntity` - createEntity
* `deleteEntity` - deleteEntity
* `getEntity` - getEntity
* `searchEntities` - searchEntities
* `updateEntity` - updateEntity
* `upsertEntity` - upsertEntity
### export
* `exportEntities` - exportEntities
* `importEntities` - importEntities
### journeys
* `createJourney` - createJourney
* `getJourney` - getJourney
* `getJourneysByOrgId` - getJourneysByOrgId
* `patchUpdateJourney` - patchUpdateJourney
* `removeJourney` - removeJourney
* `searchJourneys` - searchJourneys
* `updateJourney` - updateJourney
### relations
* `addRelations` - addRelations
* `deleteRelation` - deleteRelation
* `getRelations` - getRelations
* `updateRelation` - updateRelation
### savedViews
* `createSavedView` - createSavedView
* `deleteSavedView` - deleteSavedView
* `getSavedView` - getSavedView
* `listSavedViews` - listSavedViews
* `updateSavedView` - updateSavedView
### schemas
* `createNewSchemaVersion` - createNewSchemaVersion
* `deleteSchemaById` - deleteSchemaById
* `getSchema` - getSchema
* `getSchemaVersions` - getSchemaVersions
* `listSchemaBlueprints` - listSchemaBlueprints
* `listSchemas` - listSchemas
* `listTaxonomyClassificationsForSchema` - listTaxonomyClassificationsForSchema
### taxonomy
* `getTaxonomy` - getTaxonomy
* `listTaxonomies` - listTaxonomies
* `taxonomiesClassificationsSearch` - taxonomiesClassificationsSearch
* `taxonomyAutocomplete` - taxonomyAutocomplete
* `updateClassificationsForTaxonomy` - updateClassificationsForTaxonomy
### executions
* `cancelExecution` - cancelExecution
* `getExecution` - getExecution
* `getExecutions` - getExecutions
* `retriggerAction` - retriggerAction
* `startExecution` - startExecution
### flows
* `createFlow` - createFlow
* `deleteFlow` - deleteFlow
* `getFlow` - getFlow
* `putFlow` - putFlow
* `searchFlows` - searchFlows
### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)