IoTSiteWise / Client / list_searches

list_searches

IoTSiteWise.Client.list_searches(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.list_searches(
    workspaceName='string',
    maxResults=123,
    nextToken='string',
    listSearchesFilters={
        'statusFilter': [
            'QUEUED'|'RUNNING'|'SUCCEEDED'|'FAILED',
        ],
        'startedAfter': datetime(2015, 1, 1),
        'startedBefore': datetime(2015, 1, 1),
        'groupIdFilter': [
            'string',
        ],
        'searchTypeFilter': [
            'DEEP'|'QUICK',
        ]
    }
)
Parameters:
  • workspaceName (string) –

    [REQUIRED]

    The name of the workspace whose searches are listed.

  • maxResults (integer) – 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.

  • nextToken (string) – The pagination token returned by a previous ListSearches call. Provide it to retrieve the next page; omit it to retrieve the first page.

  • listSearchesFilters (dict) –

    Optional filters that restrict which searches are returned.

    • statusFilter (list) –

      Returns only searches whose status is one of the listed values.

      • (string) –

        The lifecycle status of a search.

    • startedAfter (datetime) –

      Returns only searches started at or after this time.

    • startedBefore (datetime) –

      Returns only searches started at or before this time.

    • groupIdFilter (list) –

      Returns only searches whose groupId is one of the listed values.

      • (string) –

        A caller-supplied identifier used to group related searches together.

    • searchTypeFilter (list) –

      Returns only searches whose searchType is one of the listed values.

      • (string) –

        The search strategy, which trades off latency against recall. DEEP runs the full semantic and structured search for the highest-quality matches; QUICK returns faster, lower-recall results. When searchType is omitted on a request, the search defaults to QUICK.

Return type:

dict

Returns:

Response Syntax

{
    'searchSummaries': [
        {
            'searchId': 'string',
            'workspaceName': 'string',
            'status': 'QUEUED'|'RUNNING'|'SUCCEEDED'|'FAILED',
            'queryStatement': 'string',
            'searchType': 'DEEP'|'QUICK',
            'statusReason': 'string',
            'startedAt': datetime(2015, 1, 1),
            'groupId': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    Output of the ListSearches operation.

    • searchSummaries (list) –

      A page of search summaries, most recently started first.

      • (dict) –

        A summary of a single search as returned by ListSearches.

        • searchId (string) –

          The unique identifier of the search.

        • workspaceName (string) –

          The name of the workspace the search runs against.

        • status (string) –

          The current status of the search.

        • queryStatement (string) –

          The natural-language query that was submitted for the search.

        • searchType (string) –

          The search strategy used for the search.

        • statusReason (string) –

          A human-readable explanation of the current status. Populated when the search has FAILED.

        • startedAt (datetime) –

          The time at which the search was started.

        • groupId (string) –

          The group identifier associated with the search, if one was supplied on the request.

    • nextToken (string) –

      The pagination token to use in a subsequent ListSearches call to retrieve the next page. Absent when there are no more searches.

Exceptions