A JSON array that defines the sort methods to use for the GetResources results.
The array specifies the sort methods in the order to apply them. Answer Server sorts the results according to the first method. If there are any tied results, it sorts them according to the second method, and so on.
Each sort specifier is a JSON object, with one or more of the following properties:
(Required) sort_by. The resource attribute to sort by. This property accepts the following possible values:
Ask
actions (for more information, see PopularityWindowDays). This option applies to question_equivalence_class resources only.ascending. Whether to sort in ascending order. This is a Boolean property. The default value is true.
metadata_key. (Required when sort_by is set to metadata) The metadata field to sort by.
metadata_type. The data type of the metadata values that you want to sort by, when sort_by is set to metadata. This property accepts the following values:
NOTE: All the properties and options are case sensitive.
To get a full JSON schema for Sort
, send the GetResources action with Type set to schema
.
Actions: | GetResources
|
Type: | String |
Default: | all |
Example: | Sort=[{"sort_by":"metadata","metadata_key":"AUTHOR","metadata_type":"text"}]
|
See Also: | IDs |
|