Class

OsduV2StorageService

OsduV2StorageService(osdu_client, data_partition)

Class that provides named access to OSDU V2 Storage endpoints

Constructor

# new OsduV2StorageService(osdu_client, data_partition)

Parameters:
Name Type Description
osdu_client BaseOsduClient

An implementation of the OSDU client class to broker communication with the OSDU API

data_partition string

The data partition against which requests will be made

View Source service/storage/v2.js, line 11

Methods

# async createSchema(kind, schema, ext) → {Object}

Create a new schema to register a new kind

Parameters:
Name Type Description
kind string

Name of the new kind to create

schema Object

JSON representation of the kind's schema

ext Object

JSON representation of the schema extensions

View Source service/storage/v2.js, line 112

The API Response

Object

# async deleteRecord(record_id) → {Object}

Delete OSDU record

Parameters:
Name Type Description
record_id string

Record identifier of the OSDU record to delete

View Source service/storage/v2.js, line 75

The API Response

Object

# async deleteSchema(kind) → {Object}

Delete a kind and it's associated schema

Parameters:
Name Type Description
kind string

Name of the kind to delete

View Source service/storage/v2.js, line 120

The API Response

Object

# async getRecord(record_id) → {Object}

Get OSDU records for the specified id

Parameters:
Name Type Description
record_id string

Record identifier of the OSDU record to retrieve

View Source service/storage/v2.js, line 42

The API Response

Object

# async getRecords(record_ids, attributes) → {Object}

Get OSDU records for the specified ids

Parameters:
Name Type Description
record_ids Array.<string>

Record identifiers of the OSDU records to retrieve

attributes Array.<string>

Attributes to return

View Source service/storage/v2.js, line 28

The API Response

Object

# async getRecordVersion(record_id, version) → {Object}

Get OSDU record for the specified id at the specified version

Parameters:
Name Type Description
record_id string

Record identifier of the OSDU record to retrieve

version string

Version id to retrieve

View Source service/storage/v2.js, line 59

The API Response

Object

# async getRecordVersions(record_id) → {Object}

Get OSDU record versions for the specified id

Parameters:
Name Type Description
record_id string

Record identifier of the OSDU record to retrieve version data

View Source service/storage/v2.js, line 50

The API Response

Object

# async getSchema(kind) → {Object}

Get OSDU schema for a given kind

Parameters:
Name Type Description
kind string

Name of the kind to retrieve the schema

View Source service/storage/v2.js, line 102

The API Response

Object

# async ingestManifest(manifest) → {Object}

Ingest a manifest containing linked records

Parameters:
Name Type Description
manifest Object

JSON representation of the manifest to process and ingest

View Source service/storage/v2.js, line 85

The API Response

Object

# async queryAllKinds() → {Object}

Retrieve a list of all supported record kinds

View Source service/storage/v2.js, line 94

The API Response

Object

# async storeRecords(records) → {Object}

Upsert the provided records

Parameters:
Name Type Description
records Array.<Object>

List of JSON representations of the records to upsert

View Source service/storage/v2.js, line 67

The API Response

Object