Jump to content
  • 0

How To Get All Service Includes Active,pending,suspended And Canceled In Once Query


Question

4 answers to this question

Recommended Posts

  • 0
Posted

Services::getList is paginated, so you will only receive a max of 20 results by default. Also, additional queries are made automatically for more service information (e.g. package pricing) for each service found. If that's fine for you, then set the status to "all" as naja7host suggested.

 

There is no direct method to fetch every service in a single query. If you really need all services in one method call, you might try Services::getAllChildren by passing in a null $parent_service_id. But of course, that would retrieve all parent services and no addon services. It would also be slow for large numbers of services.

  • 0
Posted
  On 7/21/2015 at 4:48 PM, Tyson said:

Services::getList is paginated, so you will only receive a max of 20 results by default. Also, additional queries are made automatically for more service information (e.g. package pricing) for each service found. If that's fine for you, then set the status to "all" as naja7host suggested.

 

There is no direct method to fetch every service in a single query. If you really need all services in one method call, you might try Services::getAllChildren by passing in a null $parent_service_id. But of course, that would retrieve all parent services and no addon services. It would also be slow for large numbers of services.

 

getAllChildren() not for all services without client_id filtered .

 

the getServices() is the best fucntion , but is pain that is a private . i suggest to return it as public , because it will help in more cases . and the other public function are limited in result (20 max) .

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...