code: public function execute()
      {
          $result = $this->resultJson->create();
  
          try {
              $activeVersion = $this->getRequest()->getParam('active_version');
              $dictionaries = $this->api->getDictionaries($activeVersion);
  
              if (is_array($dictionaries) && empty($dictionaries)) {
                  return $result->setData([
                      'status'        => true,
                      'dictionaries'  => []
                  ]);
              }
  
              if (!$dictionaries) {
                  return $result->setData([
                      'status'    => false,
                      'msg'       => 'Failed to fetch dictionaries.'
                  ]);
              }
  
              return $result->setData([
                  'status'        => true,
                  'dictionaries'  => $dictionaries
              ]);
          } catch (\Exception $e) {
              return $result->setData([
                  'status'    => false,
                  'msg'       => $e->getMessage()
              ]);
          }
      }
docs: Get all dictionaries for active version
  
  @return $this|\Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface