Skip to content

Api schemas package

User

Bases: BaseModel

current_login instance-attribute

current_login: datetime

time in seconds

date_created instance-attribute

date_created: datetime

time in seconds

date_modified instance-attribute

date_modified: datetime

time in seconds

last_api_access instance-attribute

last_api_access: int

time in seconds

last_login instance-attribute

last_login: datetime

time in seconds

last_pw_change class-attribute instance-attribute

last_pw_change: int | None = None

time in seconds

CreateSharingGroupLegacyBody

Bases: BaseModel

created class-attribute instance-attribute

created: datetime | None = None

attribute will be ignored

modified class-attribute instance-attribute

modified: datetime | None = None

attribute will be ignored

org_count class-attribute instance-attribute

org_count: str | None = None

attribute will be ignored

sync_user_id class-attribute instance-attribute

sync_user_id: int | None = Field(default=None)

attribute will be ignored

UpdateSharingGroupLegacyBody

Bases: BaseModel

created class-attribute instance-attribute

created: datetime | None = None

attribute will be ignored

id class-attribute instance-attribute

id: int | None = None

attribute will be ignored

modified class-attribute instance-attribute

modified: datetime | None = None

attribute will be ignored

org_count class-attribute instance-attribute

org_count: str | None = None

attribute will be ignored

org_id class-attribute instance-attribute

org_id: int | None = None

attribute will be ignored

organisation_uuid class-attribute instance-attribute

organisation_uuid: str | None = Field(
    default=None, max_length=36
)

attribute will be ignored

sync_user_id class-attribute instance-attribute

sync_user_id: int | None = None

attribute will be ignored

uuid class-attribute instance-attribute

uuid: str | None = Field(default=None, max_length=36)

attribute will be ignored

CheckGraphResponse

Bases: BaseModel

Response schema from the API for checking a graph.

  • is_acyclic: Indicates whether the graph is acyclic and provides information about the first detected cycle, if any.
  • multiple_output_connection: Indicates whether the graph has illegal multiple output connections, detailing the nodes involved.
  • path_warnings: Records warnings if a path leads to a blocking node from a 'Concurrent Task' node, providing relevant details. Not used in Modern MISP, and will be returned empty.
  • **unsupported_modules"" List of the modules (identified with their graph_id) that are currently unsupported in Modern MISP (not yet implemented) causing the workflow to be invalid.
  • misc_errors Other miscellaneous errors indicating that the workflow graph is broken or etc. (edges registered at ports outside the valid range, inconsistencies between the incoming and outgoing adjacency lists etc.)

Example JSON structure:

{
    "is_acyclic": {
        "is_acyclic": false,
        "cycles": [
            [4, 3, "Cycle"],
            [3, 4, "Cycle"]
        ]
    },
    "multiple_output_connection": {
        "has_multiple_output_connection": true,
        "edges": {
            "1": [5, 3]
        }
    },
    "path_warnings": {
        "has_path_warnings": true,
        "edges": [
            [5, 2, "This path leads to a blocking node from a non-blocking context", true, "stop-execution", 2]
        ]
    }
}

IsAcyclic

Bases: BaseModel

Represents the whether graph is acyclic and details of the first detected cycle.

  • is_acyclic: False if the graph contains at least one cycle.
  • cycles: A list of entries, each containing two node IDs and a "Cycle" string. Conbined they result in the cycle.

Example:

"is_acyclic": {
    "is_acyclic": false,
    "cycles": [
        [
            4,
            3,
            "Cycle"
        ],
        [
            3,
            4,
            "Cycle"
        ]
    ]
}

MiscellaneousGraphValidationError

Bases: BaseModel

Validation errors that do no fit in the legacy MISP json response format for Graph Validation will be returned as errors in this format.

error_id instance-attribute

error_id: str

The type of error that this instance represents.

message instance-attribute

message: str

The error message of this instance.

MultipleOutputConnection

Bases: BaseModel

Represents the status and details of nodes with illegal multiple output connections in a graph.

  • has_multiple_output_connection: True if at least one node has multiple output connections that are not allowed. For example, the 'Concurrent Task' node can have multiple output connections while the value here is False.
  • edges: A dictionary where the key is the ID of a node with multiple illegal connections, and the value is a list of node IDs to which these illegal connections are made.

Example:

"multiple_output_connection": {
    "has_multiple_output_connection": true,
    "edges": {
        "1": [
            5,
            3
        ]
    }
}

PathWarnings

Bases: BaseModel

Represents warnings for paths in a graph.

  • has_path_warnings: True if the graph contains at least one warning.
  • edges: A list containing all connections which are flagged as warnings.

Example:

"path_warnings": {
    "has_path_warnings": true,
    "edges": [
        [
            5,
            2,
            "This path leads to a blocking node from a non-blocking context",
            true,
            "stop-execution",
            2
        ]
    ]
}

AddOrganisation

Bases: BaseModel

local instance-attribute

local: bool

organisation gains access to the local instance, otherwise treated as external

EditOrganisation

Bases: BaseModel

local instance-attribute

local: bool

organisation gains access to the local instance, otherwise treated as external

Organisation

Bases: BaseOrganisation

local instance-attribute

local: bool

organisation gains access to the local instance, otherwise treated as external

AddUserBody

Bases: BaseModel

name instance-attribute

name: str

role_id newly added

GetUsersUser

Bases: BaseModel

sub class-attribute instance-attribute

sub: str | None = None

new contents bellow

totp class-attribute instance-attribute

totp: bool | None = None

detailed information bellow

ObjectWithAttributesResponse

Bases: BaseModel

check_sharing_group_id

check_sharing_group_id() -> Self

If distribution equals 4, sharing_group_id will be shown.

FeedAttributesResponse

Bases: BaseModel

check_sharing_group_id

check_sharing_group_id() -> Self

If distribution equals 4, sharing_group_id will be shown.