code: protected function generateApi()
      {
          $api = array();
          $api["url"] = $this->getUrl();
          $api["type"] = "remoting";
  
          $actionsArray = array();
  
          /** @var DirectCollection $actions */
          $actions = $this->getActions();
  
          /** @var ClassInterface $class */
          foreach ($actions as $class) {
              $methodArray = array();
              /** @var MethodInterface $method */
              foreach ($class->getMethods() as $method) {
                  $methodArray[] = array("name" => $method->getAnnotatedName(), "len" => $method->getLen());
              }
              $actionsArray[$class->getAnnotatedName()] = $methodArray;
          }
  
          $api["actions"] = $actionsArray;
  
          return $api;
      }
docs: Generates complete ext api response as array
  
  @return array