{
  "asyncapi": "3.0.0",
  "info": {
    "title": "core/web-integrations",
    "version": ""
  },
  "channels": {
    "systemEventsWebIntegrations": {
      "address": "system-events.web-integrations",
      "messages": {
        "coreWebIntegrationCreated": {
          "$ref": "#/components/messages/web-integrations.coreWebIntegrationCreated"
        },
        "coreWebIntegrationDeleted": {
          "$ref": "#/components/messages/web-integrations.coreWebIntegrationDeleted"
        },
        "coreWebIntegrationUpdated": {
          "$ref": "#/components/messages/web-integrations.coreWebIntegrationUpdated"
        }
      }
    }
  },
  "operations": {
    "coreWebIntegrationCreated": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsWebIntegrations"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsWebIntegrations/messages/coreWebIntegrationCreated"
        }
      ]
    },
    "coreWebIntegrationDeleted": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsWebIntegrations"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsWebIntegrations/messages/coreWebIntegrationDeleted"
        }
      ]
    },
    "coreWebIntegrationUpdated": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsWebIntegrations"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsWebIntegrations/messages/coreWebIntegrationUpdated"
        }
      ]
    }
  },
  "components": {
    "messages": {
      "web-integrations.coreWebIntegrationCreated": {
        "name": "com.qlik.core.web-integration.created",
        "title": "Web integration created",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "examples": [
                    {
                      "id": "id123",
                      "name": "Web integration 1",
                      "validOrigins": [
                        "http://unicorn.com",
                        "http://foo.example"
                      ]
                    }
                  ],
                  "required": [
                    "id",
                    "name",
                    "validOrigins"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "id123",
                      "description": "Web integration identifier."
                    },
                    "name": {
                      "type": "string",
                      "example": "Web integration 1",
                      "description": "Web integration name."
                    },
                    "validOrigins": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "http://unicorn.com"
                      },
                      "description": "List of valid origins (URLs) allowed to use the web integration for CORS requests."
                    }
                  },
                  "description": "Web integration details."
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.web-integration.created",
                  "description": "Describes the type of event related to the originating occurrence."
                }
              }
            }
          ]
        },
        "description": "Published when a web integration is created.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      },
      "web-integrations.coreWebIntegrationDeleted": {
        "name": "com.qlik.core.web-integration.deleted",
        "title": "Web integration deleted",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "examples": [
                    {
                      "id": "id123"
                    }
                  ],
                  "required": [
                    "id"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "id123",
                      "description": "Web integration identifier."
                    }
                  },
                  "description": "Web integration details."
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.web-integration.deleted",
                  "description": "Describes the type of event related to the originating occurrence."
                }
              }
            }
          ]
        },
        "description": "Published when a web integration is deleted.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      },
      "web-integrations.coreWebIntegrationUpdated": {
        "name": "com.qlik.core.web-integration.updated",
        "title": "Web integration updated",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "examples": [
                    {
                      "id": "id123",
                      "name": "Web integration 2",
                      "_updates": [
                        {
                          "path": "/name",
                          "newValue": "Web integration 2",
                          "oldValue": "Web integration 1"
                        }
                      ],
                      "validOrigins": [
                        "http://unicorn.com"
                      ]
                    }
                  ],
                  "required": [
                    "id",
                    "_updates"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "id123",
                      "description": "Web integration identifier."
                    },
                    "name": {
                      "type": "string",
                      "example": "Web integration 1",
                      "description": "Web integration name."
                    },
                    "_updates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "example": {
                          "path": "/name",
                          "newValue": "Web integration 2",
                          "oldValue": "Web integration 1"
                        },
                        "properties": {
                          "path": {
                            "type": "string",
                            "description": "JSON Pointer path of the property that has changed."
                          },
                          "newValue": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            ],
                            "description": "Value of the field after the update. A string for scalar fields, or an array of strings for list fields such as validOrigins."
                          },
                          "oldValue": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            ],
                            "description": "Value of the field before the update. A string for scalar fields, or an array of strings for list fields such as validOrigins."
                          }
                        }
                      },
                      "description": "Collection of updates performed on the resource."
                    },
                    "validOrigins": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "http://unicorn.com"
                      },
                      "description": "List of valid origins (URLs) allowed to use the web integration for CORS requests."
                    }
                  },
                  "description": "Web integration details. Contains the full web integration object plus the list of updates that were applied."
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.web-integration.updated",
                  "description": "Describes the type of event related to the originating occurrence."
                }
              }
            }
          ]
        },
        "description": "Published when a web integration 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": [
              "2026-01-01T12:00:00Z"
            ],
            "minLength": 1,
            "description": "Timestamp of when the occurrence happened. Must adhere to RFC 3339."
          },
          "type": {
            "type": "string",
            "examples": [
              "com.qlik.core.web-integration.created"
            ],
            "minLength": 1,
            "description": "Describes the type of event related to the originating occurrence."
          },
          "source": {
            "type": "string",
            "format": "uri-reference",
            "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",
            "default": "application/json",
            "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": [
              "UZhiEfgW2bLd7HgR-jjzAh6VnicipweT"
            ],
            "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": [
              "VZhiEfgW2bLd7HgR-jjzAh6VnicipweT"
            ],
            "description": "Unique identifier for the tenant related to the event."
          },
          "sessionid": {
            "type": "string",
            "examples": [
              "WZhiEfgW2bLd7HgR-jjzAh6VnicipweT"
            ],
            "description": "Unique identifier for the session of the user triggering the event. Present only when a session identifier is available."
          },
          "authclaims": {
            "type": "string",
            "examples": [
              "{\"sub\":\"auth0|abc123\",\"scope\":\"user_default\"}"
            ],
            "description": "Serialized authentication claims for the actor that triggered the event."
          },
          "tracestate": {
            "type": "string",
            "examples": [
              "b3=00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
            ],
            "description": "A comma-delimited list of key-value pairs."
          },
          "traceparent": {
            "type": "string",
            "examples": [
              "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
            ],
            "description": "Contains a version, trace ID, span ID, and trace options."
          }
        }
      }
    }
  }
}