API structured - RapturePlatform/Rapture GitHub Wiki

Structured API

SQL RDBMS support

createStructuredRepo

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.createStructuredRepo(uri, config);
retVal = baseAPI.doStructured_CreateStructuredRepo(uri, config);

Entitlement: /structured/write

Create a repository for structured data

Function Parameters

Parameter Type Description
uri String
config String

Return value

Type Description
void

deleteStructuredRepo

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.deleteStructuredRepo(uri);
retVal = baseAPI.doStructured_DeleteStructuredRepo(uri);

Entitlement: /structured/write

Delete a repository for structured data

Function Parameters

Parameter Type Description
uri String

Return value

Type Description
void

structuredRepoExists

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
boolean retVal = structuredApi.structuredRepoExists(uri);
retVal = baseAPI.doStructured_StructuredRepoExists(uri);

Entitlement: /structured/read

check existence

Function Parameters

Parameter Type Description
uri String

Return value

Type Description
boolean

getStructuredRepoConfig

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
StructuredRepoConfig retVal = structuredApi.getStructuredRepoConfig(uri);
retVal = baseAPI.doStructured_GetStructuredRepoConfig(uri);

Entitlement: /structured/read

get a specific structured repo config given a uri

Function Parameters

Parameter Type Description
uri String

Return value

Type Description
StructuredRepoConfig
Types used in this function

StructuredRepoConfig

A structured repository definition

Field Type
description String
config String
authority String

getStructuredRepoConfigs

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
List<StructuredRepoConfig> retVal = structuredApi.getStructuredRepoConfigs();
retVal = baseAPI.doStructured_GetStructuredRepoConfigs();

Entitlement: /structured/read

get list of all configurations

Function Parameters

This function takes no parameters.

Return value

Type Description
List

createTableUsingSql

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.createTableUsingSql(schema, rawSql);
retVal = baseAPI.doStructured_CreateTableUsingSql(schema, rawSql);

Entitlement: /structured/admin/$f(schema)

create a structured table using raw sql

Function Parameters

Parameter Type Description
schema String
rawSql String

Return value

Type Description
void

createTable

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.createTable(tableUri, columns);
retVal = baseAPI.doStructured_CreateTable(tableUri, columns);

Entitlement: /structured/admin/$f(tableUri)

create a structured table using a column name to SQL column type map

Function Parameters

Parameter Type Description
tableUri String
columns Map<String,String>

Return value

Type Description
void

dropTable

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.dropTable(tableUri);
retVal = baseAPI.doStructured_DropTable(tableUri);

Entitlement: /structured/admin/$f(tableUri)

drop a structured table and all of its data

Function Parameters

Parameter Type Description
tableUri String

Return value

Type Description
void

tableExists

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
boolean retVal = structuredApi.tableExists(tableUri);
retVal = baseAPI.doStructured_TableExists(tableUri);

Entitlement: /structured/read/$f(tableUri)

check if table exists

Function Parameters

Parameter Type Description
tableUri String

Return value

Type Description
boolean

describeTable

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
Map<String,String> retVal = structuredApi.describeTable(tableUri);
retVal = baseAPI.doStructured_DescribeTable(tableUri);

Entitlement: /structured/read/$f(tableUri)

get table description

Function Parameters

Parameter Type Description
tableUri String

Return value

Type Description
Map<String,String>

addTableColumns

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.addTableColumns(tableUri, columns);
retVal = baseAPI.doStructured_AddTableColumns(tableUri, columns);

Entitlement: /structured/admin/$f(tableUri)

add column(s) to an existing table. Table must exist beforehand

Function Parameters

Parameter Type Description
tableUri String
columns Map<String,String>

Return value

Type Description
void

deleteTableColumns

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.deleteTableColumns(tableUri, columnNames);
retVal = baseAPI.doStructured_DeleteTableColumns(tableUri, columnNames);

Entitlement: /structured/admin/$f(tableUri)

remove column(s) from an existing table. Table must exist beforehand

Function Parameters

Parameter Type Description
tableUri String
columnNames List

Return value

Type Description
void

updateTableColumns

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.updateTableColumns(tableUri, columns);
retVal = baseAPI.doStructured_UpdateTableColumns(tableUri, columns);

Entitlement: /structured/admin/$f(tableUri)

update column(s) in an existing table. Table must exist beforehand

Function Parameters

Parameter Type Description
tableUri String
columns Map<String,String>

Return value

Type Description
void

renameTableColumns

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.renameTableColumns(tableUri, columnNames);
retVal = baseAPI.doStructured_RenameTableColumns(tableUri, columnNames);

Entitlement: /structured/admin/$f(tableUri)

rename column(s) in an existing table. Table must exist beforehand

Function Parameters

Parameter Type Description
tableUri String
columnNames Map<String,String>

Return value

Type Description
void

createIndex

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.createIndex(tableUri, indexName, columnNames);
retVal = baseAPI.doStructured_CreateIndex(tableUri, indexName, columnNames);

