Atlassian · Schema

webhook_subscription

CodeCollaborationPlatformProductivitySoftware Development
View JSON Schema on GitHub

JSON Schema

atlassian-webhook-subscription-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/webhook_subscription",
  "title": "webhook_subscription",
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Webhook Subscription",
      "description": "A Webhook subscription.",
      "properties": {
        "uuid": {
          "type": "string",
          "description": "The webhook's id"
        },
        "url": {
          "type": "string",
          "description": "The URL events get delivered to.",
          "format": "uri"
        },
        "description": {
          "type": "string",
          "description": "A user-defined description of the webhook."
        },
        "subject_type": {
          "type": "string",
          "description": "The type of entity. Set to either `repository` or `workspace` based on where the subscription is defined.",
          "enum": [
            "repository",
            "workspace"
          ]
        },
        "subject": {
          "$ref": "#/components/schemas/object"
        },
        "active": {
          "type": "boolean"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "events": {
          "type": "array",
          "description": "The events this webhook is subscribed to.",
          "items": {
            "type": "string",
            "enum": [
              "pullrequest:comment_reopened",
              "pullrequest:approved",
              "issue:comment_created",
              "repo:push",
              "pullrequest:comment_deleted",
              "pullrequest:fulfilled",
              "pullrequest:comment_created",
              "pullrequest:comment_updated",
              "pullrequest:updated",
              "repo:commit_status_created",
              "pullrequest:unapproved",
              "repo:updated",
              "pullrequest:comment_resolved",
              "repo:transfer",
              "repo:commit_status_updated",
              "pullrequest:changes_request_created",
              "issue:updated",
              "repo:created",
              "pullrequest:changes_request_removed",
              "pullrequest:rejected",
              "pullrequest:created",
              "issue:created",
              "repo:imported",
              "repo:commit_comment_created",
              "project:updated",
              "repo:fork",
              "repo:deleted"
            ]
          },
          "minItems": 1,
          "uniqueItems": true
        },
        "secret_set": {
          "type": "boolean",
          "description": "Indicates whether or not the hook has an associated secret. It is not possible to see the hook's secret. This field is ignored during updates."
        },
        "secret": {
          "type": "string",
          "description": "The secret to associate with the hook. The secret is never returned via the API. As such, this field is only used during updates. The secret can be set to `null` or \"\" to remove the secret (or create a hook with no secret). Leaving out the secret field during updates will leave the secret unchanged. Leaving out the secret during creation will create a hook with no secret.",
          "minLength": 0,
          "maxLength": 128
        }
      },
      "additionalProperties": true
    }
  ]
}