chg: [events:automation] Added entry for galaxy cluster restSearch

pull/6120/head
mokaddem 2020-11-12 16:08:49 +01:00
parent ab493e2150
commit 7ea735a5b1
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
2 changed files with 39 additions and 1 deletions

View File

@ -134,7 +134,7 @@ class RestResponseComponent extends Component
),
'restSearch' => array(
'description' => "Search MISP using a list of filter parameters and return the data in the selected format. This API allows pagination via the page and limit parameters.",
'optional' => array('page', 'limit', 'id', 'uuid', 'galaxy_id', 'galaxy_uuid', 'version', 'distribution', 'org', 'orgc', 'tag', 'custom', 'minimal',),
'optional' => array('page', 'limit', 'id', 'uuid', 'galaxy_id', 'galaxy_uuid', 'version', 'distribution', 'org_id', 'orgc_id', 'tag_name', 'custom', 'minimal', 'published', 'value', 'extends_uuid'),
'params' => array()
),
),

View File

@ -85,6 +85,44 @@
echo sprintf('<p>%s</p>URL:<pre>%s</pre>Headers:<pre>%s</pre>Body:<pre class="red">%s</pre>', $description, $url, $headers, $body);
?>
<?php
$data = array(
'title' => __('Galaxy Cluster Search'),
'description' => array(
__('It is possible to search the database for galaxy clustesrs based on a list of criteria.'),
__('To return an cluster or a list of clusters in the JSON format, use the following syntax'),
__('Whilst a list of parameters is provided below, it isn\'t necessarily exhaustive')
),
'parameters' => array(
'limit' => __('Limit the number of results returned, depending on the scope (for example 10 clusters).'),
'page' => __('If a limit is set, sets the page to be returned. page 3, limit 100 will return records 201->300).'),
'id' => __('Specify the exact local ID the be returned'),
'uuid' => __('Specify the exact local UUID the be returned'),
'galaxy_id' => __('Specify the exact local ID of the galaxy containing all the clusters the be returned'),
'galaxy_uuid' => __('Specify the exact local UUID of the galaxy containing all the clusters the be returned'),
'published' => __('Specify the publication state of the clusters to be returned'),
'value' => __('Specify the value of the clusters to be returned'),
'extends_uuid' => __('Specify the UUID of the cluster that was forked by the returned clusters'),
'extends_version' => __('Specify the version of the cluster that was forked by the returned clusters'),
'version' => __('Specify the version to be returned'),
'distribution' => __('Specify the distribution to be returned'),
'org_id' => __('Specify the org_id to get all clusters belonging to this organisation.'),
'orgc_id' => __('Specify the orgc_id to get all clusters that were created by this organisation.'),
'tag_name' => __('Specify the tag name of the cluster to be returned'),
'custom' => __('Specify if custom, default or both clusters should be returned'),
'minimal' => __('Only return the UUID and the version of the returned clusters'),
),
'url' => array(
$baseurl . '/galaxy_clusters/restSearch',
)
);
echo sprintf('<h3>%s</h3>', $data['title']);
echo sprintf('<p>%s</p>', implode(" ", $data['description']));
echo sprintf("<pre>%s</pre>", implode("\n", $data['url']));
foreach ($data['parameters'] as $k => $v) {
echo sprintf('<span class="bold">%s</span>: %s<br />', $k, $v);
}
?>
<h3><?php echo __('CSV specific parameters for the restSearch APIs');?></h3>
<p>
<b>requested_attributes</b>: <?php echo __("CSV only, select the fields that you wish to include in the CSV export. By setting event level fields additionally, includeContext is not required to get event metadata.");?><br />