search_item

To find an item with a certain ID, use the core/search_item method.

Endpoint

Copied!
svc=core/search_item&params={
  "id": <long>,
  "flags": <long>
}

Parameters

The request must contain the following parameters:

Parameter Description
id Item ID.
flags Flags with properties for the response. The value of this parameter depends on the item type. The data formats of all item types and their flags are described in the Data format section.

Response

If the request is completed successfully, the response is returned in the following format:

Copied!
{
  "item": {         /* Found item. */
    ...
  },
  "flags": <uint>   /* Applied flags with properties. */
}

The format of the item parameter depends on the item type. All formats are described in the Data format section.

If the request fails, an error code is returned.

Error codes

Error code Description
6 No session.
7 One of the following errors:
  • Failed to get the current user.
  • Failed to find the item with the specified ID, or you have no View object and its basic properties access right to the item.
  • The item is not active.

If you find a mistake in the text, please select it and press Ctrl+Enter.