Deepser Deepser
  • Documentation
  • Start Free Trial
Start Free Trial
Deepser Deepser
Start Free Trial
Deepser
  • Documentation
  • Start Free Trial
loading
  1. Home
  2. Documentation
  3. Deepser API
  4. Multiple Retrieve
Updated on May 26, 2025

Documentation

  • Access and Visibility
    • Resources
    • Roles
    • Creating and Managing Roles in Deepser
    • Creating a new user
    • Password Reset
    • New User Registration
    • LDAP Configuration
    • SSO Deepser Configuration
    • SSO Login/Provisioning Configuration – Azure
    • Multi Factor
    • Groups
    • Groups Creation
    • Manage Users in Groups
    • Company
    • Companies in Deepser
    • Company Creation
    • Parent Companies
    • Email Domains
    • Sync Account CRM Companies
    • Advanced Sync
    • Visibility management in Deepser
    • Permission and Visibility Handling
    • Groups and Rules Definition
    • End Users Visibility Overview
    • Entities Portal Visibility
    • Empowered End User (EEU)
    • Company Supervisors
    • Additional Companies
    • Access Groups
    • Access Users
  • Activity, Worklogs & Comments
    • DeepActivity Comments
    • Placing a comment
    • Comments System Configuration
    • DeepActivity Worklog
    • Entering a Worklog
    • Enabling Worklogs in the User Portal
    • Worklog Global Grid
    • Worklog Global Grid Configuration
    • Activity Global Grid Advanced Configuration
  • Board
    • Enable groups to create boards
    • Creating a FreeForm Board
    • Creating and customizing a Lane
    • Entry Creation
    • Board Live
    • Live Board Creation
    • Advanced Live Board Configuration
    • Creating and customizing a Lane
    • Creation and Advanced Configuration of a Lane and Drop Code
  • Categories
    • Category Overview
    • Category Configuration
    • Category Usage
  • Chat
    • Using the Chat
    • Enabling the Chat on Portals
    • Chat Rooms and Moderators
    • Public Chat
    • Configure a Public Chat Widget
    • Chatbot
    • Chatbot Flow – Example
  • CMDB
    • Deepser CMDB
    • Enable CMDB in the User Portal
    • User Portal CMDB Grid Configuration
    • Advanced Configuration of CMDB Grids
    • Class, Type and Subtype
    • Configuring a CI
  • CRM
    • Deep CRM
    • Creating an account in the CRM
    • Creating a contact in the CRM
    • Creating an opportunity in the CRM
    • Contact Types in CRM
    • Opportunity Types in CRM
    • CRM Lists
    • Sync Contacts and Accounts
    • Address Functioning
    • Sales
    • Mailchimp Integration
  • Deepser API
    • API Notions
    • API Endpoint and URL
    • API Verbs and Format
    • API Authentication
    • API Main Methods
    • Retrieve
    • Multiple Retrieve
    • Create
    • Update
    • Delete
    • API Entities
    • API Company
    • User API
    • Group API
    • Service Operation API
    • Service Type API
    • Activity API
    • CMDB CI API
  • Deepser Fundamentals
    • Deepser Backend
    • Deepser User Menu
    • Deepser Navigation Menu
    • Global Search Usage
    • Deepser Home Page
    • Grids
    • Filters and Order
    • Export Data
    • Mass Action
    • Mass Action Configuration
    • Grid Creation and Cloning
    • Configuring Grids
    • Advanced Collection Configuration
    • Grids Render and Options Configuration
    • Grids Custom Options Configurations
    • Grids Renderer Tooltip Example
    • Grids Renderer Link Example
    • Grids System Configuration
    • Form Template Theory
    • FormTemplates
    • FormTemplates Structure and Buttons
    • Form Template Selection and Creation
    • Form Template Configuration
    • Form Template Structure Configuration
    • Formtemplates Fieldset Configuration
    • Formtemplates Buttons Configuration
    • Formtemplates Field Configuration
    • Advanced Form Template Rules
    • Custom Button Configuration
    • Buttons Conditional Hiding
    • User Portal
    • Browsing the user portal
    • Managing Tickets in The User Portal
    • User Portal Additional Features
    • Configuring Portal Groups
    • Configuring Portal Requests
    • Configuring Service Operations in the User Portal
    • Enabling Other Modules in the User Portal
    • Enabling Other Modules in the User Portal Grid
    • Guest Portal
    • Enabling the Guest Portal
    • Guest Portal Visibility Configuration Overview
    • Enabling Service Types on the Guest Portal
    • Adding a Portal Group in the Guest Portal
    • Adding a Portal Request in the Guest Portal
    • Editing Form Templates in the Guest Portal
    • Enabling Categories in the Guest Portal
    • Enabling Notifications for Guest Users
    • Knowledge Base in the Guest Portal
    • CMS in the Guest Portal
    • Cache Management
    • Quick Reply
    • Mentions
    • Module Creator – Creating a custom module
  • Email Integration
    • Email Integration in Service Management
    • Enable Embedded Images on Message Body
    • Mailbox
    • Configuring an Outgoing Mailbox
    • Configuring an Incoming Mailbox
    • OAuth Client for Email Integration
    • Email Loop Management Tool
    • AZURE OAUTH CLIENT
    • Google Oauth Configuration
    • Email Rules
    • Email Rule Configuration
    • Advanced Email Rule Configuration
    • Avoid Duplicate Tickets By Email
    • Managing additional Email recipients
    • Email Events
    • Enabling / Disabling an Email Event
    • Custom Email Events Creation
    • Custom Email Events Configuration
    • Attach Report to Email Notification
    • Email Templates
    • Email Template Configuration
    • New operation notification template for Requester User
    • New or Updated comment notification template for Requester
    • Email Webclient
  • Escalation
    • Escalation rule levels
    • Configuring Escalation Rules
    • Configure an escalation rule that modifies entity.
    • Escalation rule that sends an email notification
    • Create an escalation rule that is based on a metric
    • Configure an escalation rule that generates other entities
  • Importing Data
    • Import Foundamentals
    • Import Creation
    • Import Basic Data Binding
    • Import Before Run
    • Import Before Run Tutorial
    • Import Before Row
    • Import Before Row Tutorial
    • Import After Row
    • Import Binding The Unique Field “Code”
    • Import Binding the Type Value
    • Import Binding the Dates Values
    • Import Binding a Company, creating the record if it doesn’t exist
    • Global Import
  • IT Asset Management
    • IT Asset Models
    • ITAM Automatic Scan Configuration and Usage
    • ITAM Configuration
    • AnyDesk
    • Supremo
  • Knowledge Base
    • Reading the Knowledge Base
    • Knowledge Base in Service Operations
    • Article Configuration in Knowledge Base
    • Knowledge Base Configuration
    • Knowledge Base Standard Filters
    • Knowledge Base Advanced Filters
  • List
    • Introduction to lists
    • Creating a new list
    • List Values and Model Visibility
    • Use a list as the basis of a custom field
  • Password Management
    • Configuring a Password
    • Using a Password
    • Private Password
    • Password System Configuration
    • Enabling Password Manager Portal
    • Custom Deeppassword fields
    • Password Audit
  • Relations
    • Using a Relation Grid field
    • Configuring a Relation
    • Modifying relation using a custom event.
    • Opposite relation
    • Column Configuration
    • Relation Graph View
  • Service Management
    • Introduction to Services in Deepser
    • Service Operations
    • Creating a Service Operation
    • Adding Comments, Activities, Attachments and Tasks to Operations
    • Service Operation Main Fields
    • Service Operation Additional Fields
    • Service Operation Activities, Relations, Email and SLAs
    • Service Types
    • Routing rules
    • Configuring Routing Rules
    • Advanced Routing Configuration
  • SLA
    • Calendar
    • Metrics
    • Goal
  • Task
    • Creation of task type
    • Form configuration of task types
    • Task Global Grid
    • Task Global Grid Configuration
    • Task Global Grid Advanced Configuration
  • Workflow
    • Workflow Overview
    • Flow Designer
    • Flow Trigger
    • Workflow – Stage Set
    • Workflow – Executions
    • Approval workflows
    • Portal Approval Structure
    • Backend Approval Structure
    • Workflow Actions
    • Workflow Logic
    • Workflow Samples
    • Multi Stage Flow
    • SubFlow
  • Inventory
    • Inventory Overview
    • Inventory Configuration
    • Warehouse
    • Item
    • Movement
  • Custom Fields
    • Custom Field Overview
    • Custom Field – Creation
    • Custom Field – Element Type Simple
    • Custom Field – Element Type Advanced
  • Folder icon closed Folder open iconCustom Event
    • Custom Event Overview
    • Custom Event – Creation
    • Custom Event – Type
  • Dashboard
    • Dashboard Overview
    • Panel Configuration
    • Chart Configuration
  • Project
    • Project Module
    • Gantt
    • Project Task
    • Resource Grid
  • Calendar
    • Calendar Configurations
    • Internal Calendar Configuration
    • Calendar Configuration Example
    • External Calendar Configuration
    • External Calendar – Google Calendar Configuration Example
    • External Calendar – Outlook Calendar Configuration Example
    • Calendar Usage
  • Survey
    • Survey Overview
    • Designer
    • Survey
    • Dashboard
  • Contract and Contract Line
    • Contracts and Contract Lines – General Overview
    • Contracts
    • Contract Lines
    • Contract Creation
    • Line Creation
    • Associate a Contract / Line with other entities
    • Contract Type
    • Line Type
    • Contracts and Escalation Rules
  • Report Documentation
    • Report Configuration
    • Report Usage
  • Sales
    • Catalog and Price List Overview
    • Catalog Configurations
    • Product
    • Price List
    • Billing Overview
    • Order Billing
    • Lines Billing
    • Worklogs Billing
    • Movements Billing
    • Operation Billing
  • Folder icon closed Folder open iconIntegrations
    • Teams Integration
    • NinjaOne RMM Integration
    • Datto RMM Integration

