{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thousandeyes/json-schema/thousandeyes-integrations-api-generic-connectors-schema.json",
  "title": "Integrations_API_GenericConnectors",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thousandeyes-generic-connectors-api-openapi.yml#/components/schemas/Integrations_API_GenericConnectors",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Integrations_API_GenericConnector"
      }
    },
    "_links": {
      "$ref": "#/$defs/Integrations_API_SelfLinks"
    }
  },
  "$defs": {
    "Integrations_API_AuthenticationType": {
      "type": "string",
      "enum": [
        "basic",
        "bearer-token",
        "oauth-auth-code",
        "oauth-client-credentials",
        "other-token",
        "conjur-host"
      ]
    },
    "Integrations_API_BasicAuthentication": {
      "required": [
        "password",
        "type",
        "username"
      ],
      "type": "object",
      "properties": {
        "username": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/Integrations_API_AuthenticationType"
        }
      }
    },
    "Integrations_API_BearerTokenAuthentication": {
      "required": [
        "token",
        "type"
      ],
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/Integrations_API_AuthenticationType"
        }
      }
    },
    "Integrations_API_ConnectorType": {
      "type": "string",
      "enum": [
        "generic"
      ]
    },
    "Integrations_API_GenericConnector": {
      "required": [
        "name",
        "target",
        "type"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "readOnly": true
        },
        "type": {
          "$ref": "#/$defs/Integrations_API_ConnectorType"
        },
        "name": {
          "type": "string"
        },
        "target": {
          "type": "string"
        },
        "lastModifiedDate": {
          "type": "integer",
          "description": "The date when the connector was last modified (Unix timestamp in milliseconds).",
          "format": "int64",
          "readOnly": true
        },
        "authentication": {
          "$ref": "#/$defs/Integrations_API_GenericConnectorAuth"
        },
        "headers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Integrations_API_Header"
          }
        },
        "_links": {
          "$ref": "#/$defs/Integrations_API_SelfLinks"
        }
      }
    },
    "Integrations_API_GenericConnectorAuth": {
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/$defs/Integrations_API_BasicAuthentication"
        },
        {
          "$ref": "#/$defs/Integrations_API_BearerTokenAuthentication"
        },
        {
          "$ref": "#/$defs/Integrations_API_OtherTokenAuthentication"
        },
        {
          "$ref": "#/$defs/Integrations_API_OauthCodeAuthentication"
        },
        {
          "$ref": "#/$defs/Integrations_API_OauthClientCredentialsAuthentication"
        }
      ]
    },
    "Integrations_API_Header": {
      "required": [
        "name",
        "value"
      ],
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "Integrations_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"
        }
      }
    },
    "Integrations_API_OauthClientCredentialsAuthentication": {
      "required": [
        "oauthClientId",
        "oauthClientSecret",
        "oauthTokenUrl",
        "type"
      ],
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "oauthClientId": {
          "type": "string"
        },
        "oauthTokenUrl": {
          "type": "string"
        },
        "oauthClientSecret": {
          "type": "string"
        },
        "scope": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/Integrations_API_AuthenticationType"
        }
      }
    },
    "Integrations_API_OauthCodeAuthentication": {
      "required": [
        "code",
        "oauthAuthUrl",
        "oauthClientId",
        "oauthClientSecret",
        "oauthTokenUrl",
        "redirectUri",
        "type"
      ],
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "refreshToken": {
          "type": "string"
        },
        "oauthClientId": {
          "type": "string"
        },
        "oauthAuthUrl": {
          "type": "string"
        },
        "oauthTokenUrl": {
          "type": "string"
        },
        "oauthClientSecret": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "redirectUri": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/Integrations_API_AuthenticationType"
        }
      }
    },
    "Integrations_API_OtherTokenAuthentication": {
      "required": [
        "token",
        "type"
      ],
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/Integrations_API_AuthenticationType"
        }
      }
    },
    "Integrations_API_SelfLinks": {
      "type": "object",
      "description": "A links object containing the self link.",
      "readOnly": true,
      "properties": {
        "self": {
          "$ref": "#/$defs/Integrations_API_Link"
        }
      }
    }
  }
}