Building the API client library requires Maven to be installed.
To install the API client library to your local Maven repository, simply execute:
mvn install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn deploy
Refer to the official documentation for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>io.rakam</groupId>
<artifactId>rakam-client</artifactId>
<version>0.5</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
compile "io.rakam:rakam-client:0.5"
At first generate the JAR by executing:
mvn package
Then manually install the following JARs:
- target/rakam-client-0.5.jar
- target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import io.rakam.*;
import io.rakam.auth.*;
import io.rakam.model.*;
import io.rakam.client.api.AdminApi;
import java.io.File;
import java.util.*;
public class AdminApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: master_key
ApiKeyAuth master_key = (ApiKeyAuth) defaultClient.getAuthentication("master_key");
master_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//master_key.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
ProjectAddCustomFieldsToSchema projectAddCustomFieldsToSchema = new ProjectAddCustomFieldsToSchema(); // ProjectAddCustomFieldsToSchema |
try {
List<SchemaField> result = apiInstance.addCustomFieldsToSchema(projectAddCustomFieldsToSchema);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#addCustomFieldsToSchema");
e.printStackTrace();
}
}
}
All URIs are relative to https://app.rakam.io/
Class | Method | HTTP request | Description |
---|---|---|---|
AdminApi | addCustomFieldsToSchema | POST /project/schema/add/custom | Add fields to collections by transforming other schemas |
AdminApi | addFieldsToSchema | POST /project/schema/add | Add fields to collections |
AdminApi | checkApiKeys | POST /project/check-api-keys | Create API Keys |
AdminApi | checkLockKey | POST /admin/lock_key | Check lock key |
AdminApi | collections | POST /project/collection | Get collection names |
AdminApi | createApiKeys | POST /project/create-api-keys | Create API Keys |
AdminApi | createProject | POST /project/create | Create project |
AdminApi | deleteProject | DELETE /project/delete | Delete project |
AdminApi | getConfigurations | GET /admin/configurations | List installed modules |
AdminApi | getProjects | GET /project/list | List created projects |
AdminApi | getStats | POST /project/stats | Get project stats |
AdminApi | getTypes | GET /admin/types | Get types |
AdminApi | revokeApiKeys | DELETE /project/revoke-api-keys | Revoke API Keys |
AdminApi | schema | POST /project/schema | Get collection schema |
CollectApi | batchEvents | POST /event/batch | Collect multiple events |
CollectApi | bulkEvents | POST /event/bulk | Collect Bulk events |
CollectApi | bulkEventsRemote | POST /event/bulk/remote | Collect bulk events from remote |
CollectApi | collectEvent | POST /event/collect | Collect event |
CollectApi | commitBulkEvents | POST /event/bulk/commit | Commit Bulk events |
ContinuousqueryApi | createQuery | POST /continuous-query/create | Create stream |
ContinuousqueryApi | deleteQuery | POST /continuous-query/delete | Delete stream |
ContinuousqueryApi | getQuery | POST /continuous-query/get | Get continuous query |
ContinuousqueryApi | getSchemaOfQuery | POST /continuous-query/schema | Get query schema |
ContinuousqueryApi | listQueries | POST /continuous-query/list | List queries |
ContinuousqueryApi | testQuery | POST /continuous-query/test | Test continuous query |
EventexplorerApi | analyzeEvents | POST /event-explorer/analyze | Perform simple query on event data |
EventexplorerApi | createPrecomputedTable | POST /event-explorer/pre_calculate | Create Pre-computed table |
EventexplorerApi | getEventStatistics | POST /event-explorer/statistics | Event statistics |
EventexplorerApi | getExtraDimensions | GET /event-explorer/extra_dimensions | Event statistics |
FunnelApi | analyzeFunnel | POST /funnel/analyze | Execute query |
MaterializedviewApi | createView | POST /materialized-view/create | Create view |
MaterializedviewApi | deleteView | POST /materialized-view/delete | Delete materialized view |
MaterializedviewApi | getSchemaOfView | POST /materialized-view/schema | Get schemas |
MaterializedviewApi | getView | POST /materialized-view/get | Get view |
MaterializedviewApi | listViews | POST /materialized-view/list | List views |
QueryApi | execute | POST /query/execute | Execute query on event data-set |
QueryApi | explain | POST /query/explain | Explain query |
QueryApi | metadata | POST /query/metadata | Test query |
RealtimeApi | createTable | POST /realtime/create | Create report |
RealtimeApi | deleteTable | POST /realtime/delete | Delete report |
RealtimeApi | listTables | POST /realtime/list | List queries |
RealtimeApi | queryTable | POST /realtime/get | Get report |
RecipeApi | exportRecipe | GET /recipe/export | Export recipe |
RecipeApi | installRecipe | POST /recipe/install | Install recipe |
RetentionApi | analyzeRetention | POST /retention/analyze | Execute query |
UserApi | createSegment | POST /user/create_segment | Get events of the user |
UserApi | createUser | POST /user/create | Create new user |
UserApi | createUsers | POST /user/batch/create | Create multiple new users |
UserApi | getEvents | POST /user/get_events | Get events of the user |
UserApi | getMetadata | GET /user/metadata | Get user storage metadata |
UserApi | getUser | POST /user/get | Get user |
UserApi | incrementProperty | POST /user/increment_property | Set user property |
UserApi | searchUsers | POST /user/search | Search users |
UserApi | setProperties | POST /user/set_properties | Set user properties |
UserApi | setPropertiesOnce | POST /user/set_properties_once | Set user properties once |
UserApi | unsetProperty | POST /user/unset_properties | Unset user property |
UseractionApi | batch | POST /user/action/email/batch | Apply batch operation |
UseractionApi | send | POST /user/action/email/single | Perform action for single user |
- AnalyzeRequest
- BulkEventRemote
- CheckLockKey
- Collection
- CollectionDefinition
- CollectionEvent
- CommitBulkEvents
- CommitRequest
- Condition
- ConfigItem
- ContinuousQuery
- ContinuousQueryDeleteQuery
- ContinuousQueryGetQuery
- ContinuousQueryGetSchemaOfQuery
- ContinuousQueryTestQuery
- CreatePrecomputedTable
- CreateProject
- EmailActionConfig
- ErrorMessage
- Event
- EventContext
- EventExplorerGetEventStatistics
- EventFilter
- EventFilterAggregation
- EventList
- Execute
- Explain
- ExportQuery
- FunnelQuery
- FunnelStep
- FunnelWindow
- GroupBy
- Library
- MappingPlugin
- MaterializedView
- MaterializedViewDeleteView
- MaterializedViewGetSchemaOfView
- MaterializedViewGetView
- MaterializedViewSchema
- Measure
- MetadataResponse
- ModuleDescriptor
- OLAPTable
- Ordering
- PrecalculatedTable
- ProjectAddCustomFieldsToSchema
- ProjectAddFieldsToSchema
- ProjectApiKeys
- ProjectCheckApiKeys
- ProjectGetStats
- ProjectSchema
- QueryError
- QueryMetadata
- QueryResult
- RealTimeQueryResult
- RealTimeReport
- RealtimeDeleteTable
- RealtimeQueryTable
- Recipe
- Reference
- ResponseQuery
- RetentionAction
- RetentionQuery
- SchemaField
- SchemaFieldInfo
- Sorting
- Stats
- SuccessMessage
- Timeframe
- User
- UserContext
- UserCreateSegment
- UserCreateUsers
- UserEmailActionBatch
- UserEmailActionSend
- UserGetEvents
- UserGetUser
- UserIncrementProperty
- UserSearchUsers
- UserUnsetProperty
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: read_key
- Location: HTTP header
- Type: API key
- API key parameter name: master_key
- Location: HTTP header
- Type: API key
- API key parameter name: write_key
- Location: HTTP header
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issue.