Multiple Retrieve

Estimated reading: 6 minutes

HTTP Method: PUT
Base Syntax:

http://deepserhost/api/rest/[entities]?[filters]&[parameters]

Example Syntax:

http://deepserhost/api/rest/companies?filter[1][attribute]=name&filter[1][like]=ACME%&limit=2

Description: retrieves the entities data, given some filters or parameters.
Example Result:

http://deepserhost/api/rest/companies?filter[1][attribute]=name&filter[1][like]=ACME%&limit=2
				
					{
    "totalRecords": 3,
    "items": [
        {
            "entity_id": "1",
            "parent_id": "0",
            "sort_order": null,
            "name": "ACME International",
            "description": "ACME International - Main Company of the group",
            "phone": "0288396",
            "fax": "998266",
            "address": "Madison Square Garden",
            "city": "NY",
            "state": "NY",
            "country": "USA",
            "zip_code": "00195",
            "notes": null,
            "logo": "company/image/a/c/acme_usa.png",
            "primary_contact": "4\\euclid",
            "mailbox_id": "0",
            "status": "1",
            "formtemplate_id": "56",
            "updated_at": "2018-07-12 08:43:13",
            "created_at": "2018-06-19 13:30:41",
            "payment_status": null
        },
        {
            "entity_id": "2",
            "parent_id": "1",
            "sort_order": null,
            "name": "ACME France",
            "description": "ACME France",
            "phone": null,
            "fax": null,
            "address": "Roux de Strasse",
            "city": "Paris",
            "state": "Paris",
            "country": "France",
            "zip_code": "75000",
            "notes": null,
            "logo": "company/image/a/c/acme_fr_1.png",
            "primary_contact": "4\\euclid",
            "mailbox_id": "0",
            "status": "1",
            "formtemplate_id": "56",
            "updated_at": "2018-07-12 08:43:56",
            "created_at": "2018-06-19 13:33:57",
            "payment_status": null
        }
    ]
}
				
			

