mirror of https://github.com/MISP/MISP
new: [API] documentation added for the new APIs
parent
2e95ccecc2
commit
3fd1779694
|
@ -40,10 +40,11 @@ class RestResponseComponent extends Component
|
|||
'description' => "Search MISP using a list of filter parameters and return the data
|
||||
in the selected format. The search is available on an event and an attribute level,
|
||||
just select the scope via the URL (/events/restSearch vs /attributes/restSearch).
|
||||
Besides the parameters listed, other, format specific ones can be passed along.
|
||||
Accepted return formats are: [json, xml, suricata, snort, text, openioc, rpz]",
|
||||
Besides the parameters listed, other, format specific ones can be passed along (for example: requested_attributes and includeContext for the CSV export).
|
||||
This API allows pagination via the page and limit parameters.
|
||||
Accepted return formats are: [json, xml, suricata, snort, text, openioc, rpz, stix, stix2, csv]",
|
||||
'mandatory' => array('returnFormat'),
|
||||
'optional' => array('value' , 'type', 'category', 'org', 'tags', 'from', 'to', 'last', 'eventid', 'withAttachments', 'uuid', 'publish_timestamp', 'timestamp', 'enforceWarninglist', 'to_ids', 'deleted', 'includeEventUuid', 'event_timestamp', 'threat_level_id'),
|
||||
'optional' => array('page', 'limit', 'value' , 'type', 'category', 'org', 'tags', 'from', 'to', 'last', 'eventid', 'withAttachments', 'uuid', 'publish_timestamp', 'timestamp', 'enforceWarninglist', 'to_ids', 'deleted', 'includeEventUuid', 'event_timestamp', 'threat_level_id', 'eventinfo'),
|
||||
'params' => array()
|
||||
)
|
||||
),
|
||||
|
@ -64,10 +65,11 @@ class RestResponseComponent extends Component
|
|||
'description' => "Search MISP using a list of filter parameters and return the data
|
||||
in the selected format. The search is available on an event and an attribute level,
|
||||
just select the scope via the URL (/events/restSearch vs /attributes/restSearch).
|
||||
Besides the parameters listed, other, format specific ones can be passed along.
|
||||
Accepted return formats are: [json, xml, suricata, snort, text, openioc, rpz]",
|
||||
Besides the parameters listed, other, format specific ones can be passed along (for example: requested_attributes and includeContext for the CSV export).
|
||||
This API allows pagination via the page and limit parameters.
|
||||
Accepted return formats are: [json, xml, suricata, snort, text, openioc, rpz, stix, stix2, csv]",
|
||||
'mandatory' => array('returnFormat'),
|
||||
'optional' => array('value', 'type', 'category', 'org', 'tag', 'tags', 'searchall', 'from', 'to', 'last', 'eventid', 'withAttachments', 'metadata', 'uuid', 'published', 'publish_timestamp', 'timestamp', 'enforceWarninglist', 'sgReferenceOnly'),
|
||||
'optional' => array('page', 'limit', 'value', 'type', 'category', 'org', 'tag', 'tags', 'searchall', 'from', 'to', 'last', 'eventid', 'withAttachments', 'metadata', 'uuid', 'published', 'publish_timestamp', 'timestamp', 'enforceWarninglist', 'sgReferenceOnly', 'eventinfo'),
|
||||
'params' => array()
|
||||
)
|
||||
),
|
||||
|
@ -348,7 +350,7 @@ class RestResponseComponent extends Component
|
|||
}
|
||||
$type = 'json';
|
||||
}
|
||||
$cakeResponse = new CakeResponse(array('body'=> $response,'status' => $code, 'type' => $type));
|
||||
$cakeResponse = new CakeResponse(array('body'=> $response, 'status' => $code, 'type' => $type));
|
||||
if ($download) {
|
||||
$cakeResponse->download($download);
|
||||
}
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
),
|
||||
'parameters' => array(
|
||||
"returnFormat" => __('Set the return format of the search (Currently supported: json, xml, openioc, suricata, snort - more formats are being moved to restSearch with the goal being that all searches happen through this API). Can be passed as the first parameter after restSearch or via the JSON payload.'),
|
||||
"limit" => __('Limit the number of results returned, depending on the scope (for example 10 attributes or 10 full events).'),
|
||||
"page" => __('If a limit is set, sets the page to be returned. page 3, limit 100 will return records 201->300).'),
|
||||
"value" => __('Search for the given value in the attributes\' value field.'),
|
||||
"type" => __('The attribute type, any valid MISP attribute type is accepted.'),
|
||||
"category" => __('The attribute category, any valid MISP attribute category is accepted.'),
|
||||
|
@ -40,7 +42,9 @@
|
|||
"event_timestamp" => __('Only return attributes from events that have received a modification after the given timestamp.'),
|
||||
"sgReferenceOnly" => __('If this flag is set, sharing group objects will not be included, instead only the sharing group ID is set.'),
|
||||
"eventinfo" => __("Filter on the event's info field."),
|
||||
"searchall" => __("Search for a full or a substring (delimited by % for substrings) in the event info, event tags, attribute tags, attribute values or attribute comment fields.")
|
||||
"searchall" => __("Search for a full or a substring (delimited by % for substrings) in the event info, event tags, attribute tags, attribute values or attribute comment fields."),
|
||||
"requested_attributes" => __("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."),
|
||||
"includeContext" => __("CSV only, add additional event level data to the export. The additional fields can be added via requested_attributes too with more granularity.")
|
||||
),
|
||||
'url' => array(
|
||||
$baseurl . '/attributes/restSearch',
|
||||
|
|
Loading…
Reference in New Issue