mispex v0.1.7 MISP.Tag View Source

A tag attached to an object, usually an event or attribute

Link to this section Summary

Functions

Either create a new tag or retrieve the representation of an already-existing tag

Delete multiple tags

Search for tags. Use % for wildcard

Update the server-side values for a tag

Link to this section Types

Link to this type

t() View Source
t() :: %MISP.Tag{
  colour: String.t() | nil,
  exportable: boolean(),
  hide_tag: boolean() | nil,
  id: String.t() | nil,
  name: String.t() | nil
}

Link to this section Functions

Either create a new tag or retrieve the representation of an already-existing tag

iex> {:ok, my_tag} = MISP.Tag.create(%MISP.Tag{name: "my tag"})

Delete multiple tags

Link to this function

get(struct, key, default \\ nil) View Source

Search for tags. Use % for wildcard

iex> MISP.Tag.search("%tag")
{:ok, [
  %MISP.Tag{
    colour: "#373f7b",
    exportable: true,
    hide_tag: false,
    id: "3",
    name: "my tag"
  }
]}

Update the server-side values for a tag

iex> MISP.Tag.get(1) |> Map.put(:name, "my new name") |> MISP.Tag.update()