API bootstrap - RapturePlatform/Rapture GitHub Wiki

Bootstrap API

The Bootstrap API is used to setup an initial Rapture environment and to migrate existing bootstrap repositories to a new repository format.

setEmphemeralRepo

HttpBootstrapApi bootstrapApi = new HttpBootstrapApi(loginApi);
void retVal = bootstrapApi.setEmphemeralRepo(config);
retVal = baseAPI.doBootstrap_SetEmphemeralRepo(config);

Entitlement: /admin/bootstrap

The ephemeral repository is used to store information that does not need to survive a restart of Rapture. It normally holds information such as sessions, and its config is usually based around a shared non-versioned memory model

Function Parameters

Parameter Type Description
config String

Return value

Type Description
void

setConfigRepo

HttpBootstrapApi bootstrapApi = new HttpBootstrapApi(loginApi);
void retVal = bootstrapApi.setConfigRepo(config);
retVal = baseAPI.doBootstrap_SetConfigRepo(config);

Entitlement: /admin/bootstrap

The config repository is used to store general config information about entities in Rapture. These entities include users, types, indices, queues and the like.

Function Parameters

Parameter Type Description
config String

Return value

Type Description
void

setSettingsRepo

HttpBootstrapApi bootstrapApi = new HttpBootstrapApi(loginApi);
void retVal = bootstrapApi.setSettingsRepo(config);
retVal = baseAPI.doBootstrap_SetSettingsRepo(config);

Entitlement: /void/bootstrap

The settings repository is used to store general low level settings in Rapture.

Function Parameters

Parameter Type Description
config String

Return value

Type Description
void

migrateConfigRepo

HttpBootstrapApi bootstrapApi = new HttpBootstrapApi(loginApi);
void retVal = bootstrapApi.migrateConfigRepo(newConfig);
retVal = baseAPI.doBootstrap_MigrateConfigRepo(newConfig);

Entitlement: /admin/bootstrap

This method is used to migrate the top level Config repository to a new config. This task takes place in the background, and once completed the config repository is switched to the new config. Any changes to config up to this point may be lost.

Function Parameters

Parameter Type Description
newConfig String

Return value

Type Description
void

migrateEphemeralRepo

HttpBootstrapApi bootstrapApi = new HttpBootstrapApi(loginApi);
void retVal = bootstrapApi.migrateEphemeralRepo(newConfig);
retVal = baseAPI.doBootstrap_MigrateEphemeralRepo(newConfig);

Entitlement: /admin/bootstrap

This method is used to migrate the top level Ephemeral repository to a new config. This task takes place in the background, and once completed the config repository is switched to the new config. Any changes to config up to this point may be lost.

Function Parameters

Parameter Type Description
newConfig String

Return value

Type Description
void

migrateSettingsRepo

HttpBootstrapApi bootstrapApi = new HttpBootstrapApi(loginApi);
void retVal = bootstrapApi.migrateSettingsRepo(newConfig);
retVal = baseAPI.doBootstrap_MigrateSettingsRepo(newConfig);

Entitlement: /admin/bootstrap

This method is used to migrate the top level Settings repository to a new config. This task takes place in the background, and once completed the config repository is switched to the new config. Any changes to config up to this point may be lost.

Function Parameters

Parameter Type Description
newConfig String

Return value

Type Description
void

getConfigRepo

HttpBootstrapApi bootstrapApi = new HttpBootstrapApi(loginApi);
String retVal = bootstrapApi.getConfigRepo();
retVal = baseAPI.doBootstrap_GetConfigRepo();

Entitlement: /admin/main

Retrieve the current settings of the config repository.

Function Parameters

This function takes no parameters.

Return value

Type Description
String

getSettingsRepo

HttpBootstrapApi bootstrapApi = new HttpBootstrapApi(loginApi);
String retVal = bootstrapApi.getSettingsRepo();
retVal = baseAPI.doBootstrap_GetSettingsRepo();

Entitlement: /admin/main

Retrieve the current settings of the settings repository.

Function Parameters

This function takes no parameters.

Return value

Type Description
String

getEphemeralRepo

HttpBootstrapApi bootstrapApi = new HttpBootstrapApi(loginApi);
String retVal = bootstrapApi.getEphemeralRepo();
retVal = baseAPI.doBootstrap_GetEphemeralRepo();

Entitlement: /admin/main

Retrieve the current settings of the ephemeral repository.

Function Parameters

This function takes no parameters.

Return value

Type Description
String

restartBootstrap

HttpBootstrapApi bootstrapApi = new HttpBootstrapApi(loginApi);
void retVal = bootstrapApi.restartBootstrap();
retVal = baseAPI.doBootstrap_RestartBootstrap();

Entitlement: /admin/bootstrap

After changing the definition of any bootstrap repository, Rapture will need to be restarted. This method will restart Rapture.

Function Parameters

This function takes no parameters.

Return value

Type Description
void

addScriptClass

HttpBootstrapApi bootstrapApi = new HttpBootstrapApi(loginApi);
void retVal = bootstrapApi.addScriptClass(keyword, className);
retVal = baseAPI.doBootstrap_AddScriptClass(keyword, className);

Entitlement: /admin/bootstrap

All scripts that are run by Rapture are passed a set of helper instances that can be used by the script. The helpers are locked to the entitlement context of the calling user. This method sets the name of such a class in this context. It is primarily an internal function, defined during startup, as the class provided must be accessible by the main Rapture application.

Function Parameters

Parameter Type Description
keyword String
className String

Return value

Type Description
void

getScriptClasses

HttpBootstrapApi bootstrapApi = new HttpBootstrapApi(loginApi);
Map<String,String> retVal = bootstrapApi.getScriptClasses();
retVal = baseAPI.doBootstrap_GetScriptClasses();

Entitlement: /admin/bootstrap

This method retrieves previous defined script classes for this system

Function Parameters

This function takes no parameters.

Return value

Type Description
Map<String,String>

deleteScriptClass

HttpBootstrapApi bootstrapApi = new HttpBootstrapApi(loginApi);
boolean retVal = bootstrapApi.deleteScriptClass(keyword);
retVal = baseAPI.doBootstrap_DeleteScriptClass(keyword);

Entitlement: /admin/bootstrap

This method removes a previously defined script class.

Function Parameters

Parameter Type Description
keyword String

Return value

Type Description
boolean