Article ID: 118633, created on Nov 14, 2013, last review on Oct 23, 2015

  • Applies to:
  • APS 2.x


In my application I have a reference to Operations Automation subscription, in custom UI it is possible to fetch subscription resources related to my application with a GET request:

GET https://<aps_controller_uri>:6308/aps/2/resources/<subscription_aps_id>/resources

When I try to fetch the same URL from PHP runtime like this:

$resources = \APS\Request::getController()->GetResources(null, 'aps/2/resources/'.$this->subscription->aps->id.'/resources');

, I get an empty array.


GetResources method can only work with children of 'APS::ResourceBase' class, and 'SubscriptionResource' is not descended from it.


Starting from PHP runtime aps-php-runtime-2.0-287 you can fetch subscription resources like this:

  • If you do not have a link to subscription in your application resource:

    $subscrResource = $apsc->getResource($subscr_resource_id);
    $resources = $subscrResource->resources();
  • If your application resource has a link to subscription:

    $resources = $this->subscription->resources();

Properties of the 'SubscriptionResource' structure are described in documentation

70bf700e0cdb9d7211df2595ef7276ab 717db81efe94e616312b74fb03a5d474

Email subscription for changes to this article
Save as PDF