Where:

totalRecords is the number of items corresponding to the conditions of the query (note that is more than the limit we set).
items is a JSON array with all entities retrieved (eventually limited to the limit parameter).

FILTERS
When we deal with the multiple retrieve method, it is important to understand filters and parameters to get only a subset of data if we don’t need to retrieve all the entities of the system.

Think about filters as the where condition of a SQL Query, while parameters are clauses (limit, sort, etc.) for that query.
Deepser API filters are very simple to implement.
To define filters, just pass additional fields to the HTTP request query string.
The syntax to define filters is here described.
After the request path we define an array called filter.
This array has at least one element with key attribute to define the target field:

http://deepserhost/api/rest/companies?filter[1][attribute]=field

Where:

  • filter is our array to set filters
  • attribute is a constant key
  • field is the name of the field we want to apply the filter to

Then, we must define which kind of filter we want to apply to that field, by populating in the query string the element of the filter array with key corresponding to the kind of filter. The value of that element is the value to look for:

http://deepserhost/api/rest/companies?filter[1][attribute]=field&filter[1][operator]=value

Where:

  • filter is our array to set filters and the index 1 is the same of the attribute field we are referring to
  • operator is a key with the query operator we want to apply. Operators are described below
  • value is the value of the condition we want to apply to the filter

To filter a company by its name, taking all the companies with name starting with the string ‘ACME’, we should raise this GET request:

http://deepserhost/api/rest/companies?filter[1][attribute]=name&filter[1][like]=ACME%

Obviously, to implement more filters on different fields we can add more elements to our filter array:

