API- Table of responses to discovery command
Describes the structure and content of a response to the discovery command, particularly useful to check what is mandatory.
Discovery commands and their response.
| Structure | Type | Required | Description | |||
|---|---|---|---|---|---|---|
| discovery | object | Yes | the name of the command that was requested | |||
| commands | array (of objects) | Yes | array of all supported commands | |||
| command | value | Yes | the name of the command | |||
| description | value | Yes | simple description of command functionality | |||
| notes | value | No | extra information | |||
| parameters | array (of objects) | NO | array of all parameters this command supports | |||
| name | value | Yes | name of the parameter | |||
| description | value | Yes | simple description of the parameter | |||
| required | boolean | Yes | is this parameter mandatory? true|false | |||
| format | value | No | This field provides information about the format of the parameter. This is used by the API to validate the format received and to provide clues and a means for API consumers to present input fields and perform validation before sending the command to the server. Possible values:
where regex is the actual regular expression and must be compatible with both .NET and Javascript regex syntax. (Note: not validated on Server at the moment) If format is set, the server will enforce it. The server will attempt to cast strings to the type specified. For example, "123.4" and 123.4 are acceptable values. | |||
| accepts | array (of values) | No | This is an array of values that the command accepts in this filed. Ie. For language, this could be ['en','ru']. Note that accepted values are case insensitive, so any of following values are acceptable ['en', 'EN', 'En', 'ru', 'RU', 'Ru']. Values in this array must pass the format value, if defined. If accepts is missing, or null, then the field is not limited. If accepts is an empty array, then no values are permitted (i.e. the field cannot currently be set). | |||