[#158] Fetch Service Providers of Particular Service

Migrated from Redmine #158 | Author: Rohit Bhattad
Status: Closed | Priority: Normal | Created: 2018-05-03


Can you help me on how we fetch service providers for a service?
The below json payload doesn’t work

{“jsonrpc”:“2.0”,“method”:“getUnitList”,“params”:[{“unit_group_id” : [ 27 ]}],“id”:1}

The documentation is below:

@param Boolean $isVisibleOnly
@param Boolean $asArray
@param integer $handleClasses 1 - classes only, -1 without classes, null - skip classes check
@return Array

{“jsonrpc”:“2.0”,“method”:“getUnitList”,“params”:[27, {“isVisibleOnly”:“1”,“asArray”:“1” } ],“id”:1}

I want all units in service id 1. how can I get this? How do I pass unit_map as parameter to this?

Dmytro Bondarev wrote:

Hi! What is 27? Why do you pass part of parameters in array and part of them as object?
Please follow documentation.
You do not need pass unit_map. You need to get this parameter from service object and filter your providers based on this data.