Excerpt |
---|
Manage facets on a project. |
Methods
Table of Contents | ||
---|---|---|
|
Get Facets
GET https://squirro-endpoint/api/topic/v0/(string: tenant)/projects/(id: project_id)/facets
Returns the known facets on a project. Every keyword that has ever been seen in the project's index will be included here.
Note: facets are never removed from an index.
Parameters: |
|
---|---|
Headers: | See Common Headers. |
Status Codes: |
See also Common Status Codes. |
Returns: | Response fields:
|
|
Create Facet
POST https://squirro-endpoint/api/topic/v0/(string: tenant)/projects/(id: project_id)/facets
Changes the settings for a single facet.
Parameters: |
| |||||||
---|---|---|---|---|---|---|---|---|
JSON Data: | Data is passed in as a JSON object. Valid object keys:
Only the name key is required. All other keys are optional. Example request body:
| |||||||
Headers: | See Common Headers. | |||||||
Status Codes: |
See also Common Status Codes. | |||||||
Returns: | The created facet.
|
Get Facet
GET https://squirro-endpoint/api/topic/v0/(string: tenant)/projects/(id: project_id)/facets/(id: facet_id)
Returns a single facet from the project.
Parameters: |
| |||||||
---|---|---|---|---|---|---|---|---|
Headers: | See Common Headers. | |||||||
Status Codes: |
See also Common Status Codes. | |||||||
Returns: | The facet.
|
Update Facet
PUT https://squirro-endpoint/api/topic/v0/(string: tenant)/projects/(id: project_id)/facets/(id: facet_id)
Changes the settings for a single facet.
Parameters: |
| |||||||
---|---|---|---|---|---|---|---|---|
JSON Data: | Data is passed in as a JSON object. Valid object keys:
All keys are optional and keys that are not passed in are not modified. Example request body:
| |||||||
Headers: | See Common Headers. | |||||||
Status Codes: |
See also Common Status Codes. | |||||||
Returns: | The updated facet.
|
...
Data Types
Facets have an associated data type. That data type is validated when data flows into the system.
The following table documents the available data types and example JSON values for each type.
Data type | Details | Example |
---|---|---|
string | This is the default type. Used for any sequence of characters (Unicode allowed). | "Any string here" |
int | Numeric data type for integers. | 12 |
float | Numeric data type for floating point numbers. | 189.421 |
datetime | Date/time values. Follows Squirro's standard date and time format and should be in the UTC time zone for best results. | "2015-06-06T06:28:12" |