{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thousandeyes/json-schema/thousandeyes-administrative-api-created-account-group-schema.json",
  "title": "Administrative_API_CreatedAccountGroup",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thousandeyes-account-groups-api-openapi.yml#/components/schemas/Administrative_API_CreatedAccountGroup",
  "allOf": [
    {
      "$ref": "#/$defs/Administrative_API_AccountGroupInfo"
    },
    {
      "type": "object",
      "properties": {
        "users": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Administrative_API_UserAccountGroup"
          }
        },
        "_links": {
          "$ref": "#/$defs/Administrative_API_SelfLinks"
        }
      }
    }
  ],
  "$defs": {
    "Administrative_API_AccountGroup": {
      "type": "object",
      "properties": {
        "aid": {
          "$ref": "#/$defs/Administrative_API_AccountGroupId"
        },
        "accountGroupName": {
          "type": "string",
          "description": "Account group name"
        }
      }
    },
    "Administrative_API_AccountGroupId": {
      "type": "string",
      "description": "A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint."
    },
    "Administrative_API_AccountGroupInfo": {
      "allOf": [
        {
          "$ref": "#/$defs/Administrative_API_AccountGroup"
        },
        {
          "type": "object",
          "properties": {
            "isCurrentAccountGroup": {
              "type": "boolean",
              "description": "Indicates whether the requested aid is the context of the current account."
            },
            "isDefaultAccountGroup": {
              "type": "boolean",
              "description": "Indicates whether the aid is the default one for the requesting user."
            },
            "organizationName": {
              "type": "string",
              "description": "(Optional) The name of the organization associated with the account group."
            },
            "orgId": {
              "type": "string",
              "description": "(Optional) The ID for the organization associated with the account group."
            }
          }
        }
      ]
    },
    "Administrative_API_BaseRole": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the role."
        },
        "roleId": {
          "type": "string",
          "description": "Unique ID representing the role."
        },
        "isBuiltin": {
          "type": "boolean",
          "description": "Flag indicating if the role is built-in (Account Admin, Organization Admin, Regular User)."
        }
      }
    },
    "Administrative_API_Link": {
      "type": "object",
      "description": "A hyperlink from the containing resource to a URI.",
      "required": [
        "href"
      ],
      "properties": {
        "href": {
          "type": "string",
          "description": "Its value is either a URI [RFC3986] or a URI template [RFC6570]."
        },
        "templated": {
          "type": "boolean",
          "description": "Should be true when the link object's \"href\" property is a URI template."
        },
        "type": {
          "type": "string",
          "description": "Used as a hint to indicate the media type expected when dereferencing the target resource."
        },
        "deprecation": {
          "type": "string",
          "description": "Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation."
        },
        "name": {
          "type": "string",
          "description": "Its value may be used as a secondary key for selecting link objects that share the same relation type."
        },
        "profile": {
          "type": "string",
          "description": "A URI that hints about the profile of the target resource."
        },
        "title": {
          "type": "string",
          "description": "Intended for labelling the link with a human-readable identifier"
        },
        "hreflang": {
          "type": "string",
          "description": "Indicates the language of the target resource"
        }
      }
    },
    "Administrative_API_Role": {
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/Administrative_API_BaseRole"
        },
        {
          "properties": {
            "hasManagementPermissions": {
              "type": "boolean",
              "description": "Flag indicating whether the user has management permissions."
            }
          }
        }
      ]
    },
    "Administrative_API_SelfLinks": {
      "type": "object",
      "description": "A links object containing the self link.",
      "readOnly": true,
      "properties": {
        "self": {
          "$ref": "#/$defs/Administrative_API_Link"
        }
      }
    },
    "Administrative_API_UserAccountGroup": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "User's display name."
        },
        "email": {
          "type": "string",
          "description": "User's email address.",
          "format": "email"
        },
        "uid": {
          "type": "string",
          "description": "Unique ID representing the user."
        },
        "lastLogin": {
          "type": "string",
          "description": "User's UTC last login date (ISO date-time format).",
          "format": "date-time"
        },
        "dateRegistered": {
          "type": "string",
          "description": "User's UTC registration date (ISO date-time format).",
          "format": "date-time"
        },
        "roles": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Administrative_API_Role"
          }
        }
      }
    }
  }
}