{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/atlassian/json-schema/atlassian-space-watch-array-schema.json",
  "title": "SpaceWatchArray",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/atlassian-content-watches-api-openapi.yml#/components/schemas/SpaceWatchArray",
  "required": [
    "limit",
    "results",
    "size",
    "start"
  ],
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SpaceWatch"
      }
    },
    "start": {
      "type": "integer",
      "format": "int32"
    },
    "limit": {
      "type": "integer",
      "format": "int32"
    },
    "size": {
      "type": "integer",
      "format": "int32"
    },
    "_links": {
      "$ref": "#/$defs/GenericLinks"
    }
  },
  "$defs": {
    "GenericAccountId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The account ID of the user, which uniquely identifies the user across all Atlassian products.\nFor example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`."
    },
    "GenericLinks": {
      "type": "object",
      "additionalProperties": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": true
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "GenericUserKey": {
      "type": [
        "string",
        "null"
      ],
      "description": "This property is no longer available and will be removed from the documentation soon.\nUse `accountId` instead.\nSee the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details."
    },
    "GenericUserName": {
      "type": [
        "string",
        "null"
      ],
      "description": "This property is no longer available and will be removed from the documentation soon.\nUse `accountId` instead.\nSee the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details."
    },
    "Icon": {
      "required": [
        "height",
        "isDefault",
        "path",
        "width"
      ],
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "path": {
          "type": "string"
        },
        "width": {
          "type": "integer",
          "format": "int32"
        },
        "height": {
          "type": "integer",
          "format": "int32"
        },
        "isDefault": {
          "type": "boolean"
        }
      },
      "description": "This object represents an icon. If used as a profilePicture, this may be returned as null, depending on the user's privacy setting."
    },
    "OperationCheckResult": {
      "required": [
        "operation",
        "targetType"
      ],
      "type": "object",
      "properties": {
        "operation": {
          "type": "string",
          "description": "The operation itself.",
          "enum": [
            "administer",
            "archive",
            "clear_permissions",
            "copy",
            "create",
            "create_space",
            "delete",
            "export",
            "move",
            "purge",
            "purge_version",
            "read",
            "restore",
            "restrict_content",
            "update",
            "use"
          ]
        },
        "targetType": {
          "type": "string",
          "description": "The space or content type that the operation applies to. Could be one of- - application - page - blogpost - comment - attachment - space"
        }
      },
      "description": "An operation and the target entity that it applies to, e.g. create page."
    },
    "SpaceWatch": {
      "required": [
        "type",
        "watcher"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "watcher": {
          "$ref": "#/$defs/WatchUser"
        },
        "spaceKey": {
          "type": "string"
        },
        "labelName": {
          "type": "string"
        },
        "prefix": {
          "type": "string"
        }
      }
    },
    "UserDetails": {
      "type": "object",
      "properties": {
        "business": {
          "type": "object",
          "properties": {
            "position": {
              "type": "string",
              "description": "This property has been deprecated due to privacy changes. There is no replacement. See the\n[migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/)\nfor details."
            },
            "department": {
              "type": "string",
              "description": "This property has been deprecated due to privacy changes. There is no replacement. See the\n[migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/)\nfor details."
            },
            "location": {
              "type": "string",
              "description": "This property has been deprecated due to privacy changes. There is no replacement. See the\n[migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/)\nfor details."
            }
          }
        },
        "personal": {
          "type": "object",
          "properties": {
            "phone": {
              "type": "string",
              "description": "This property has been deprecated due to privacy changes. There is no replacement. See the\n[migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/)\nfor details."
            },
            "im": {
              "type": "string",
              "description": "This property has been deprecated due to privacy changes. There is no replacement. See the\n[migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/)\nfor details."
            },
            "website": {
              "type": "string",
              "description": "This property has been deprecated due to privacy changes. There is no replacement. See the\n[migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/)\nfor details."
            },
            "email": {
              "type": "string",
              "description": "This property has been deprecated due to privacy changes. Use the `User.email` property instead. See the\n[migration guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/)\nfor details."
            }
          }
        }
      }
    },
    "WatchUser": {
      "required": [
        "type",
        "accountId",
        "profilePicture",
        "displayName",
        "operations",
        "isExternalCollaborator",
        "accountType",
        "email",
        "publicName",
        "personalSpace",
        "externalCollaborator"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "username": {
          "$ref": "#/$defs/GenericUserName"
        },
        "userKey": {
          "$ref": "#/$defs/GenericUserKey"
        },
        "accountId": {
          "$ref": "#/$defs/GenericAccountId"
        },
        "profilePicture": {
          "$ref": "#/$defs/Icon"
        },
        "displayName": {
          "type": "string"
        },
        "timeZone": {
          "type": [
            "string",
            "null"
          ]
        },
        "operations": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/OperationCheckResult"
          }
        },
        "isExternalCollaborator": {
          "type": "boolean"
        },
        "details": {
          "$ref": "#/$defs/UserDetails"
        },
        "accountType": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "publicName": {
          "type": "string"
        },
        "personalSpace": {
          "type": [
            "object",
            "null"
          ]
        },
        "externalCollaborator": {
          "type": "boolean"
        }
      },
      "description": "This essentially the same as the `User` object, but no `_links` property and\nno `_expandable` property (therefore, different required fields)."
    }
  }
}