/
datacode_category_search()

datacode_category_search()

Function prototype

datacode_category_search (session, search_str, [max_res], [offset])

API Version

2.7.26 and higher

Supported interfaces

SOAP, REST

Description

Searches a DATACODE category by its description

This functions allows to search for DATACODE categories. The search string can be any part of the description.

The search is performed over all existing languages, though the active session language is prioritized.

The list returned is sorted as follows:

  • First results are the ones found in the active session language

  • Then results found in English

  • Finally results in other languages

Function parameters

Input parameters:

  • session: is the session token obtained in the session_init() call

  • search_str: string to search

  • max_res: Maximum number of results that the function can return. Used for pagination

  • offset: Base 1 position of the of the first DATACODE category returned in the list. Used for pagination

Output parameters:

  • result: List of datacodes that match the search string.

    • total: total number of datacodes found that match the search string. This value is not the number of DATACODE categories returned if a max_res has been specified. Is the real total number of DATACODE categories.

    • list: The information returned for each category is:

      • ref: reference of the category

      • description: Description of the category in the language in which it matched the search string

      • lang: Language in which it matched the search string

  • ErrorMsg: If any error occurs, then this value contains a description of the error translated to the current language

  • ErrorCode: If any error occurs, then this value contains any of the standard ERROR CODES

Request example

datacode_category_search ( “LCAAAAAAAAAAAA”, "pressure")

Response

The response format is XML when the function has been invoked via the SOAP API, and JSON when it has been invoked via the REST API

Return Error codes

ERROR CODE



ERROR CODE



INVALID_TOKEN

The session token provided is not valid



Related content