getSpecifications #
Retrieves the specifications linked to the collection object.
getSpecifications([options], callback) #
Arguments | Type | Description |
---|---|---|
options | JSON Object | Optional parameters |
callback | function | Callback handling the response |
Options #
Option | Type | Description | Default |
---|---|---|---|
queuable | boolean | Make this request queuable or not | true |
Usage #
// Using callbacks (NodeJS or Web Browser)
kuzzle
.collection('collection', 'index')
.getSpecifications(function (error, specifications) {
// specifications is a JSON object
});
// Using promises (NodeJS)
kuzzle
.collection('collection', 'index')
.getSpecificationsPromise()
.then(specifications => {
// specifications is a JSON object
});
Callback response
{
"validation": {
"strict": "true",
"fields": {
"foo": {
"mandatory": "true",
"type": "string",
"defaultValue": "bar"
}
}
},
"index": "index",
"collection": "collection"
}
Edit this page on Github(opens new window)