{
  "asyncapi": "3.0.0",
  "info": {
    "title": "core/tenants",
    "version": ""
  },
  "channels": {
    "systemEventsTenants": {
      "address": "system-events.tenants",
      "messages": {
        "coreTenantAllowedDeactivate": {
          "$ref": "#/components/messages/tenants.coreTenantAllowedDeactivate"
        },
        "coreTenantCreated": {
          "$ref": "#/components/messages/tenants.coreTenantCreated"
        },
        "coreTenantDeactivated": {
          "$ref": "#/components/messages/tenants.coreTenantDeactivated"
        },
        "coreTenantDeleted": {
          "$ref": "#/components/messages/tenants.coreTenantDeleted"
        },
        "coreTenantDisallowedDeactivate": {
          "$ref": "#/components/messages/tenants.coreTenantDisallowedDeactivate"
        },
        "coreTenantReactivated": {
          "$ref": "#/components/messages/tenants.coreTenantReactivated"
        },
        "coreTenantUpdated": {
          "$ref": "#/components/messages/tenants.coreTenantUpdated"
        }
      }
    }
  },
  "operations": {
    "coreTenantAllowedDeactivate": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsTenants"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsTenants/messages/coreTenantAllowedDeactivate"
        }
      ]
    },
    "coreTenantCreated": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsTenants"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsTenants/messages/coreTenantCreated"
        }
      ]
    },
    "coreTenantDeactivated": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsTenants"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsTenants/messages/coreTenantDeactivated"
        }
      ]
    },
    "coreTenantDeleted": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsTenants"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsTenants/messages/coreTenantDeleted"
        }
      ]
    },
    "coreTenantDisallowedDeactivate": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsTenants"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsTenants/messages/coreTenantDisallowedDeactivate"
        }
      ]
    },
    "coreTenantReactivated": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsTenants"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsTenants/messages/coreTenantReactivated"
        }
      ]
    },
    "coreTenantUpdated": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsTenants"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsTenants/messages/coreTenantUpdated"
        }
      ]
    }
  },
  "components": {
    "messages": {
      "tenants.coreTenantAllowedDeactivate": {
        "name": "com.qlik.core.tenant.allowed-deactivate",
        "title": "Tenant deactivation allowed",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/coreTenantData"
                    }
                  ],
                  "examples": [],
                  "description": "Details of the tenant. Contains the full tenant object."
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.tenant.allowed-deactivate",
                  "description": "Describes the type of event related to the originating occurrence."
                }
              }
            }
          ]
        },
        "description": "Published when deactivation is allowed for a tenant.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      },
      "tenants.coreTenantCreated": {
        "name": "com.qlik.core.tenant.created",
        "title": "Tenant created",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/coreTenantData"
                    }
                  ],
                  "examples": [],
                  "description": "Details of the created tenant. Contains the full tenant object."
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.tenant.created",
                  "description": "Describes the type of event related to the originating occurrence."
                }
              }
            }
          ]
        },
        "description": "Published when a new tenant is created.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      },
      "tenants.coreTenantDeactivated": {
        "name": "com.qlik.core.tenant.deactivated",
        "title": "Tenant deactivated",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "examples": [
                    {
                      "id": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
                      "name": "Example Tenant",
                      "hostnames": [
                        "example-tenant.us.qlikcloud.com",
                        "example-tenant.eu.qlikcloud.com"
                      ],
                      "purgeDate": "2026-06-24T18:28:31.301Z",
                      "statusesDisallowed": [
                        "active"
                      ]
                    }
                  ],
                  "required": [
                    "id",
                    "name",
                    "hostnames"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
                      "description": "Identifier of the tenant."
                    },
                    "name": {
                      "type": "string",
                      "example": "Example Tenant",
                      "description": "Tenant name."
                    },
                    "hostnames": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "examples": [
                        [
                          "example-tenant.us.qlikcloud.com",
                          "example-tenant.eu.qlikcloud.com"
                        ]
                      ],
                      "description": "List of hostname(s) associated with the tenant."
                    },
                    "purgeDate": {
                      "type": "string",
                      "format": "date-time",
                      "examples": [
                        "2026-06-24T18:28:31.301Z"
                      ],
                      "description": "Scheduled purge date when a user or OEM deactivates the tenant."
                    },
                    "statusesDisallowed": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "examples": [
                        [
                          "active"
                        ]
                      ],
                      "description": "List of statuses that are disallowed for the tenant."
                    }
                  },
                  "description": "Details of the deactivated tenant."
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.tenant.deactivated",
                  "description": "Describes the type of event related to the originating occurrence."
                }
              }
            }
          ]
        },
        "description": "Published when the tenant is deactivated, either when its status changes from active to disabled or when its disallowed statuses are updated.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      },
      "tenants.coreTenantDeleted": {
        "name": "com.qlik.core.tenant.deleted",
        "title": "Tenant deleted",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/coreTenantData"
                    }
                  ],
                  "examples": [],
                  "description": "Details of the deleted tenant. Contains the full tenant object."
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.tenant.deleted",
                  "description": "Describes the type of event related to the originating occurrence."
                }
              }
            }
          ]
        },
        "description": "Published when a tenant is deleted.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      },
      "tenants.coreTenantDisallowedDeactivate": {
        "name": "com.qlik.core.tenant.disallowed-deactivate",
        "title": "Tenant deactivation disallowed",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/coreTenantData"
                    }
                  ],
                  "examples": [],
                  "description": "Details of the tenant. Contains the full tenant object."
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.tenant.disallowed-deactivate",
                  "description": "Describes the type of event related to the originating occurrence."
                }
              }
            }
          ]
        },
        "description": "Published when deactivation is disallowed for a tenant.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      },
      "tenants.coreTenantReactivated": {
        "name": "com.qlik.core.tenant.reactivated",
        "title": "Tenant reactivated",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/coreTenantData"
                    }
                  ],
                  "examples": [],
                  "description": "Details of the reactivated tenant. Contains the full tenant object."
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.tenant.reactivated",
                  "description": "Describes the type of event related to the originating occurrence."
                }
              }
            }
          ]
        },
        "description": "Published when the tenant status changes from disabled to active.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      },
      "tenants.coreTenantUpdated": {
        "name": "com.qlik.core.tenant.updated",
        "title": "Tenant updated",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/coreTenantData"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "_updates": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string",
                                "description": "JSON Pointer path of the property that has changed."
                              },
                              "newValue": {
                                "description": "Value of the field after the update. The JSON value type depends on the field identified by path."
                              },
                              "oldValue": {
                                "description": "Value of the field before the update. The JSON value type depends on the field identified by path."
                              }
                            }
                          },
                          "examples": [
                            [
                              {
                                "path": "/name",
                                "newValue": "Example Tenant Updated",
                                "oldValue": "Example Tenant"
                              }
                            ]
                          ],
                          "description": "Collection of updates performed on the resource, in JSON Pointer form."
                        }
                      }
                    }
                  ],
                  "examples": [],
                  "required": [
                    "_updates"
                  ],
                  "description": "Details of the updated tenant. Contains the full tenant object plus the list of applied updates."
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.tenant.updated",
                  "description": "Describes the type of event related to the originating occurrence."
                }
              }
            }
          ]
        },
        "description": "Published when a tenant is updated.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      }
    },
    "schemas": {
      "cloudEventsContextAttributes": {
        "type": "object",
        "required": [
          "id",
          "source",
          "specversion",
          "type"
        ],
        "properties": {
          "id": {
            "type": "string",
            "examples": [
              "A234-1234-1234"
            ],
            "minLength": 1,
            "description": "Identifies the event."
          },
          "time": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2025-04-21T13:45:30Z"
            ],
            "minLength": 1,
            "description": "Timestamp of when the occurrence happened. Must adhere to RFC 3339."
          },
          "type": {
            "type": "string",
            "examples": [
              "com.qlik.core.tenant.created"
            ],
            "minLength": 1,
            "description": "Describes the type of event related to the originating occurrence."
          },
          "source": {
            "type": "string",
            "format": "uri-reference",
            "default": "com.qlik/tenants",
            "examples": [
              "com.qlik/tenants"
            ],
            "minLength": 1,
            "description": "Identifies the context in which an event happened."
          },
          "specversion": {
            "type": "string",
            "examples": [
              "1.0"
            ],
            "minLength": 1,
            "description": "The version of the CloudEvents specification which the event uses."
          },
          "datacontenttype": {
            "type": "string",
            "examples": [
              "application/json"
            ],
            "minLength": 1,
            "description": "Content type of the data value. Must adhere to RFC 2046 format."
          }
        },
        "description": "CloudEvents Specification JSON Schema."
      },
      "cloudEventsQlikExtensionsAttributes": {
        "type": "object",
        "required": [
          "tenantid"
        ],
        "properties": {
          "userid": {
            "type": "string",
            "examples": [
              "507f1f77bcf86cd799439011"
            ],
            "description": "Unique identifier for the user triggering the event."
          },
          "authtype": {
            "type": "string",
            "examples": [
              "tenants"
            ],
            "description": "Type of authentication context for the actor that triggered the event."
          },
          "tenantid": {
            "type": "string",
            "examples": [
              "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69"
            ],
            "description": "Unique identifier for the tenant related to the event."
          },
          "authclaims": {
            "type": "string",
            "examples": [
              "{\"sub\":\"507f1f77bcf86cd799439011\"}"
            ],
            "description": "Serialized authentication claims for the actor that triggered the event."
          },
          "toplevelresourceid": {
            "type": "string",
            "examples": [
              "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69"
            ],
            "description": "Identifier of the top-level resource related to the event. Only present on the Talend metadata updated event."
          }
        }
      },
      "coreTenantData": {
        "type": "object",
        "required": [
          "id",
          "name",
          "hostnames"
        ],
        "properties": {
          "id": {
            "type": "string",
            "examples": [
              "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69"
            ],
            "description": "Identifier of the tenant."
          },
          "name": {
            "type": "string",
            "examples": [
              "Example Tenant"
            ],
            "description": "Tenant name."
          },
          "hostnames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "example-tenant.us.qlikcloud.com",
                "example-tenant.eu.qlikcloud.com"
              ]
            ],
            "description": "List of hostname(s) associated with the tenant."
          }
        },
        "description": "The full tenant record. Core events publish the complete tenant object, so consumers may receive additional fields beyond those they rely on. Only id, name and hostnames are guaranteed; the remaining fields are present when set on the tenant."
      }
    }
  }
}