advancedSearch


SoftLayer_Search::advancedSearch

Search for SoftLayer Resources by simple terms.

Description

This method allows for searching for SoftLayer resources by simple terms and operators. Fields that are used for searching will be available at sldn.softlayer.com. It returns a collection or array of SoftLayer_Container_Search_Result objects that have search metadata for each result and the resulting resource found.

The advancedSearch() method recognizes the special _objectType: quantifier in search strings. See the documentation for the SoftLayer_Search::search method on how to restrict searches using object types.

The advancedSearch() method recognizes SoftLayer_Container_Search_ObjectType_Property, which can also be used to limit searches. Example:

_objectType:Type_1 propertyA:value

A search string can specify multiple properties, separated with spaces. Example:

_objectType:Type_1 propertyA:value propertyB:value

A collection of available object types and their properties can be retrieved by calling the SoftLayer_Search::getObjectTypes method.

Exact Match on Text Fields

To enforce an exact match on text fields, encapsulate the term in double quotes. For example, given a set of device host names:

  • baremetal-a
  • baremetal-b
  • a-virtual-guest
  • b-virtual-guest
  • edge-router

An exact search (double-quote) for “baremetal-a” will return only the exact match of baremetal-a.

A fuzzy search (no double-quote) for baremetal-a will return baremetal-a, baremetal-b, a-virtual-guest, b-virtual-guest but will omit edge-router.


Parameters

Name Type Description
searchString string A string with search terms.

Required Headers

Optional Headers

Return Values

curl -g -u $SL_USER:$SL_APIKEY -X POST -d '{"parameters": [string]}' \
'https://api.softlayer.com/rest/v3.1/SoftLayer_Search/advancedSearch'