Search Directory Services

1 March 2019

  • C10 - added the optional flags, search, price and area parameters for land searches and require the page parameter for land searches.

4 February 2015

  • Release 7.62 - The directorysearch now returns the full list of matches based on the supplied criteria - the old behavior is that only the first most relevant (based on a scoring system) match would be returned. This means that the directorysearch command can now be used to return a list of matches instead of a single match. The results are still sorted in the order of relevant with most relevant being returned first. Since the results can now be rather large depending on the search criteria, it is recommended to use sifting to return only partial results.
  • Release 7.62 - The timeout parameter is no longer used.
directorysearch (Commands)
TypeCorrade progressive command
Commanddirectorysearch
DescriptionCorrade is able to search directory services for classifieds, events, groups, land, people and places.
Permissionsdirectory
Parametersgroup, password, type, name (The name parameter is optional for classified and event search type but required for all other search types.)
Last ChangesRelease 7.62 - now returns a full list of matches.

Corrade is able to search directory services for classifieds, events, groups, land, people and places.

Command Required Parameters Required Corrade Permissions Example
directorysearch group, password, type, name1) directory
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            "command", "directorysearch",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "type", "event",
            "name", "hunt"
        ]
    )
);
Parameter Possible Values Description
type classified, event, group, land, people, places The directory search type.

The results can be filtered using the optional data parameter which follows the libopenmetaverse data structures of each search type. In order to do so, supply a CSV list to the data parameter containing pairs of fields or properties and the desired value.

Parameter Possible Values Optional Parameter Structure Example
type classified data Classified
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            "command", "directorysearch",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "type", "classified",
            "name", "hunt",
            "timeout", 10000,
            "data", wasListToCSV(
                [
                    "Price",
                    73888
                ]
            ),
            "callback", wasURLEscape(URL)
        ]
    )
);
name A string to search the name by.
event data Event Search Data
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            "command", "directorysearch",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "type", "event",
            "name", "hunt",
            "timeout", 10000,
            "data", wasListToCSV(
                [
                    "Owner",
                    "fc785fe9-f15b-431d-9f2f-3104811095b"
                ]
            ),
            "callback", wasURLEscape(URL)
        ]
    )
);
name A string to search the name by.
group data Group Search Data
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            "command", "directorysearch",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "type", "group",
            "name", "Wizardry",
            "timeout", 10000,
            "data", wasListToCSV(
                [
                    "Members",
                    17
                ]
            ),
            "callback", wasURLEscape(URL)
        ]
    )
);
name A string to search the name by.
land data Directory Parcel
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            "command", "directorysearch",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "type", "land",
            "timeout", 10000,
            "page", 1,
            "data", wasListToCSV(
                [
                    "ActualArea",
                    4096,
                    "SalePrice",
                    1
                ]
            ),
            "callback", wasURLEscape(URL)
        ]
    )
);
flags Optional land find flags. Assumed to be set to SortAsc if not supplied.
search Optional search type flags. Assumed to be set to Any if not supplied.
price An optional maximum price to search land parcels by.
area An optional minimum land area to search parcels by.
page A required parameter as the index of the data returned (please see the Notes section).
people data Agent Search Data
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            "command", "directorysearch",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "type", "people",
            "name", "Roger",
            "timeout", 10000,
            "data", wasListToCSV(
                [
                    "Online",
                    "True"
                ]
            ),
            "callback", wasURLEscape(URL)
        ]
    )
);
name A string to search the name by.
places data Directory Parcel
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            "command", "directorysearch",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "type", "place",
            "name", "love",
            "timeout", 10000,
            "data", wasListToCSV(
                [
                    "ActualArea",
                    4096
                ]
            ),
            "callback", wasURLEscape(URL)
        ]
    )
);
name A string to search the name by.

Notes

  • When searching for land (typeland) on the SecondLife grid, the data server returns results zero-indexed by the page parameter (ie: page0 will return the first batch of results, page1 returns the second batch of results, etc…). Note that land searches in SecondLife are throttled as $1$ search per $5$ seconds. It is up to the user to ensure that searches are not performed more often than the official throttle.
  • Flags are passed as a CSV list, for instance, the following call will retrieve land parcels, sort them in ascending order, limited by area, including all maturity ratings larger than $4096m^{2}$ and just on the main land:
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            "command", "directorysearch",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "type", "land",
            "flags", wasListToCSV(
                [
                    "SortAsc",
                    "PerMeterSort",
                    "LimitByArea",
                    "IncludePG",
                    "IncludeMature",
                    "IncludeAdult"
                ]
            ),
            "page", 2,
            "area", "4096",
            "search", wasListToCSV(
                [
                    "Mainland"
                ]
            ),
            "timeout", 600000,
            "callback", wasURLEscape(URL)
        ]
    )
);
  • In case the command is sent without a data parameter, then the whole structure is returned. To ensure that the stride of the returned CSV list is know before issuing the command, make sure that a data parameter is sent along with the command.
  • In case land is searched, this command will not return the location of any found parcel (either region identifiers or global positions). However, if the location is needed, then the parcel UUID can be fed further to the getparcelinfodata command.
1)
The name parameter is optional for classified and event search type but required for all other search types.

secondlife/scripted_agents/corrade/api/commands/directorysearch.txt · Last modified: 2020/09/04 06:44 (external edit)

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the copyright, license, warranty and privacy terms for the usage of this website please see the license, privacy, copyright and the plagiarism pages.