Extension Config

To configure and customize your service plugin, you need to provide important details in the plugin.json configuration file.

Note

If you created your service plugin extension with the CLI, required fields are automatically populated for you.

Configuration Params
namespacestring

The namespace of the external database. This can be used to access collections within the database, for example namespace/collectionId.


uriConfigSpiBaseUri

The URI where the service provider is deployed.


Was this helpful?
Yes
No

insertDataItems( )

Important: This is a handler function. Implement it only as part of the service plugin.


Adds one or more items to a collection.

A data item object contains the _id and _owner fields. The response array must include the same items that were inserted, and each returned item must be added the _createdDate and _updatedDate fields.

However, data items can also be inserted without an _id field. In that case, it is the service provider's responsibility to generate a unique ID for each item.

Method Declaration
Copy
Method Parameters
payloadInsertDataItemsEnvelope
Returns
Return Type:InsertDataItemsResponse | Promise<InsertDataItemsResponse>
Was this helpful?
Yes
No