Query Builder None'; foreach($allValidApisFormated as $scope => $actions) { $options .= sprintf('', $scope); foreach($actions as $action) { $options .= sprintf('', $action['url'], $action['action']); } } echo sprintf('', $options); ?>
%s%s
', sprintf( '
%s
%s
', sprintf( '%s', 'bookmark', 'Bookmarked queries' ), 'bookmark', sprintf( '
' ) ), sprintf( '
%s
%s
', sprintf( '%s', 'history', 'Query History' ), 'history', sprintf( '
' ) ) ); echo $this->Form->create('Server', array('novalidate' => true)); ?>
Form->input('method', array( 'label' => __('HTTP method to use'), 'options' => array( 'GET' => 'GET', 'POST' => 'POST', 'DELETE' => 'DELETE' ) )); ?>
Form->input('url', array( 'label' => __('Relative path to query'), 'class' => 'input-xxlarge' )); ?>
Form->input('use_full_path', array( 'label' => __('Use full path - disclose my apikey'), 'type' => 'checkbox' )); } echo $this->Form->input('bookmark', array( 'label' => __('Bookmark query'), 'type' => 'checkbox', 'onChange' => 'toggleRestClientBookmark();' )); ?>
Form->input('show_result', array( 'label' => __('Show result'), 'type' => 'checkbox' )); echo $this->Form->input('skip_ssl_validation', array( 'type' => 'checkbox', 'label' => __('Skip SSL validation') )); ?>
Form->input('header', array( 'type' => 'textarea', 'label' => __('HTTP headers'), 'div' => 'input clear', 'class' => 'input-xxlarge', 'default' => !empty($this->request->data['Server']['header']) ? $this->request->data['Server']['header'] : $header )); ?>
Form->input('body', array( 'type' => 'textarea', 'label' => __('HTTP body'), 'div' => 'input clear', 'class' => 'input-xxlarge' )); ?>
Form->submit(__('Run query'), array('class' => 'btn btn-primary')); echo $this->Form->end(); ?>
'cURL', 'python' => 'PyMISP'); echo ''; echo '
'; foreach ($query_formats as $format => $formatName) { if (!empty(${$format})) { echo sprintf('
%s
', 'tab' . $format, h(${$format})); } } echo '
'; } if (!empty($data['data'])): echo sprintf('

%s

', __('Response')); echo sprintf('
%s: %s
', __('Queried URL'), h($data['url'])); echo sprintf('
%s: %d
', __('Response code'), h($data['code'])); echo sprintf('
%s: %s
', __('Request duration'), h($data['duration'])); echo sprintf('
%s
', __('Headers')); foreach ($data['headers'] as $header => $value) { if (is_array($value)) { $value = implode(',', $value); } echo sprintf('  %s: %s
', h($header), h($header), h($value)); } $format_toggles = ''; foreach ($formats as $k => $format) { $position = ''; if ($k == 0) { $position = '-left'; } if ($k == (count($formats) -1)) { $position = '-right'; } $format_toggles .= sprintf('%s', $position, $format, $format); } echo sprintf('
%s
', $format_toggles); echo sprintf('', h($data['data'])); echo '
'; endif; ?> element('/genericElements/SideMenu/side_menu', array('menuList' => 'api', 'menuItem' => 'rest')); echo $this->element('genericElements/assetLoader', array( 'js' => array( 'moment.min', 'extendext', 'doT', 'query-builder', 'FileSaver', 'restClient', 'codemirror/codemirror', 'codemirror/modes/javascript', 'codemirror/addons/show-hint', 'codemirror/addons/closebrackets', 'codemirror/addons/lint', 'codemirror/addons/jsonlint', 'codemirror/addons/json-lint', ), 'css' => array( 'query-builder.default', 'codemirror', 'codemirror/show-hint', 'codemirror/lint', ) )); ?>