Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

search_cases

search_cases(**kwargs)

Searches for cases within their associated Cases domain. Search results are returned as a paginated list of abridged case documents.

Note

For customer_id you must provide the full customer profile ARN in this format: arn:aws:profile:your AWS Region:your AWS account ID:domains/profiles domain name/profiles/profile ID .

See also: AWS API Documentation

Request Syntax

response = client.search_cases(
    domainId='string',
    fields=[
        {
            'id': 'string'
        },
    ],
    filter={
        'andAll': [
            {'... recursive ...'},
        ],
        'field': {
            'contains': {
                'id': 'string',
                'value': {
                    'booleanValue': True|False,
                    'doubleValue': 123.0,
                    'stringValue': 'string'
                }
            },
            'equalTo': {
                'id': 'string',
                'value': {
                    'booleanValue': True|False,
                    'doubleValue': 123.0,
                    'stringValue': 'string'
                }
            },
            'greaterThan': {
                'id': 'string',
                'value': {
                    'booleanValue': True|False,
                    'doubleValue': 123.0,
                    'stringValue': 'string'
                }
            },
            'greaterThanOrEqualTo': {
                'id': 'string',
                'value': {
                    'booleanValue': True|False,
                    'doubleValue': 123.0,
                    'stringValue': 'string'
                }
            },
            'lessThan': {
                'id': 'string',
                'value': {
                    'booleanValue': True|False,
                    'doubleValue': 123.0,
                    'stringValue': 'string'
                }
            },
            'lessThanOrEqualTo': {
                'id': 'string',
                'value': {
                    'booleanValue': True|False,
                    'doubleValue': 123.0,
                    'stringValue': 'string'
                }
            }
        },
        'not': {'... recursive ...'}
    },
    maxResults=123,
    nextToken='string',
    searchTerm='string',
    sorts=[
        {
            'fieldId': 'string',
            'sortOrder': 'Asc'|'Desc'
        },
    ]
)
Parameters
  • domainId (string) --

    [REQUIRED]

    The unique identifier of the Cases domain.

  • fields (list) --

    The list of field identifiers to be returned as part of the response.

    • (dict) --

      Object for unique identifier of a field.

      • id (string) -- [REQUIRED]

        Unique identifier of a field.

  • filter (dict) --

    A list of filter objects.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: andAll, field, not.

    • andAll (list) --

      Provides "and all" filtering.

      • (dict) --

        A filter for cases. Only one value can be provided.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: andAll, field, not.

    • field (dict) --

      A list of fields to filter on.

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: contains, equalTo, greaterThan, greaterThanOrEqualTo, lessThan, lessThanOrEqualTo.

      • contains (dict) --

        Object containing field identifier and value information.

        • id (string) -- [REQUIRED]

          Unique identifier of a field.

        • value (dict) -- [REQUIRED]

          Union of potential field value types.

          Note

          This is a Tagged Union structure. Only one of the following top level keys can be set: booleanValue, doubleValue, stringValue.

          • booleanValue (boolean) --

            Can be either null, or have a Boolean value type. Only one value can be provided.

          • doubleValue (float) --

            Can be either null, or have a Double number value type. Only one value can be provided.

          • stringValue (string) --

            String value type.

      • equalTo (dict) --

        Object containing field identifier and value information.

        • id (string) -- [REQUIRED]

          Unique identifier of a field.

        • value (dict) -- [REQUIRED]

          Union of potential field value types.

          Note

          This is a Tagged Union structure. Only one of the following top level keys can be set: booleanValue, doubleValue, stringValue.

          • booleanValue (boolean) --

            Can be either null, or have a Boolean value type. Only one value can be provided.

          • doubleValue (float) --

            Can be either null, or have a Double number value type. Only one value can be provided.

          • stringValue (string) --

            String value type.

      • greaterThan (dict) --

        Object containing field identifier and value information.

        • id (string) -- [REQUIRED]

          Unique identifier of a field.

        • value (dict) -- [REQUIRED]

          Union of potential field value types.

          Note

          This is a Tagged Union structure. Only one of the following top level keys can be set: booleanValue, doubleValue, stringValue.

          • booleanValue (boolean) --

            Can be either null, or have a Boolean value type. Only one value can be provided.

          • doubleValue (float) --

            Can be either null, or have a Double number value type. Only one value can be provided.

          • stringValue (string) --

            String value type.

      • greaterThanOrEqualTo (dict) --

        Object containing field identifier and value information.

        • id (string) -- [REQUIRED]

          Unique identifier of a field.

        • value (dict) -- [REQUIRED]

          Union of potential field value types.

          Note

          This is a Tagged Union structure. Only one of the following top level keys can be set: booleanValue, doubleValue, stringValue.

          • booleanValue (boolean) --

            Can be either null, or have a Boolean value type. Only one value can be provided.

          • doubleValue (float) --

            Can be either null, or have a Double number value type. Only one value can be provided.

          • stringValue (string) --

            String value type.

      • lessThan (dict) --

        Object containing field identifier and value information.

        • id (string) -- [REQUIRED]

          Unique identifier of a field.

        • value (dict) -- [REQUIRED]

          Union of potential field value types.

          Note

          This is a Tagged Union structure. Only one of the following top level keys can be set: booleanValue, doubleValue, stringValue.

          • booleanValue (boolean) --

            Can be either null, or have a Boolean value type. Only one value can be provided.

          • doubleValue (float) --

            Can be either null, or have a Double number value type. Only one value can be provided.

          • stringValue (string) --

            String value type.

      • lessThanOrEqualTo (dict) --

        Object containing field identifier and value information.

        • id (string) -- [REQUIRED]

          Unique identifier of a field.

        • value (dict) -- [REQUIRED]

          Union of potential field value types.

          Note

          This is a Tagged Union structure. Only one of the following top level keys can be set: booleanValue, doubleValue, stringValue.

          • booleanValue (boolean) --

            Can be either null, or have a Boolean value type. Only one value can be provided.

          • doubleValue (float) --

            Can be either null, or have a Double number value type. Only one value can be provided.

          • stringValue (string) --

            String value type.

    • not (dict) --

      A filter for cases. Only one value can be provided.

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: andAll, field, not.

  • maxResults (integer) -- The maximum number of cases to return. The current maximum supported value is 25. This is also the default value when no other value is provided.
  • nextToken (string) -- The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
  • searchTerm (string) -- A word or phrase used to perform a quick search.
  • sorts (list) --

    A list of sorts where each sort specifies a field and their sort order to be applied to the results.

    • (dict) --

      A structured set of sort terms.

      • fieldId (string) -- [REQUIRED]

        Unique identifier of a field.

      • sortOrder (string) -- [REQUIRED]

        A structured set of sort terms

