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

Copied to clipboard!

kuzzle
  .collection("collection", "index")
  .getSpecifications(new ResponseListener<JSONObject>() {
    @Override
    public void onSuccess(JSONObject specifications) {
      // specifications is a JSONObject
    }

  @Override
  public void onError(JSONObject error) {
    // Handle error
    }
  });

Callback response

Copied to clipboard!
{
  "validation": {
    "strict": "true",
    "fields": {
      "foo": {
        "mandatory": "true",
        "type": "string",
        "defaultValue": "bar"
      }
    }
  },
  "index": "index",
  "collection": "collection"
}