- Home
- Resources
- SearchService v2
A set of services related to searching of result files
POST /v2/result/search
Performs a general search of result files. See request example and SearchParameters for how to provide criteria to narrow the search.
The provided SearchParameters object need to have at least a 'from' attribute.
If the query is too broad, a 400 is returned, see response codes.
If the query succeeds inside 3 seconds, the results are returned immediately but otherwise the results will be available via a link. See Response Codes for more info.
Request Parameters
name |
type |
description |
auth-token |
header |
The authentication token. |
Request Body
media type |
data type |
application/json |
SearchParameters
(JSON) |
Response Codes
code |
condition |
type |
200 |
The results are returned immediately. |
|
202 |
The results will be available via the returned link. |
|
400 |
Query to broad, try to narrow down your critiera by using a date range less than a month or adding wcus, cars, labels or taskIDs to your query. |
|
Response Body
media type |
data type |
description |
application/json |
array of Task_v2
(JSON) |
|
Example
Request
POST /v2/result/search
Content-Type: application/json
Accept: application/json
auth-token: ...
{
"from" : 1483228800,
"to" : 1485907200,
"filename_regexp" : "sohdata_parsed",
"wcus" : [ "wcu-123" ]
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"task-id" : 7533,
"car" : "vin-123",
"wcu-id" : "wcu-123",
"results" : [ {
"file-type" : "SOH",
"file-sub-type" : "NO_SUBTYPE",
"dates" : [ {
"date" : 1484438400,
"num-files" : 11,
"file-size" : 75
}, {
"date" : 1484524800,
"num-files" : 5,
"file-size" : 36
}, {
"date" : 1484611200,
"num-files" : 6,
"file-size" : 24
}, {
"date" : 1484697600,
"num-files" : 1,
"file-size" : 7
} ]
} ]
} ]
POST /v2/result/search
Like POST SearchService v2 but produces results of type Task_v3[].
Request Parameters
name |
type |
description |
auth-token |
header |
The authentication token. |
Request Body
media type |
data type |
application/json |
SearchParameters
(JSON) |
Response Codes
code |
condition |
type |
200 |
The results are returned immediately. |
|
202 |
The results will be available via the returned link. |
|
400 |
Query to broad, try to narrow down your critiera by using a date range less than a month or adding wcus, cars, labels or taskIDs to your query. |
|
Response Body
media type |
data type |
description |
application/vnd.se.alkit.wice.searchservice-v3+json |
array of Task_v3
(JSON) |
|
Example
Request
POST /v2/result/search
Content-Type: application/json
Accept: application/vnd.se.alkit.wice.searchservice-v3+json
auth-token: ...
{
"from" : 1483228800,
"to" : 1485907200,
"filename_regexp" : "sohdata_parsed",
"wcus" : [ "wcu-123" ]
}
Response
HTTP/1.1 200 OK
Content-Type: application/vnd.se.alkit.wice.searchservice-v3+json
{
"task-id" : 12345,
"car" : "vin-123",
"wcu-id" : "wcu-123",
"results" : [ {
"file-type" : "SOH",
"file-sub-type" : "NO_SUBTYPE",
"dates" : [ {
"date" : 1462752000,
"id" : 18603262,
"fileName" : "sohdata_parsed.log",
"file-size" : 5
} ]
} ]
}
POST /v2/result/search/latest
Search the latest result and log files for the provided vehicles the requesting user has access to.
At least one vehicle VIN (via SearchParameters#carVINs) or one wcu ID (via SearchParameters#wcuIDs)
need to be provided. A time slice can be provided by setting SearchParameters#from and SearchParameters#to,
Further, if only a specific file type is of interest, this can be filtered by setting SearchParameters#resultFileTypes.
Request Parameters
name |
type |
description |
auth-token |
header |
The authentication token. |
Request Body
media type |
data type |
application/json |
SearchParameters
(JSON) |
Response Codes
code |
condition |
type |
200 |
The results are returned immediately. |
|
202 |
The results will be available via the returned link. |
|
400 |
Query to broad, try to narrow down your critiera by using a date range less than a month or adding wcus, cars, labels or taskIDs to your query. |
|
400 |
You have to provide at least one VIN or one WCU ID. |
|
400 |
SearchParameters#fileNameRegExp is not supported. |
|
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
|
Example
Request
POST /v2/result/search/latest
Content-Type: application/json
Accept: application/json
auth-token: ...
{
"cars" : [ "abc123" ],
"from" : 1614729600,
"to" : 1614816000
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
GET /v2/result/search/{uuid}
Get the search results for the provided UUID.
By default the first 25 result rows are returned and the next can be fetched by doing a subsequent query with offset=25 etc.
Request Parameters
name |
type |
description |
default |
constraints |
auth-token |
header |
The authentication token. |
|
|
uuid |
path |
The UUID that identifies the search results. |
|
required |
limit |
query |
Limits the number of results. |
25 |
int |
offset |
query |
The offset to use. |
0 |
int |
Response Body
media type |
data type |
description |
application/json |
PartialResult
(JSON) |
|
Example
Request
GET /v2/result/search/{uuid}
Content-Type: */*
Accept: application/json
auth-token: ...
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"count" : 1,
"offset" : 0,
"limit" : 25,
"total" : 1,
"data" : [ {
"task-id" : 1234,
"car" : "VIN_123",
"wcu-id" : "WCU_123",
"results" : [ {
"file-type" : "SOH",
"file-sub-type" : "NO_SUBTYPE",
"dates" : [ {
"date" : 1462752000,
"id" : 18603262,
"fileName" : "sohdata_parsed.log",
"file-size" : 5
} ]
} ]
} ]
}
GET /v2/result/search/{uuid}
Like GET SearchService v2 but the returned type for PartialResult data is Task_v3.
Request Parameters
name |
type |
description |
default |
constraints |
auth-token |
header |
The authentication token. |
|
|
uuid |
path |
|
|
required |
limit |
query |
|
25 |
int |
offset |
query |
|
0 |
int |
Response Body
media type |
data type |
description |
application/vnd.se.alkit.wice.searchservice-v3+json |
PartialResult
(JSON) |
|
Example
Request
GET /v2/result/search/{uuid}
Content-Type: */*
Accept: application/vnd.se.alkit.wice.searchservice-v3+json
auth-token: ...
...
Response
HTTP/1.1 200 OK
Content-Type: application/vnd.se.alkit.wice.searchservice-v3+json
{
"count" : 1,
"offset" : 0,
"limit" : 25,
"total" : 1,
"data" : [ {
"task-id" : 1234,
"car" : "VIN_123",
"wcu-id" : "WCU_123",
"results" : [ {
"file-type" : "SOH",
"file-sub-type" : "NO_SUBTYPE",
"dates" : [ {
"date" : 1462752000,
"id" : 18603262,
"fileName" : "sohdata_parsed.log",
"file-size" : 5
} ]
} ]
} ]
}
GET /v2/result/search/latest/{uuid}
Get the search results (like GET SearchService v2) but is used when getting the latest
search results produced by POST SearchService v2.
Request Parameters
name |
type |
description |
default |
constraints |
auth-token |
header |
The authentication token. |
|
|
uuid |
path |
|
|
required |
limit |
query |
|
25 |
int |
offset |
query |
|
0 |
int |
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
|
Example
Request
GET /v2/result/search/latest/{uuid}
Content-Type: */*
Accept: application/json
auth-token: ...
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
...