Skip to content

Commit

Permalink
Adds support to add local tags.
Browse files Browse the repository at this point in the history
Requires MISP/MISP#5215 to be merged first.
  • Loading branch information
Antoine Cailliau committed Sep 26, 2019
1 parent 1e0016c commit 8d81f31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymisp/aping.py
Original file line number Diff line number Diff line change
Expand Up @@ -1952,13 +1952,13 @@ def change_sharing_group_on_entity(self, misp_entity: AbstractMISP, sharing_grou

raise PyMISPError('The misp_entity must be MISPEvent, MISPObject or MISPAttribute')

def tag(self, misp_entity: Union[AbstractMISP, str], tag: str):
def tag(self, misp_entity: Union[AbstractMISP, str], tag: str, local: bool=False):
"""Tag an event or an attribute. misp_entity can be a UUID"""
if 'uuid' in misp_entity:
uuid = misp_entity.uuid
else:
uuid = misp_entity
to_post = {'uuid': uuid, 'tag': tag}
to_post = {'uuid': uuid, 'tag': tag, 'local': local}
response = self._prepare_request('POST', 'tags/attachTagToObject', data=to_post)
return self._check_response(response, expect_json=True)

Expand Down

0 comments on commit 8d81f31

Please sign in to comment.