ListSearches
Lists the searches in a workspace, most recently started first. Results can be narrowed with optional filters (status, search type, group, and started-at time range) and are paginated: when nextToken is present, pass it on a subsequent call to retrieve the next page.
Request Syntax
POST /workspaces/workspaceName/searches/list HTTP/1.1
Content-type: application/json
{
"listSearchesFilters": {
"groupIdFilter": [ "string" ],
"searchTypeFilter": [ "string" ],
"startedAfter": number,
"startedBefore": number,
"statusFilter": [ "string" ]
},
"maxResults": number,
"nextToken": "string"
}
URI Request Parameters
The request uses the following URI parameters.
- workspaceName
-
The name of the workspace whose searches are listed.
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
^[a-zA-Z0-9_-]+$Required: Yes
Request Body
The request accepts the following data in JSON format.
- listSearchesFilters
-
Optional filters that restrict which searches are returned.
Type: ListSearchesFilters object
Required: No
- maxResults
-
The maximum number of searches to return in a single page. Valid range is 1 to 1,000; if omitted, a service-defined default is used.
Type: Integer
Valid Range: Minimum value of 1. Maximum value of 1000.
Required: No
- nextToken
-
The pagination token returned by a previous ListSearches call. Provide it to retrieve the next page; omit it to retrieve the first page.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 4096.
Pattern:
[A-Za-z0-9+/=]+Required: No
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"nextToken": "string",
"searchSummaries": [
{
"groupId": "string",
"queryStatement": "string",
"searchId": "string",
"searchType": "string",
"startedAt": number,
"status": "string",
"statusReason": "string",
"workspaceName": "string"
}
]
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- nextToken
-
The pagination token to use in a subsequent ListSearches call to retrieve the next page. Absent when there are no more searches.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 4096.
Pattern:
[A-Za-z0-9+/=]+ - searchSummaries
-
A page of search summaries, most recently started first.
Type: Array of SearchSummary objects
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AccessDeniedException
-
Access is denied.
HTTP Status Code: 403
- InternalFailureException
-
AWS IoT SiteWise can't process your request right now. Try again later.
HTTP Status Code: 500
- InvalidRequestException
-
The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again.
HTTP Status Code: 400
- ResourceNotFoundException
-
The requested resource can't be found.
HTTP Status Code: 404
- ThrottlingException
-
Your request exceeded a rate limit. For example, you might have exceeded the number of AWS IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on.
For more information, see Quotas in the AWS IoT SiteWise User Guide.
HTTP Status Code: 429
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: