mirror of https://github.com/MISP/PyMISP
new: Add in ability to add a new cluster relation
parent
164791e980
commit
cff7e7b285
|
@ -1260,6 +1260,12 @@ class PyMISP:
|
||||||
gc.from_dict(**cluster_j)
|
gc.from_dict(**cluster_j)
|
||||||
return gc
|
return gc
|
||||||
|
|
||||||
|
def add_galaxy_cluster_relation(self, galaxy_cluster_relation: MISPGalaxyClusterRelation) -> Dict:
|
||||||
|
"""Add a galaxy cluster relation"""
|
||||||
|
r = self._prepare_request('POST', 'galaxy_cluster_relations/add/', data=galaxy_cluster_relation)
|
||||||
|
cluster_rel_j = self._check_json_response(r)
|
||||||
|
return cluster_rel_j
|
||||||
|
|
||||||
def update_galaxy_cluster_relation(self, galaxy_cluster_relation: MISPGalaxyClusterRelation) -> Dict:
|
def update_galaxy_cluster_relation(self, galaxy_cluster_relation: MISPGalaxyClusterRelation) -> Dict:
|
||||||
"""Update a galaxy cluster relation."""
|
"""Update a galaxy cluster relation."""
|
||||||
cluster_relation_id = get_uuid_or_id_from_abstract_misp(galaxy_cluster_relation)
|
cluster_relation_id = get_uuid_or_id_from_abstract_misp(galaxy_cluster_relation)
|
||||||
|
|
Loading…
Reference in New Issue