code: public function execute()
      {
          $result = $this->resultJson->create();
  
          try {
              $aclId = $this->getRequest()->getParam('acl_id');
              $value = $this->getRequest()->getParam('item_value');
              $comment = $this->getRequest()->getParam('comment_value');
              $negated = 0;
  
              if ($value[0] == '!') {
                  $negated = 1;
                  $value = ltrim($value, '!');
              }
  
              // Handle subnet
              $ipParts = explode('/', $value);
              $subnet = false;
              if (!empty($ipParts[1])) {
                  if (is_numeric($ipParts[1]) && (int)$ipParts[1] < 129) {
                      $subnet = $ipParts[1];
                  } else {
                      return $result->setData([
                          'status'    => false,
                          'msg'       => 'Invalid IP subnet format.'
                      ]);
                  }
              }
  
              if (!filter_var($ipParts[0], FILTER_VALIDATE_IP)) {
                  return $result->setData([
                      'status'    => false,
                      'msg'       => 'Invalid IP address format.'
                  ]);
              }
  
              $createAclItem = $this->api->upsertAclItem($aclId, $ipParts[0], $negated, $comment, $subnet);
  
              if (!$createAclItem) {
                  return $result->setData([
                      'status'    => false,
                      'msg'       => 'Failed to create Acl entry.'
                  ]);
              }
  
              return $result->setData([
                  'status'        => true,
                  'id'            => $createAclItem->id,
                  'comment'       => $createAclItem->comment,
                  'created_at'    => $createAclItem->created_at
              ]);
          } catch (\Exception $e) {
              return $result->setData([
                  'status'    => false,
                  'msg'       => $e->getMessage()
              ]);
          }
      }
docs: Create ACL entry for specific ACL
  
  @return $this|\Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface