<commit_before><?php

class RestResponseComponent extends Component
{
    public $components = array('ACL');

    private $__convertActionToMessage = array(
        'SharingGroup' => array(
            'addOrg' => 'add Organisation to',
            'removeOrg' => 'remove Organisation from',
            'addServer' => 'add Server to',
            'removeServer' => 'remove Server from'
        )
    );

    private $___setup = false;

    private $__descriptions = array(
        'Attribute' => array(
            'add' => array(
                'description' => "POST a MISP Attribute JSON to this API to create an Attribute.",
                'mandatory' => array('value', 'type'),
                'optional' => array('category', 'to_ids', 'uuid', 'distribution', 'sharing_group_id', 'timestamp', 'comment'),
                'params' => array('event_id')
            ),
            'edit' => array(
                'description' => "POST a MISP Attribute JSON to this API to update an Attribute. If the timestamp is set, it has to be newer than the existing Attribute.",
                'mandatory' => array(),
                'optional' => array('value', 'type', 'category', 'to_ids', 'uuid', 'distribution', 'sharing_group_id', 'timestamp', 'comment'),
                'params' => array('event_id')
            ),
            'deleteSelected' => array(
                'description' => "POST a list of attribute IDs in JSON format to this API
                    to delete the given attributes. This API also expects an event ID passed via
                    the URL or via the event_id key. The id key also takes 'all' as a parameter
                    for a wildcard search to mass delete attributes. If you want the function to
                    also hard-delete already soft-deleted attributes, pass the allow_hard_delete
                    key.",
                'mandatory' => array('id'),
                'optional' => array('event_id', 'allow_hard_delete'),
                'params' => array('event_id')
            ),
            'restSearch' => array(
                '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 (for example: requested_attributes and includeContext for the CSV export).
                    This API allows pagination via the page and limit parameters.",<commit_msg>fix: [API] Invalid URL parameter suggested in rest client templates for the attribute edit endpoint, fixes #4159<commit_after><?php

class RestResponseComponent extends Component
{
    public $components = array('ACL');

    private $__convertActionToMessage = array(
        'SharingGroup' => array(
            'addOrg' => 'add Organisation to',
            'removeOrg' => 'remove Organisation from',
            'addServer' => 'add Server to',
            'removeServer' => 'remove Server from'
        )
    );

    private $___setup = false;

    private $__descriptions = array(
        'Attribute' => array(
            'add' => array(
                'description' => "POST a MISP Attribute JSON to this API to create an Attribute.",
                'mandatory' => array('value', 'type'),
                'optional' => array('category', 'to_ids', 'uuid', 'distribution', 'sharing_group_id', 'timestamp', 'comment'),
                'params' => array('event_id')
            ),
            'edit' => array(
                'description' => "POST a MISP Attribute JSON to this API to update an Attribute. If the timestamp is set, it has to be newer than the existing Attribute.",
                'mandatory' => array(),
                'optional' => array('value', 'type', 'category', 'to_ids', 'uuid', 'distribution', 'sharing_group_id', 'timestamp', 'comment'),
                'params' => array('attribute_id')
            ),
            'deleteSelected' => array(
                'description' => "POST a list of attribute IDs in JSON format to this API
                    to delete the given attributes. This API also expects an event ID passed via
                    the URL or via the event_id key. The id key also takes 'all' as a parameter
                    for a wildcard search to mass delete attributes. If you want the function to
                    also hard-delete already soft-deleted attributes, pass the allow_hard_delete
                    key.",
                'mandatory' => array('id'),
                'optional' => array('event_id', 'allow_hard_delete'),
                'params' => array('event_id')
            ),
            'restSearch' => array(
                '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 (for example: requested_attributes and includeContext for the CSV export).
                    This API allows pagination via the page and limit parameters.",
{'fraction_non_alphanumeric': 0.10057418040377848, 'fraction_numerical': 0.0007408779403593258, 'mean_word_length': 2.069926094371802, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '669847', 'n_tokens_mistral': 1308, 'n_tokens_neox': 1240, 'n_words': 523}