pycti.entities.opencti_label ============================ .. py:module:: pycti.entities.opencti_label Classes ------- .. autoapisummary:: pycti.entities.opencti_label.Label Module Contents --------------- .. py:class:: Label(opencti) Main Label class for OpenCTI Manages labels and tags in the OpenCTI platform. :param opencti: instance of :py:class:`~pycti.api.opencti_api_client.OpenCTIApiClient` :type opencti: OpenCTIApiClient Initialize the Label instance. :param opencti: OpenCTI API client instance :type opencti: OpenCTIApiClient .. py:attribute:: opencti .. py:attribute:: properties :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ id value color created_at updated_at standard_id """ .. raw:: html
.. py:method:: generate_id(value) :staticmethod: Generate a STIX ID for a Label. :param value: The label value :type value: str :return: STIX ID for the label :rtype: str .. py:method:: list(**kwargs) List Label objects. :param filters: the filters to apply :type filters: dict :param search: the search keyword :type search: str :param first: return the first n rows from the after ID (or the beginning if not set) :type first: int :param after: ID of the first row for pagination :type after: str :param orderBy: field to order results by :type orderBy: str :param orderMode: ordering mode (asc/desc) :type orderMode: str :param customAttributes: custom attributes to return :type customAttributes: list :param getAll: whether to retrieve all results :type getAll: bool :param withPagination: whether to include pagination info :type withPagination: bool :return: List of Label objects :rtype: list .. py:method:: read(**kwargs) Read a Label object. :param id: the id of the Label :type id: str :param filters: the filters to apply if no id provided :type filters: dict :return: Label object :rtype: dict or None .. py:method:: create(**kwargs) Create a Label object. :param stix_id: (optional) the STIX ID :type stix_id: str :param value: the label value (required) :type value: str :param color: (optional) the label color :type color: str :param x_opencti_stix_ids: (optional) list of additional STIX IDs :type x_opencti_stix_ids: list :param update: (optional) whether to update if exists (default: False) :type update: bool :return: Label object :rtype: dict or None .. py:method:: read_or_create_unchecked(**kwargs) Read or create a Label. If the user has no rights to create the label, return None. :param value: the label value :type value: str :return: The available or created Label object :rtype: dict or None .. py:method:: update_field(**kwargs) Update a Label object field. :param id: the Label id :type id: str :param input: the input of the field :type input: list :return: The updated Label object :rtype: dict or None .. py:method:: delete(**kwargs) Delete a Label object. :param id: the id of the Label to delete :type id: str :return: None