# 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 |
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 |
The API Response
# async deleteRecord(record_id) → {Object}
Delete OSDU record
Parameters:
Name | Type | Description |
---|---|---|
record_id |
string | Record identifier of the OSDU record to delete |
The API Response
# async deleteSchema(kind) → {Object}
Delete a kind and it's associated schema
Parameters:
Name | Type | Description |
---|---|---|
kind |
string | Name of the kind to delete |
The API Response
# 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 |
The API Response
# 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 |
The API Response
# 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 |
The API Response
# 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 |
The API Response
# 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 |
The API Response
# 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 |
The API Response
# async queryAllKinds() → {Object}
Retrieve a list of all supported record kinds
The API Response
# async storeRecords(records) → {Object}
Upsert the provided records
Parameters:
Name | Type | Description |
---|---|---|
records |
Array.<Object> | List of JSON representations of the records to upsert |
The API Response