Return type

dict

Returns

Response Syntax

{
    'cases': [
        {
            'caseId': 'string',
            'fields': [
                {
                    'id': 'string',
                    'value': {
                        'booleanValue': True|False,
                        'doubleValue': 123.0,
                        'stringValue': 'string'
                    }
                },
            ],
            'tags': {
                'string': 'string'
            },
            'templateId': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • cases (list) --

      A list of case documents where each case contains the properties CaseId and Fields where each field is a complex union structure.

      • (dict) --

        A list of items that represent cases.

        • caseId (string) --

          A unique identifier of the case.

        • fields (list) --

          List of case field values.

          • (dict) --

            Object for case field values.

            • id (string) --

              Unique identifier of a field.

            • value (dict) --

              Union of potential field value types.

              Note

              This is a Tagged Union structure. Only one of the following top level keys will be set: booleanValue, doubleValue, stringValue. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

              'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
              
              • booleanValue (boolean) --

                Can be either null, or have a Boolean value type. Only one value can be provided.

              • doubleValue (float) --

                Can be either null, or have a Double number value type. Only one value can be provided.

              • stringValue (string) --

                String value type.

        • tags (dict) --

          A map of of key-value pairs that represent tags on a resource. Tags are used to organize, track, or control access for this resource.

          • (string) --
            • (string) --
        • templateId (string) --

          A unique identifier of a template.

    • nextToken (string) --

      The token for the next set of results. This is null if there are no more results to return.

Exceptions

  • ConnectCases.Client.exceptions.InternalServerException
  • ConnectCases.Client.exceptions.ResourceNotFoundException
  • ConnectCases.Client.exceptions.ValidationException
  • ConnectCases.Client.exceptions.ThrottlingException
  • ConnectCases.Client.exceptions.AccessDeniedException