Entitlement: /structured/admin/$f(tableUri)

create an index on a structured table

Function Parameters

Parameter Type Description
tableUri String
indexName String
columnNames List

Return value

Type Description
void

dropIndex

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.dropIndex(tableUri, indexName);
retVal = baseAPI.doStructured_DropIndex(tableUri, indexName);

Entitlement: /structured/admin/$f(tableUri)

remove an index that was previously created on a table

Function Parameters

Parameter Type Description
tableUri String
indexName String

Return value

Type Description
void

selectJoinedRows

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
List<Map<String,Object>> retVal = structuredApi.selectJoinedRows(tableUris, columnNames, from, where, order, ascending, limit);
retVal = baseAPI.doStructured_SelectJoinedRows(tableUris, columnNames, from, where, order, ascending, limit);

Entitlement: /structured/read

retrieve data from multiple tables

Function Parameters

Parameter Type Description
tableUris List
columnNames List
from String
where String
order List
ascending boolean
limit int

Return value

Type Description
List<Map<String,Object>>

selectUsingSql

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
List<Map<String,Object>> retVal = structuredApi.selectUsingSql(schema, rawSql);
retVal = baseAPI.doStructured_SelectUsingSql(schema, rawSql);

Entitlement: /structured/read/$f(schema)

retrieve data with raw sql

Function Parameters

Parameter Type Description
schema String
rawSql String

Return value

Type Description
List<Map<String,Object>>

selectRows

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
List<Map<String,Object>> retVal = structuredApi.selectRows(tableUri, columnNames, where, order, ascending, limit);
retVal = baseAPI.doStructured_SelectRows(tableUri, columnNames, where, order, ascending, limit);

Entitlement: /structured/read/$f(tableUri)

retrieve data from a single table

Function Parameters

Parameter Type Description
tableUri String
columnNames List
where String
order List
ascending boolean
limit int

Return value

Type Description
List<Map<String,Object>>

insertUsingSql

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.insertUsingSql(schema, rawSql);
retVal = baseAPI.doStructured_InsertUsingSql(schema, rawSql);

Entitlement: /structured/write/$f(schema)

insert new data with raw sql

Function Parameters

Parameter Type Description
schema String
rawSql String

Return value

Type Description
void

insertRow

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.insertRow(tableUri, values);
retVal = baseAPI.doStructured_InsertRow(tableUri, values);

Entitlement: /structured/write/$f(tableUri)

insert new data into a single table

Function Parameters

Parameter Type Description
tableUri String
values Map<String,Object>

Return value

Type Description
void

insertRows

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.insertRows(tableUri, values);
retVal = baseAPI.doStructured_InsertRows(tableUri, values);

Entitlement: /structured/write/$f(tableUri)

insert one or more rows of data into a single table

Function Parameters

Parameter Type Description
tableUri String
values List<Map<String,Object>>

Return value

Type Description
void

deleteUsingSql

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.deleteUsingSql(schema, rawSql);
retVal = baseAPI.doStructured_DeleteUsingSql(schema, rawSql);

Entitlement: /structured/write/$f(schema)

delete data with raw sql

Function Parameters

Parameter Type Description
schema String
rawSql String

Return value

Type Description
void

deleteRows

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.deleteRows(tableUri, where);
retVal = baseAPI.doStructured_DeleteRows(tableUri, where);

Entitlement: /structured/write/$f(tableUri)

delete data from a single table

Function Parameters

Parameter Type Description
tableUri String
where String

Return value

Type Description
void

updateUsingSql

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.updateUsingSql(schema, rawSql);
retVal = baseAPI.doStructured_UpdateUsingSql(schema, rawSql);

Entitlement: /structured/write/$f(schema)

update existing data with raw sql

Function Parameters

Parameter Type Description
schema String
rawSql String

Return value

Type Description
void

updateRows

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.updateRows(tableUri, values, where);
retVal = baseAPI.doStructured_UpdateRows(tableUri, values, where);

Entitlement: /structured/write/$f(tableUri)

update existing data from a single table

Function Parameters

Parameter Type Description
tableUri String
values Map<String,Object>
where String

Return value

Type Description
void

begin

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
boolean retVal = structuredApi.begin();
retVal = baseAPI.doStructured_Begin();

Entitlement: /structured/write

start a transaction

Function Parameters

This function takes no parameters.

Return value

Type Description
boolean

commit

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
boolean retVal = structuredApi.commit();
retVal = baseAPI.doStructured_Commit();

Entitlement: /structured/write

commit a transaction

Function Parameters

This function takes no parameters.

Return value

Type Description
boolean

rollback

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
boolean retVal = structuredApi.rollback();
retVal = baseAPI.doStructured_Rollback();

Entitlement: /structured/write

rollback a transaction

Function Parameters

This function takes no parameters.

Return value

Type Description
boolean

abort

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
boolean retVal = structuredApi.abort(transactionId);
retVal = baseAPI.doStructured_Abort(transactionId);

