{
  "asyncapi": "3.0.0",
  "info": {
    "title": "core/oauth-clients",
    "version": ""
  },
  "channels": {
    "systemEventsOauthClients": {
      "address": "system-events.oauth-clients",
      "messages": {
        "coreOauthClientConnectionConfigApproved": {
          "$ref": "#/components/messages/oauth-clients.coreOauthClientConnectionConfigApproved"
        },
        "coreOauthClientConnectionConfigDeleted": {
          "$ref": "#/components/messages/oauth-clients.coreOauthClientConnectionConfigDeleted"
        },
        "coreOauthClientConnectionConfigUpdated": {
          "$ref": "#/components/messages/oauth-clients.coreOauthClientConnectionConfigUpdated"
        },
        "coreOauthClientCreated": {
          "$ref": "#/components/messages/oauth-clients.coreOauthClientCreated"
        },
        "coreOauthClientDeleted": {
          "$ref": "#/components/messages/oauth-clients.coreOauthClientDeleted"
        },
        "coreOauthClientPublished": {
          "$ref": "#/components/messages/oauth-clients.coreOauthClientPublished"
        },
        "coreOauthClientSecretCreated": {
          "$ref": "#/components/messages/oauth-clients.coreOauthClientSecretCreated"
        },
        "coreOauthClientSecretDeleted": {
          "$ref": "#/components/messages/oauth-clients.coreOauthClientSecretDeleted"
        },
        "coreOauthClientUpdated": {
          "$ref": "#/components/messages/oauth-clients.coreOauthClientUpdated"
        }
      }
    }
  },
  "operations": {
    "coreOauthClientConnectionConfigApproved": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsOauthClients"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsOauthClients/messages/coreOauthClientConnectionConfigApproved"
        }
      ]
    },
    "coreOauthClientConnectionConfigDeleted": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsOauthClients"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsOauthClients/messages/coreOauthClientConnectionConfigDeleted"
        }
      ]
    },
    "coreOauthClientConnectionConfigUpdated": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsOauthClients"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsOauthClients/messages/coreOauthClientConnectionConfigUpdated"
        }
      ]
    },
    "coreOauthClientCreated": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsOauthClients"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsOauthClients/messages/coreOauthClientCreated"
        }
      ]
    },
    "coreOauthClientDeleted": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsOauthClients"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsOauthClients/messages/coreOauthClientDeleted"
        }
      ]
    },
    "coreOauthClientPublished": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsOauthClients"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsOauthClients/messages/coreOauthClientPublished"
        }
      ]
    },
    "coreOauthClientSecretCreated": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsOauthClients"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsOauthClients/messages/coreOauthClientSecretCreated"
        }
      ]
    },
    "coreOauthClientSecretDeleted": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsOauthClients"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsOauthClients/messages/coreOauthClientSecretDeleted"
        }
      ]
    },
    "coreOauthClientUpdated": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsOauthClients"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsOauthClients/messages/coreOauthClientUpdated"
        }
      ]
    }
  },
  "components": {
    "messages": {
      "oauth-clients.coreOauthClientConnectionConfigApproved": {
        "name": "com.qlik.core.oauth-client.connection-config.approved",
        "title": "OAuth client connection config approved",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/OAuthConnectionConfigEntry"
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.oauth-client.connection-config.approved",
                  "description": "Unique identifier for the event type."
                }
              }
            }
          ]
        },
        "description": "Published when a tenant admin approves an OAuth client.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      },
      "oauth-clients.coreOauthClientConnectionConfigDeleted": {
        "name": "com.qlik.core.oauth-client.connection-config.deleted",
        "title": "OAuth client connection config deleted",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/OAuthConnectionConfigEntry"
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.oauth-client.connection-config.deleted",
                  "description": "Unique identifier for the event type."
                }
              }
            }
          ]
        },
        "description": "Published when a tenant admin revokes their access to another tenant's OAuth client by deleting the connection config.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      },
      "oauth-clients.coreOauthClientConnectionConfigUpdated": {
        "name": "com.qlik.core.oauth-client.connection-config.updated",
        "title": "OAuth client connection config updated",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/OAuthConnectionConfigEntry"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "_updates": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/EventUpdate"
                          },
                          "description": "Field-level changes applied by this update. Present only when the update carried a diff."
                        }
                      }
                    }
                  ]
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.oauth-client.connection-config.updated",
                  "description": "Unique identifier for the event type."
                }
              }
            }
          ]
        },
        "description": "Published when a connection config is updated by a tenant admin.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      },
      "oauth-clients.coreOauthClientCreated": {
        "name": "com.qlik.core.oauth-client.created",
        "title": "OAuth client created",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/OAuthClientEntry"
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.oauth-client.created",
                  "description": "Unique identifier for the event type."
                }
              }
            }
          ]
        },
        "description": "Published when an OAuth client is created.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      },
      "oauth-clients.coreOauthClientDeleted": {
        "name": "com.qlik.core.oauth-client.deleted",
        "title": "OAuth client deleted",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/OAuthClientEntry"
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.oauth-client.deleted",
                  "description": "Unique identifier for the event type."
                }
              }
            }
          ]
        },
        "description": "Published when an OAuth client is deleted.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      },
      "oauth-clients.coreOauthClientPublished": {
        "name": "com.qlik.core.oauth-client.published",
        "title": "OAuth client published",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/OAuthClientEntry"
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.oauth-client.published",
                  "description": "Unique identifier for the event type."
                }
              }
            }
          ]
        },
        "description": "Published when an OAuth client is published.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      },
      "oauth-clients.coreOauthClientSecretCreated": {
        "name": "com.qlik.core.oauth-client.secret.created",
        "title": "OAuth client secret created",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/OAuthClientSecretData"
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.oauth-client.secret.created",
                  "description": "Unique identifier for the event type."
                }
              }
            }
          ]
        },
        "description": "Published when an OAuth client secret is created.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      },
      "oauth-clients.coreOauthClientSecretDeleted": {
        "name": "com.qlik.core.oauth-client.secret.deleted",
        "title": "OAuth client secret deleted",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/OAuthClientSecretData"
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.oauth-client.secret.deleted",
                  "description": "Unique identifier for the event type."
                }
              }
            }
          ]
        },
        "description": "Published when an OAuth client secret is deleted.",
        "x-qlik-deprecated": false,
        "x-qlik-stability": "stable",
        "x-qlik-visibility": "public"
      },
      "oauth-clients.coreOauthClientUpdated": {
        "name": "com.qlik.core.oauth-client.updated",
        "title": "OAuth client updated",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/OAuthClientEntry"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "_updates": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/EventUpdate"
                          },
                          "description": "Field-level changes applied by this update. Present only when the update carried a diff."
                        }
                      }
                    }
                  ]
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.core.oauth-client.updated",
                  "description": "Unique identifier for the event type."
                }
              }
            }
          ]
        },
        "description": "Published when an OAuth client 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-04-05T17:31:00Z"
            ],
            "minLength": 1,
            "description": "Timestamp of when the occurrence happened. Must adhere to RFC 3339."
          },
          "type": {
            "type": "string",
            "examples": [
              "com.qlik.v1.app.created"
            ],
            "minLength": 1,
            "description": "Describes the type of event related to the originating occurrence."
          },
          "source": {
            "type": "string",
            "format": "uri-reference",
            "examples": [
              "com.qlik/my-service"
            ],
            "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": [
              "id123"
            ],
            "description": "Unique identifier for the user related to the event."
          },
          "tenantid": {
            "type": "string",
            "examples": [
              "id123"
            ],
            "description": "Unique identifier for the tenant related to the event."
          },
          "sessionid": {
            "type": "string",
            "examples": [
              "id123"
            ],
            "description": "Unique identifier for the session related to the event."
          }
        },
        "description": "Qlik-specific CloudEvents extension attributes."
      },
      "EventUpdate": {
        "type": "object",
        "required": [
          "path",
          "oldValue",
          "newValue"
        ],
        "properties": {
          "path": {
            "type": "string",
            "example": "clientName",
            "description": "Path of the field that changed."
          },
          "newValue": {
            "example": "My new client name",
            "description": "Value of the field after the update."
          },
          "oldValue": {
            "example": "My old client name",
            "description": "Value of the field before the update."
          }
        },
        "description": "A single field-level change applied by the update, describing the path that changed and its old and new values."
      },
      "OAuthClientEntry": {
        "type": "object",
        "examples": [
          {
            "appType": "web",
            "ownerId": "00000000-0000-0000-0000-000000000000",
            "clientId": "000000000000000000000000",
            "tenantId": "00000000-0000-0000-0000-000000000000",
            "createdAt": "2026-10-30T07:06:22Z",
            "ownerType": "tenant",
            "clientName": "New oauth client",
            "createdById": "00000000-0000-0000-0000-000000000000",
            "createdByType": "user"
          }
        ],
        "required": [
          "appType",
          "clientId",
          "clientName",
          "createdAt",
          "createdById",
          "createdByType",
          "ownerId",
          "ownerType",
          "tenantId"
        ],
        "properties": {
          "appType": {
            "enum": [
              "web",
              "native",
              "spa",
              "anonymous-embed"
            ],
            "type": "string",
            "examples": [
              "web"
            ],
            "description": "Application type for the client."
          },
          "logoUri": {
            "type": "string",
            "format": "uri",
            "examples": [
              "https://logo-uri.com"
            ],
            "description": "URI for the logo of the client."
          },
          "ownerId": {
            "type": "string",
            "examples": [
              "00000000-0000-0000-0000-000000000000"
            ],
            "description": "Identifier of the owner of the client."
          },
          "clientId": {
            "type": "string",
            "examples": [
              "000000000000000000000000"
            ],
            "description": "Identifier of the client."
          },
          "tenantId": {
            "type": "string",
            "examples": [
              "00000000-0000-0000-0000-000000000000"
            ],
            "description": "Identifier of the tenant where the client was created."
          },
          "clientUri": {
            "type": "string",
            "format": "uri",
            "examples": [
              "https://homepage.com"
            ],
            "description": "URI for the homepage of the client."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-10-30T07:06:22Z"
            ],
            "description": "Timestamp when the client was created."
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-10-30T07:06:22Z"
            ],
            "description": "Timestamp when the client was deleted."
          },
          "ownerType": {
            "type": "string",
            "examples": [
              "tenant"
            ],
            "description": "Type of owner that created the client."
          },
          "clientName": {
            "type": "string",
            "examples": [
              "New oauth client"
            ],
            "description": "Name of the client."
          },
          "disableTag": {
            "type": "string",
            "readOnly": true,
            "description": "Tag value indicating the reason the client is disabled, if any."
          },
          "createdById": {
            "type": "string",
            "examples": [
              "00000000-0000-0000-0000-000000000000"
            ],
            "description": "Identifier of the resource that created the client."
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-10-30T07:06:22Z"
            ],
            "description": "Timestamp when the client was published."
          },
          "redirectUris": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            },
            "examples": [
              [
                "https://redirect-uri-1.com",
                "https://redirect-uri-2.com"
              ]
            ],
            "description": "List of allowed redirect URIs for logins with the client."
          },
          "allowedScopes": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 256
            },
            "description": "List of allowed scopes for the client."
          },
          "createdByType": {
            "type": "string",
            "examples": [
              "user"
            ],
            "description": "Type of the resource that created the client."
          },
          "allowedOrigins": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 256
            },
            "maxItems": 5,
            "description": "List of allowed origins for the client."
          },
          "organizationId": {
            "type": "string",
            "examples": [
              "00000000-0000-0000-0000-000000000000"
            ],
            "description": "Identifier of the owning organization. Present only when ownerType is organization."
          },
          "connectionPolicy": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OAuthConnectionPolicy"
            },
            "description": "Connection policies for the client."
          }
        },
        "description": "Full oauth-client resource at the time the event was published."
      },
      "OAuthClientSecretData": {
        "type": "object",
        "examples": [
          {
            "hint": "00000",
            "clientId": "000000000000000000000000"
          }
        ],
        "required": [
          "clientId",
          "hint"
        ],
        "properties": {
          "hint": {
            "type": "string",
            "example": "00000",
            "description": "Hint for the client secret."
          },
          "clientId": {
            "type": "string",
            "example": "000000000000000000000000",
            "description": "Identifier of the client."
          }
        },
        "description": "OAuth client identifier and hint for the secret the event is related to."
      },
      "OAuthConnectionConfigEntry": {
        "type": "object",
        "examples": [
          {
            "status": "approved",
            "clientId": "000000000000000000000000",
            "tenantId": "00000000-0000-0000-0000-000000000000",
            "createdAt": "2026-10-30T07:06:22Z",
            "updatedAt": "2026-10-30T07:06:22Z",
            "consentMethod": "trusted"
          }
        ],
        "required": [
          "clientId",
          "consentMethod",
          "createdAt",
          "tenantId",
          "updatedAt"
        ],
        "properties": {
          "status": {
            "type": "string",
            "example": "approved",
            "description": "Status of the connection-config for the tenant."
          },
          "clientId": {
            "type": "string",
            "example": "000000000000000000000000",
            "description": "Identifier of the OAuth client the connection-config relates to."
          },
          "tenantId": {
            "type": "string",
            "example": "00000000-0000-0000-0000-000000000000",
            "description": "Identifier of the tenant the connection-config relates to."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-30T07:06:22Z",
            "description": "Timestamp when the connection-config was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-30T07:06:22Z",
            "description": "Timestamp when the connection-config was updated."
          },
          "consentMethod": {
            "enum": [
              "required",
              "trusted"
            ],
            "type": "string",
            "description": "Consent method for the connection-config."
          }
        },
        "description": "Full client connection config resource after the event was published."
      },
      "OAuthConnectionPolicy": {
        "type": "object",
        "examples": [],
        "required": [
          "tenant_id"
        ],
        "properties": {},
        "description": "OAuth-client connection policy"
      }
    }
  }
}