API sheet - RapturePlatform/Rapture GitHub Wiki

Sheet API

For manipulating Rapture sheet objects.

createSheetRepo

HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
void retVal = sheetApi.createSheetRepo(sheetURI, config);
retVal = baseAPI.doSheet_CreateSheetRepo(sheetURI, config);

Entitlement: /repo/write

Creates a sheet repository.

Function Parameters

Parameter Type Description
sheetURI String
config String

Return value

Type Description
void

getSheetRepoConfig

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.

Function Parameters

Parameter Type Description
sheetURI String

Return value

Type Description
SheetRepoConfig
Types used in this function

SheetRepoConfig

Describes a sheet repository. Refer to the Sheet API for additional details.

Field Type
description String
config String
authority String

getSheetRepoConfigs

HttpSheetApi sheetApi = new HttpSheetApi(loginApi);
List<SheetRepoConfig> retVal = sheetApi.getSheetRepoConfigs();
retVal = baseAPI.doSheet_GetSheetRepoConfigs();

Entitlement: /repo/read

Gets repository config metadata for all sheets.

Function Parameters

This function takes no parameters.

Return value

Type Description
List

createSheet

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.

Function Parameters

Parameter Type Description
sheetURI String

Return value

Type Description
RaptureSheet
Types used in this function

RaptureSheet

Describes a single Rapture sheet. Refer to the Sheet API for additional details.

Field Type
authority String
name String

deleteSheet

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.

Function Parameters

Parameter Type Description
sheetURI String

Return value

Type Description
RaptureSheet
Types used in this function

RaptureSheet

Describes a single Rapture sheet. Refer to the Sheet API for additional details.

Field Type
authority String
name String

sheetExists

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.

Function Parameters

Parameter Type Description
sheetURI String

Return value

Type Description
boolean

deleteSheetRepo

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.

Function Parameters

Parameter Type Description
repoURI String

Return value

Type Description
void

sheetRepoExists

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.

Function Parameters

Parameter Type Description
repoURI String

Return value

Type Description
boolean

listSheetsByUriPrefix

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

Function Parameters

Parameter Type Description
uriPrefix String
depth int

Return value

Type Description
Map<String,RaptureFolderInfo>

deleteSheetsByUriPrefix

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.

Function Parameters

Parameter Type Description
uriPrefix String

Return value

Type Description
List

setSheetCell

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.

Function Parameters

Parameter Type Description
sheetURI String
row int
column int
value String
tabId int

Return value

Type Description
String

setBlock

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.

Function Parameters

Parameter Type Description
sheetURI String
startRow int
startColumn int
values List
height int
width int
tabId int

Return value

Type Description
void

getSheetCell

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.

Function Parameters

Parameter Type Description
sheetURI String
row int
column int
tabId int

Return value

Type Description
String

findCellsByEpoch

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.

Function Parameters

Parameter Type Description
sheetURI String
tabId int
epoch Long

Return value

Type Description
List

getSheetAndMeta

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

Function Parameters

Parameter Type Description
sheetURI String

Return value

Type Description
SheetAndMeta
Types used in this function

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)

getAllStyles

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.

Function Parameters

Parameter Type Description
sheetURI String

Return value

Type Description
List

removeStyle

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.

Function Parameters

Parameter Type Description
sheetURI String
styleName String

Return value

Type Description
void

createStyle

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.

Function Parameters

Parameter Type Description
sheetURI String
style RaptureSheetStyle

Return value

Type Description
RaptureSheetStyle
Types used in this function

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

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

getAllScripts

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.

Function Parameters

Parameter Type Description
sheetURI String

Return value

Type Description
List

removeScript

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.

Function Parameters

Parameter Type Description
sheetURI String
scriptName String

Return value

Type Description
void

createScript

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.

Function Parameters

Parameter Type Description
sheetURI String
scriptName String
script RaptureSheetScript

Return value

Type Description
RaptureSheetScript
Types used in this function

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

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

runScriptOnSheet

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.

Function Parameters

Parameter Type Description
sheetURI String
scriptName String

Return value

Type Description
void

getSheetScript

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.

Function Parameters

Parameter Type Description
sheetURI String
scriptName String

Return value

Type Description
RaptureSheetScript
Types used in this function

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

exportSheetAsScript

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.

Function Parameters

Parameter Type Description
sheetURI String

Return value

Type Description
String

getSheetNamedSelections

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.

Function Parameters

Parameter Type Description
sheetURI String

Return value

Type Description
List

deleteSheetNamedSelection

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.

Function Parameters

Parameter Type Description
sheetURI String
rangeName String

Return value

Type Description
void

createSheetNamedSelection

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.

Function Parameters

Parameter Type Description
sheetURI String
rangeName String
range RaptureSheetRange

Return value

Type Description
RaptureSheetRange
Types used in this function

RaptureSheetRange

Specifies any range of cells within one sheet.

Field Type
name String
startRow int
endRow int
startColumn int
endColumn int

RaptureSheetRange

Specifies any range of cells within one sheet.

Field Type
name String
startRow int
endRow int
startColumn int
endColumn int

getSheetNotes

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.

Function Parameters

Parameter Type Description
sheetURI String

Return value

Type Description
List

deleteSheetNote

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.

Function Parameters

Parameter Type Description
sheetURI String
noteId String

Return value

Type Description
void

createSheetNote

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.

Function Parameters

Parameter Type Description
sheetURI String
note RaptureSheetNote

Return value

Type Description
RaptureSheetNote
Types used in this function

RaptureSheetNote

A note that can be attached to a sheet.

Field Type
id String
note String
who String
when Date

RaptureSheetNote

A note that can be attached to a sheet.

Field Type
id String
note String
who String
when Date

cloneSheet

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.

Function Parameters

Parameter Type Description
sheetURI String
newSheetURI String

Return value

Type Description
void

getSheetNamedSelection

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.

Function Parameters

Parameter Type Description
sheetURI String
rangeName String

Return value

Type Description
List

deleteSheetColumn

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.

Function Parameters

Parameter Type Description
sheetURI String
column int

Return value

Type Description
void

deleteSheetRow

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.

Function Parameters

Parameter Type Description
sheetURI String
row int

Return value

Type Description
void

deleteSheetCell

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.

Function Parameters

Parameter Type Description
sheetURI String
row int
column int
tabId int

Return value

Type Description
void
⚠️ **GitHub.com Fallback** ⚠️