To configure and customize your service plugin, you need to provide important details in the plugin.json
configuration file.
If you created your service plugin extension with the CLI, required fields are automatically populated for you.
The namespace of the external database. This can be used to access collections within the database, for example namespace/collectionId
.
The URI where the service provider is deployed.
{
"namespace": "@your-account-name/your-app-name",
"uriConfig": {
"baseUri": "https://my-external-database-app.com/",
"alternativeUris": {
"absoluteUri": "https://www.my-external-database-app.com/my-create-collection",
"methodName": "CreateCollection"
}
}
}
Important:
Runs an aggregation query on the specified data collection and returns the resulting list of items.
Important:
Counts the number of items in the specified data collection that match the filtering preferences.
Important:
Creates a new data collection.
Important:
Deletes a data collection.
Important:
Lists the global capabilities the external database supports.
Important:
Inserts one or more item references into a referring field of the specified item.
Important:
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.
Important:
Retrieves a list of data collections and their details.
When collectionIds
is empty, all existing collections are returned.
If a specified collection does not exist, that collection can be ignored.