Entitlement: /structured/admin

abort a transaction of given id

Function Parameters

Parameter Type Description
transactionId String

Return value

Type Description
boolean

getTransactions

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
List<String> retVal = structuredApi.getTransactions();
retVal = baseAPI.doStructured_GetTransactions();

Entitlement: /structured/admin

get active transactions

Function Parameters

This function takes no parameters.

Return value

Type Description
List

getDdl

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
String retVal = structuredApi.getDdl(uri, includeTableData);
retVal = baseAPI.doStructured_GetDdl(uri, includeTableData);

Entitlement: /structured/read/$f(uri)

generate the DDL sql that represents an entire schema or an individual table in the schema

Function Parameters

Parameter Type Description
uri String
includeTableData boolean

Return value

Type Description
String

getCursorUsingSql

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
String retVal = structuredApi.getCursorUsingSql(schema, rawSql);
retVal = baseAPI.doStructured_GetCursorUsingSql(schema, rawSql);

Entitlement: /structured/read/$f(schema)

retrieve a cursor for row-by-row access to data using raw sql

Function Parameters

Parameter Type Description
schema String
rawSql String

Return value

Type Description
String

getCursor

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
String retVal = structuredApi.getCursor(tableUri, columnNames, where, order, ascending, limit);
retVal = baseAPI.doStructured_GetCursor(tableUri, columnNames, where, order, ascending, limit);

Entitlement: /structured/read/$f(tableUri)

retrieve a cursor for row-by-row access to data

Function Parameters

Parameter Type Description
tableUri String
columnNames List
where String
order List
ascending boolean
limit int

Return value

Type Description
String

getCursorForJoin

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
String retVal = structuredApi.getCursorForJoin(tableUris, columnNames, from, where, order, ascending, limit);
retVal = baseAPI.doStructured_GetCursorForJoin(tableUris, columnNames, from, where, order, ascending, limit);

Entitlement: /structured/read

retrieve a cursor for data from multiple tables

Function Parameters

Parameter Type Description
tableUris List
columnNames List
from String
where String
order List
ascending boolean
limit int

Return value

Type Description
String

next

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
List<Map<String,Object>> retVal = structuredApi.next(tableUri, cursorId, count);
retVal = baseAPI.doStructured_Next(tableUri, cursorId, count);

Entitlement: /structured/read/$f(tableUri)

given a cursor id, get the next row in the result set

Function Parameters

Parameter Type Description
tableUri String
cursorId String
count int

Return value

Type Description
List<Map<String,Object>>

previous

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
List<Map<String,Object>> retVal = structuredApi.previous(tableUri, cursorId, count);
retVal = baseAPI.doStructured_Previous(tableUri, cursorId, count);

Entitlement: /structured/read/$f(tableUri)

given a cursor id, get the next row in the result set

Function Parameters

Parameter Type Description
tableUri String
cursorId String
count int

Return value

Type Description
List<Map<String,Object>>

closeCursor

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.closeCursor(tableUri, cursorId);
retVal = baseAPI.doStructured_CloseCursor(tableUri, cursorId);

Entitlement: /structured/read/$f(tableUri)

close a cursor once done with it

Function Parameters

Parameter Type Description
tableUri String
cursorId String

Return value

Type Description
void

createProcedureCallUsingSql

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.createProcedureCallUsingSql(procUri, rawSql);
retVal = baseAPI.doStructured_CreateProcedureCallUsingSql(procUri, rawSql);

Entitlement: /structured/admin/$f(procUri)

Create a stored procedure with raw SQL

Function Parameters

Parameter Type Description
procUri String
rawSql String

Return value

Type Description
void

callProcedure

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
StoredProcedureResponse retVal = structuredApi.callProcedure(procUri, params);
retVal = baseAPI.doStructured_CallProcedure(procUri, params);

Entitlement: /structured/admin/$f(procUri)

Call a stored procedure a value

Function Parameters

Parameter Type Description
procUri String
params StoredProcedureParams

Return value

Type Description
StoredProcedureResponse
Types used in this function

StoredProcedureParams

Container for params for SQL procedure call: inParams(paramName->paramObject), outParams(paramName->java.sql.Types)

Field Type
inParams Map<String, Object>
outParams Map<String, Integer>
inOutParams Map<String, Object>

StoredProcedureResponse

Container for return types for SQL procedure calls

Field Type
callSuccessful Boolean
singleValueReturn Map<String, Object>

dropProcedureUsingSql

HttpStructuredApi structuredApi = new HttpStructuredApi(loginApi);
void retVal = structuredApi.dropProcedureUsingSql(procUri, rawSql);
retVal = baseAPI.doStructured_DropProcedureUsingSql(procUri, rawSql);

Entitlement: /structured/admin/$f(procUri)

Delete a stored procedure with raw SQL

Function Parameters

Parameter Type Description
procUri String
rawSql String

Return value

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