API sheet - RapturePlatform/Rapture GitHub Wiki
For manipulating Rapture sheet objects.
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
void retVal = sheetApi.createSheetRepo(sheetURI, config);
retVal = baseAPI.doSheet_CreateSheetRepo(sheetURI, config);
Entitlement: /repo/write
Creates a sheet repository.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
config | String |
Type | Description |
---|---|
void |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
SheetRepoConfig retVal = sheetApi.getSheetRepoConfig(sheetURI);
retVal = baseAPI.doSheet_GetSheetRepoConfig(sheetURI);
Entitlement: /repo/read
Gets the sheet repository's config metadata.
Parameter | Type | Description |
---|---|---|
sheetURI | String |
Type | Description |
---|---|
SheetRepoConfig |
Describes a sheet repository. Refer to the Sheet API for additional details.
Field | Type |
---|---|
description | String |
config | String |
authority | String |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
List<SheetRepoConfig> retVal = sheetApi.getSheetRepoConfigs();
retVal = baseAPI.doSheet_GetSheetRepoConfigs();
Entitlement: /repo/read
Gets repository config metadata for all sheets.
This function takes no parameters.
Type | Description |
---|---|
List |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
RaptureSheet retVal = sheetApi.createSheet(sheetURI);
retVal = baseAPI.doSheet_CreateSheet(sheetURI);
Entitlement: /data/write/$f(sheetURI)
Creates an empty sheet at the given URI. If the sheet exists it is unaffected.
Parameter | Type | Description |
---|---|---|
sheetURI | String |
Type | Description |
---|---|
RaptureSheet |
Describes a single Rapture sheet. Refer to the Sheet API for additional details.
Field | Type |
---|---|
authority | String |
name | String |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
RaptureSheet retVal = sheetApi.deleteSheet(sheetURI);
retVal = baseAPI.doSheet_DeleteSheet(sheetURI);
Entitlement: /data/write/$f(sheetURI)
Deletes a sheet and all its contents.
Parameter | Type | Description |
---|---|---|
sheetURI | String |
Type | Description |
---|---|
RaptureSheet |
Describes a single Rapture sheet. Refer to the Sheet API for additional details.
Field | Type |
---|---|
authority | String |
name | String |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
boolean retVal = sheetApi.sheetExists(sheetURI);
retVal = baseAPI.doSheet_SheetExists(sheetURI);
Entitlement: /repo/list
Checks whether a sheet exists at a given URI.
Parameter | Type | Description |
---|---|---|
sheetURI | String |
Type | Description |
---|---|
boolean |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
void retVal = sheetApi.deleteSheetRepo(repoURI);
retVal = baseAPI.doSheet_DeleteSheetRepo(repoURI);
Entitlement: /repo/write
This method removes a Sheet Repository and its data from the Rapture system. There is no undo. It does not delete the sheets stored in the repo, so calling this while there are still sheets inside this repo will cause a memory leak.
Parameter | Type | Description |
---|---|---|
repoURI | String |
Type | Description |
---|---|
void |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
boolean retVal = sheetApi.sheetRepoExists(repoURI);
retVal = baseAPI.doSheet_SheetRepoExists(repoURI);
Entitlement: /repo/list
This API call can be used to determine whether a given type exists in a given authority.
Parameter | Type | Description |
---|---|---|
repoURI | String |
Type | Description |
---|---|
boolean |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
Map<String,RaptureFolderInfo> retVal = sheetApi.listSheetsByUriPrefix(uriPrefix, depth);
retVal = baseAPI.doSheet_ListSheetsByUriPrefix(uriPrefix, depth);
Entitlement: /data/read/$f(uriPrefix)
Return full pathnames for an entire subtree as a map of path to RFI
Parameter | Type | Description |
---|---|---|
uriPrefix | String | |
depth | int |
Type | Description |
---|---|
Map<String,RaptureFolderInfo> |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
List<String> retVal = sheetApi.deleteSheetsByUriPrefix(uriPrefix);
retVal = baseAPI.doSheet_DeleteSheetsByUriPrefix(uriPrefix);
Entitlement: /admin/script
Removes a folder and its contents recursively, including empty subfolders. Returns a list of the sheets and folders removed.
Parameter | Type | Description |
---|---|---|
uriPrefix | String |
Type | Description |
---|---|
List |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
String retVal = sheetApi.setSheetCell(sheetURI, row, column, value, tabId);
retVal = baseAPI.doSheet_SetSheetCell(sheetURI, row, column, value, tabId);
Entitlement: /data/write/$f(sheetURI)
Assigns the value passed to the specified cell.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
row | int | |
column | int | |
value | String | |
tabId | int |
Type | Description |
---|---|
String |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
void retVal = sheetApi.setBlock(sheetURI, startRow, startColumn, values, height, width, tabId);
retVal = baseAPI.doSheet_SetBlock(sheetURI, startRow, startColumn, values, height, width, tabId);
Entitlement: /data/write/$f(sheetURI)
Sets values in bulk for a rectangle of cells. The inputs are specified as a 1-dimensional list, and the list is wrapped based on the width parameter.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
startRow | int | |
startColumn | int | |
values | List | |
height | int | |
width | int | |
tabId | int |
Type | Description |
---|---|
void |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
String retVal = sheetApi.getSheetCell(sheetURI, row, column, tabId);
retVal = baseAPI.doSheet_GetSheetCell(sheetURI, row, column, tabId);
Entitlement: /data/read/$f(sheetURI)
Retrieves the data in a cell.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
row | int | |
column | int | |
tabId | int |
Type | Description |
---|---|
String |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
List<RaptureSheetCell> retVal = sheetApi.findCellsByEpoch(sheetURI, tabId, epoch);
retVal = baseAPI.doSheet_FindCellsByEpoch(sheetURI, tabId, epoch);
Entitlement: /data/read/$f(sheetURI)
Returns all the cells in a sheet. The epoch is the callers best known understanding as to the state of its knowledge of the sheet. Starting at 0 retrieves every cell. Thelatest epoch is returned in the response to this call. Once you know the epoch you can call this method to give the updates since thatepoch.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
tabId | int | |
epoch | Long |
Type | Description |
---|---|
List |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
SheetAndMeta retVal = sheetApi.getSheetAndMeta(sheetURI);
retVal = baseAPI.doSheet_GetSheetAndMeta(sheetURI);
Entitlement: /data/read/$f(sheetURI)
Get this sheet in a display form - filling in the blanks, and setting the format where appropriate, and passing a list of the formats in play. This should be sufficient for a client side renderer to do the necessary work with no further calls needed
Parameter | Type | Description |
---|---|---|
sheetURI | String |
Type | Description |
---|---|
SheetAndMeta |
Data for how to display a list of cells. Refer to the Sheet API for additional details.
Field | Type |
---|---|
cells | List(List(RaptureSheetDisplayCell)) |
styles | List(RaptureSheetStyle) |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
List<RaptureSheetStyle> retVal = sheetApi.getAllStyles(sheetURI);
retVal = baseAPI.doSheet_GetAllStyles(sheetURI);
Entitlement: /data/read/$f(sheetURI)
Gets all the style objects associated with this sheet. See also createStyle.
Parameter | Type | Description |
---|---|---|
sheetURI | String |
Type | Description |
---|---|
List |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
void retVal = sheetApi.removeStyle(sheetURI, styleName);
retVal = baseAPI.doSheet_RemoveStyle(sheetURI, styleName);
Entitlement: /data/write/$f(sheetURI)
Removes a style associated with this sheet.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
styleName | String |
Type | Description |
---|---|
void |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
RaptureSheetStyle retVal = sheetApi.createStyle(sheetURI, style);
retVal = baseAPI.doSheet_CreateStyle(sheetURI, style);
Entitlement: /data/write/$f(sheetURI)
Creates a style for this sheet. This can be used by GUIs when displaying the sheet.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
style | RaptureSheetStyle |
Type | Description |
---|---|
RaptureSheetStyle |
Stores CSS information for cells in a Rapture sheet.
Field | Type |
---|---|
name | String |
numberFormatString | String |
weight | RaptureSheetStyleWeight |
alignment | RaptureSheetStyleAlignment |
color | RaptureSheetStyleColor |
size | RaptureSheetStyleSize |
numberFormat | RaptureSheetStyleNumberFormat |
Stores CSS information for cells in a Rapture sheet.
Field | Type |
---|---|
name | String |
numberFormatString | String |
weight | RaptureSheetStyleWeight |
alignment | RaptureSheetStyleAlignment |
color | RaptureSheetStyleColor |
size | RaptureSheetStyleSize |
numberFormat | RaptureSheetStyleNumberFormat |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
List<RaptureSheetScript> retVal = sheetApi.getAllScripts(sheetURI);
retVal = baseAPI.doSheet_GetAllScripts(sheetURI);
Entitlement: /data/read/$f(sheetURI)
Get all the scripts associated with this sheet. See also: createScript.
Parameter | Type | Description |
---|---|---|
sheetURI | String |
Type | Description |
---|---|
List |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
void retVal = sheetApi.removeScript(sheetURI, scriptName);
retVal = baseAPI.doSheet_RemoveScript(sheetURI, scriptName);
Entitlement: /data/write/$f(sheetURI)
Removes a script associated with this sheet.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
scriptName | String |
Type | Description |
---|---|
void |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
RaptureSheetScript retVal = sheetApi.createScript(sheetURI, scriptName, script);
retVal = baseAPI.doSheet_CreateScript(sheetURI, scriptName, script);
Entitlement: /data/write/$f(sheetURI)
Creates a Reflex script and associates it with a given sheet. This script gets embedded into the sheet, i.e. it cannot be accessed as a standard Rapture script using the Script API's retrieveScript method. See also runScriptOnSheet.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
scriptName | String | |
script | RaptureSheetScript |
Type | Description |
---|---|
RaptureSheetScript |
A Reflex script stored within a sheet and able to reference the current sheet.
Field | Type |
---|---|
name | String |
description | String |
script | String |
autoRun | boolean |
intervalInSeconds | int |
lastRun | Date |
A Reflex script stored within a sheet and able to reference the current sheet.
Field | Type |
---|---|
name | String |
description | String |
script | String |
autoRun | boolean |
intervalInSeconds | int |
lastRun | Date |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
void retVal = sheetApi.runScriptOnSheet(sheetURI, scriptName);
retVal = baseAPI.doSheet_RunScriptOnSheet(sheetURI, scriptName);
Entitlement: /data/write/$f(sheetURI)
Runs a script that is associated with this sheet.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
scriptName | String |
Type | Description |
---|---|
void |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
RaptureSheetScript retVal = sheetApi.getSheetScript(sheetURI, scriptName);
retVal = baseAPI.doSheet_GetSheetScript(sheetURI, scriptName);
Entitlement: /data/read/$f(sheetURI)
Gets a particular script associated with this sheet.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
scriptName | String |
Type | Description |
---|---|
RaptureSheetScript |
A Reflex script stored within a sheet and able to reference the current sheet.
Field | Type |
---|---|
name | String |
description | String |
script | String |
autoRun | boolean |
intervalInSeconds | int |
lastRun | Date |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
String retVal = sheetApi.exportSheetAsScript(sheetURI);
retVal = baseAPI.doSheet_ExportSheetAsScript(sheetURI);
Entitlement: /data/read/$f(sheetURI)
Returns a String with Reflex code that can be used to create the entire sheet. This is useful if you want to clone a sheet onto a different instance of Rapture, or store it for installation as a feature.
Parameter | Type | Description |
---|---|---|
sheetURI | String |
Type | Description |
---|---|
String |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
List<RaptureSheetRange> retVal = sheetApi.getSheetNamedSelections(sheetURI);
retVal = baseAPI.doSheet_GetSheetNamedSelections(sheetURI);
Entitlement: /data/read/$f(sheetURI)
Get all the ranges of interest that are marked on this sheet. See also: getSheetNamedSelection.
Parameter | Type | Description |
---|---|---|
sheetURI | String |
Type | Description |
---|---|
List |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
void retVal = sheetApi.deleteSheetNamedSelection(sheetURI, rangeName);
retVal = baseAPI.doSheet_DeleteSheetNamedSelection(sheetURI, rangeName);
Entitlement: /data/write/$f(sheetURI)
Deletes a range associated with this sheet.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
rangeName | String |
Type | Description |
---|---|
void |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
RaptureSheetRange retVal = sheetApi.createSheetNamedSelection(sheetURI, rangeName, range);
retVal = baseAPI.doSheet_CreateSheetNamedSelection(sheetURI, rangeName, range);
Entitlement: /data/write/$f(sheetURI)
Creates a range in the sheet. A range is a named set of sequential rows and columns.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
rangeName | String | |
range | RaptureSheetRange |
Type | Description |
---|---|
RaptureSheetRange |
Specifies any range of cells within one sheet.
Field | Type |
---|---|
name | String |
startRow | int |
endRow | int |
startColumn | int |
endColumn | int |
Specifies any range of cells within one sheet.
Field | Type |
---|---|
name | String |
startRow | int |
endRow | int |
startColumn | int |
endColumn | int |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
List<RaptureSheetNote> retVal = sheetApi.getSheetNotes(sheetURI);
retVal = baseAPI.doSheet_GetSheetNotes(sheetURI);
Entitlement: /data/read/$f(sheetURI)
Get all the notes associated with this sheet. See also createSheetNote.
Parameter | Type | Description |
---|---|---|
sheetURI | String |
Type | Description |
---|---|
List |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
void retVal = sheetApi.deleteSheetNote(sheetURI, noteId);
retVal = baseAPI.doSheet_DeleteSheetNote(sheetURI, noteId);
Entitlement: /data/write/$f(sheetURI)
Deletes a note associated with this sheet.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
noteId | String |
Type | Description |
---|---|
void |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
RaptureSheetNote retVal = sheetApi.createSheetNote(sheetURI, note);
retVal = baseAPI.doSheet_CreateSheetNote(sheetURI, note);
Entitlement: /data/write/$f(sheetURI)
Adds a note to a sheet. One sheet can have multiple notes associated with it. A note is a text note with information about who created it and when.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
note | RaptureSheetNote |
Type | Description |
---|---|
RaptureSheetNote |
A note that can be attached to a sheet.
Field | Type |
---|---|
id | String |
note | String |
who | String |
when | Date |
A note that can be attached to a sheet.
Field | Type |
---|---|
id | String |
note | String |
who | String |
when | Date |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
void retVal = sheetApi.cloneSheet(sheetURI, newSheetURI);
retVal = baseAPI.doSheet_CloneSheet(sheetURI, newSheetURI);
Entitlement: /data/write/$f(newSheetURI)
Copies everything from one sheet to another. This is currently only allowed within sheets that have the same authority.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
newSheetURI | String |
Type | Description |
---|---|
void |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
List<RaptureSheetRow> retVal = sheetApi.getSheetNamedSelection(sheetURI, rangeName);
retVal = baseAPI.doSheet_GetSheetNamedSelection(sheetURI, rangeName);
Entitlement: /data/read/$f(sheetURI)
Get the contents of a specified range on a sheet.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
rangeName | String |
Type | Description |
---|---|
List |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
void retVal = sheetApi.deleteSheetColumn(sheetURI, column);
retVal = baseAPI.doSheet_DeleteSheetColumn(sheetURI, column);
Entitlement: /data/write/$f(sheetURI)
Deletes an entire column in the sheet, in all tabIds.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
column | int |
Type | Description |
---|---|
void |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
void retVal = sheetApi.deleteSheetRow(sheetURI, row);
retVal = baseAPI.doSheet_DeleteSheetRow(sheetURI, row);
Entitlement: /data/write/$f(sheetURI)
Deletes an entire row in the sheet, in all tabIds.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
row | int |
Type | Description |
---|---|
void |
HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
void retVal = sheetApi.deleteSheetCell(sheetURI, row, column, tabId);
retVal = baseAPI.doSheet_DeleteSheetCell(sheetURI, row, column, tabId);
Entitlement: /data/write/$f(sheetURI)
Deletes data stored in a given cell.
Parameter | Type | Description |
---|---|---|
sheetURI | String | |
row | int | |
column | int | |
tabId | int |
Type | Description |
---|---|
void |