Socorro:ElasticSearch API: Difference between revisions
Jump to navigation
Jump to search
(Adding title + first line saying it's a draft.) |
m (Adding new lines.) |
||
Line 11: | Line 11: | ||
=== API Spec === | === API Spec === | ||
HTTP request: POST | HTTP request: POST<br> | ||
URI: /query/[(types)/] | URI: /query/[(types)/] | ||
Line 25: | Line 25: | ||
=== API Spec === | === API Spec === | ||
HTTP request: GET | HTTP request: GET<br> | ||
URI: /search/(types)/for/(terms)/in/(fields)/product/(product)/version/(version)/os/(os_name)/from/(from_date)/to/(to_date)/ | URI: /search/(types)/for/(terms)/in/(fields)/product/(product)/version/(version)/os/(os_name)/from/(from_date)/to/(to_date)/ | ||
Line 46: | Line 46: | ||
=== API Spec === | === API Spec === | ||
HTTP request: GET | HTTP request: GET<br> | ||
URI: /report/... | URI: /report/... | ||
Line 58: | Line 58: | ||
=== API Spec === | === API Spec === | ||
HTTP request: GET | HTTP request: GET<br> | ||
URI: /crash/(crash_id) | URI: /crash/(crash_id) | ||
* crash_id: Unique identifier of the crash to retrieve. | * crash_id: Unique identifier of the crash to retrieve. |
Revision as of 19:00, 4 May 2011
Middleware API for ElasticSearch
This is a draft of the new API for querying ElasticSearch through the middleware API of Socorro.
Query
Description
Low level query, just sends a JSON query to ES directly, and returns the result of this query.
API Spec
HTTP request: POST
URI: /query/[(types)/]
- types: Types of data we are looking into. If omitted, default value is _all. Several types can be specified, separated by a + symbol.
Search
Description
Searches for some terms in ES.
API Spec
HTTP request: GET
URI: /search/(types)/for/(terms)/in/(fields)/product/(product)/version/(version)/os/(os_name)/from/(from_date)/to/(to_date)/
- types: Type of data we are looking into. Can be set to _all to search into all types. Several types can be specified, separated by a + symbol.
- terms: Terms we are search for. Each term must be URL encoded. Several terms can be specified, separated by a + symbol.
- fields: Fields we are searching in. Several fields can be specified, separated by a + symbol.
- product: The product we are interested in. (e.g. Firefox, Fennec, Thunderbird... )
- version: Version of the product. Can be set to _all to search into all versions.
- os_name: Name of the Operating System. (e.g. Windows, Mac, Linux... )
- from_date: Search for crashes that happened after this date.
- to_date: Search for crashes that happened before this date.
Report
Description
Get a specific report.
API Spec
HTTP request: GET
URI: /report/...
Crash
Description
Searches a crash by it's OOID and returns it. This query is not supposed to use ES but HBase directly.
API Spec
HTTP request: GET
URI: /crash/(crash_id)
- crash_id: Unique identifier of the crash to retrieve.