http://deepserhost/api/rest/companies?filter[1][attribute]=name&filter[1][like]=ACME%&filter[2][attribute]=country&filter[2][eq]=USA

This will filter all companies with name starting with ACME and country equals to USA.

FILTER OPERATORS

When we deal with filters, it is important to understand filter operators to create the query we need.
Here is a list of all operators that can be used:

  • eq – “equal to” – returns items with the specified attribute that is equal to the defined value
http://deepserhost/api/rest/companies?filter[1][attribute]=name&filter[1][like]=ACME%
  • neq – “not equal to” – returns items with the specified attribute that is not equal to the defined value
http://deepserhost/api/rest/companies?filter[1][attribute]=name&filter[1][neq]=ACME
  • in – “equals any of” – returns items that are equal to the item(s) with the specified attribute(s)
http://deepserhost/api/rest/companies?filter[1][attribute]=name&filter[1][in]=ACME

If we want to use multiple values for the in, we can use an additional array, so for example:

http://deepserhost/api/rest/companies?filter[1][attribute]=name&filter[1][in][0]=ACME&filter[1][in][1]=Contoso 
  • nin – “not equals any of” – returns items excluding the item with the specified attribute
http://deepserhost/api/rest/companies?filter[1][attribute]=name&filter[1][nin][1]=ACME&filter[1][nin][2]=International
  • gt – “greater than” – returns items with the specified attribute that is greater than the defined value
http://deepserhost/api/rest/companies?filter[1][attribute]=parent_id&filter[1][gt]=0
  • lt – “less than” – returns items with the specified attribute that is less than the defined value
http://deepdeskhost/api/rest/companies?filter[1][attribute]=parent_id&filter[1][lt]=1
  • like – “like” – returns items with the specified attribute is like the defined value. Use SQL like syntax to define wildcards chars.
http://deepserhost/api/rest/companies?filter[1][attribute]=name&filter[1][like]=ACME%
  • nlike – “not like” – returns items with the specified attribute is not like the defined value. Use SQL like syntax to define wildcards chars.
http://deepserhost/api/rest/companies?filter[1][attribute]=name&filter[1][nlike]=ACME%
  • from, to – “from to” – specifies the range of attributes according to which items will be returned.
http://deepserhost/api/rest/companies?filter[1][attribute]=parent_id&filter[1][from]=2&filter[1][to]=3

You can write filters using AND, OR logical operators.
To do that follow the examples:

  • AND: to define a condition in AND, simply define multiple filters, like:
http://deepserhost/api/rest/companies?filter[1][attribute]=name&filter[1][like]=ACME%&filter[2][attribute]=parent_id&filter[2][gt]=0
  • OR: to define a condition in OR, use this syntax:
http://deepserhost/api/rest/companies?filter[1][attribute]=entity_id&filter[1][0][eq]=1&filter[1][1][eq]=3

So use multiple index arrays in the filters for the same field.

To use an OR condition on different fields, use the following syntax:

http://deepserhost/api/rest/companies?filter[1][attribute]=entity_id&filter[1][0][eq]=1&filter[1][1][eq]=3

PARAMETERS

When we deal with retrieve multiple method, it is important to understand parameters to create the query we need.
Here is a list of all parameters that can be used:

  • page: specifies the page number which items will be returned.
http://deepserhost/api/rest/companies?filter[1][attribute]=name&filter[1][nlike]=ACME%&page=2
  • order: specifies the sort order of returned items.
http://deepserhost/api/rest/companies?filter[1][attribute]=name&filter[1][nlike]=ACME%&order=name&dir=asc
  • dir: specifies the order direction: ‘asc’ – returns items in the ascending order; ‘dsc’ – returns items in the descending order.
http://deepserhost/api/rest/companies?filter[1][attribute]=name&filter[1][nlike]=ACME%&order=name&dir=asc
  • limit: limits the number of returned items in the response. Note that by default, 10 items are returned in the response. The maximum number is 100 items.
http://deepserhost/api/rest/companies?filter[1][attribute]=name&filter[1][nlike]=ACME%&limit=100

If the attribute value consists of several words separated by a whitespace, the ‘%20’ sign is used:

http://deepserhost/api/rest/companies?filter[1][attribute]=name&filter[1][eq]=ACME%20International%20LTS

Was this guide helpful? Yes No

Share this Doc

Multiple Retrieve

Or copy link

Clipboard Icon
CONTENTS
Leaf Illustration

Deepser srl
Via Luigi Dalla Via 3/B,Torre A, piano 7, int. 12
36015 Schio (VI), Italy

© Deepser. All right reserved.

Privacy Policy
Terms of Service