pycti.entities.opencti_settings

class pycti.entities.opencti_settings.Settings(opencti)[source]

Represents the Settings object in OpenCTI

These are the properties which are viewable in the customization and security policies views on OpenCTI platform. This also includes all messages on the platform.

See the properties attribute to understand which properties are fetched by default on graphql queries.

Parameters:

opencti (OpenCTIApiClient) – instance of OpenCTIApiClient

__init__(opencti)[source]

Initialize the Settings instance.

Parameters:

opencti (OpenCTIApiClient) – OpenCTI API client instance

delete_message(**kwargs)[source]

Delete a message from the platform

Parameters:
  • id (str) – ID of the settings object on the platform

  • input (str) – ID of the message to delete

Returns:

Settings ID and message objects

Return type:

Optional[Dict]

edit_message(**kwargs)[source]

Edit or add a message to the platform

To add a message, don’t include an ID in the input object. To edit a message an ID must be provided.

Parameters:
  • id (str) – ID of the settings object on the platform

  • input (Dict) – SettingsMessageInput object

Returns:

Settings ID and message objects

Return type:

Optional[Dict]

process_multiple_fields(data)[source]

Process and normalize fields in settings data.

Parameters:

data (dict) – the settings data dictionary to process

Returns:

the processed settings data with normalized fields

Return type:

dict

read(**kwargs)[source]

Reads settings from the platform

Parameters:
  • customAttributes (str, optional) – Custom attribues to return from query

  • include_password_policy (bool, optional) – Defaults to False. Whether to include password policy properties in response.

  • include_messages (bool, optional) – Defaults to False. Whether to include messages in query response.

Returns:

Representation of the platform settings

Return type:

Dict

update_field(**kwargs)[source]

Update settings using input to fieldPatch

Parameters:
  • id (str) – ID of the settings object to update

  • input (List[Dict]) – List of EditInput objects

  • customAttributes (str, optional) – Custom attribues to return from query

  • include_password_policy (bool, optional) – Defaults to False. Whether to include password policy properties in response.

  • include_messages (bool, optional) – Defaults to False. Whether to include messages in query response.

Returns:

Representation of the platform settings

Return type:

Optional[Dict]