SDK
SDK Android v3.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

getSpecifications #

Retrieves the specifications linked to the collection object.


getSpecifications([options], callback) #

ArgumentsTypeDescription
optionsJSON ObjectOptional parameters
callbackfunctionCallback handling the response

Options #

OptionTypeDescriptionDefault
queuablebooleanMake this request queuable or nottrue

Usage #

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

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