{
"$defs": {
"ApiData": {
"description": "Smarter API - apiData class.",
"properties": {
"endpoint": {
"description": "The endpoint path for the API. Example: /v1/weather.",
"maxLength": 255,
"title": "Endpoint",
"type": "string"
},
"url_params": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/UrlParam"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of URL parameters to be included in the API request. Example: {city: San Francisco}",
"title": "Url Params"
},
"headers": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/RequestHeader"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of JSON dict containing headers to be sent with the API request. Example: {Authorization: Bearer <token>}",
"title": "Headers"
},
"body": {
"anyOf": [
{
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Any valid JSON object containing the body of the API request, if applicable.",
"title": "Body"
},
"parameters": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Parameter"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A JSON dict containing parameter names and data types. Example: {city: {type: string, description: City name}}",
"title": "Parameters"
},
"test_values": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/TestValue"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A JSON dict containing test values for each parameter. Example: {city: San Francisco}",
"title": "Test Values"
},
"limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": 100,
"description": "The maximum number of records to return from the API. Default is 100.",
"title": "Limit"
}
},
"required": [
"endpoint"
],
"title": "ApiData",
"type": "object"
},
"Parameter": {
"description": "Parameter class for parameterized Plugins. This structure is
intended to match that which is used in the OpenAPI
function calling specification.
It is used to define the parameters that a plugin can accept,
and also for creating the function calling prompt api.",
"properties": {
"name": {
"description": "The name of the parameter.",
"title": "Name",
"type": "string"
},
"type": {
"$ref": "#/$defs/ParameterType",
"description": "The data type of the parameter (e.g., string, integer)."
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A description of the parameter.",
"title": "Description"
},
"required": {
"default": false,
"description": "Whether the parameter is required.",
"title": "Required",
"type": "boolean"
},
"enum": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of allowed values for the parameter. Example: [Celsius, Fahrenheit]",
"title": "Enum"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The default value of the parameter, if any.",
"title": "Default"
}
},
"required": [
"name",
"type"
],
"title": "Parameter",
"type": "object"
},
"ParameterType": {
"description": "Enum for parameter types.",
"enum": [
"string",
"integer",
"float",
"boolean"
],
"title": "ParameterType",
"type": "string"
},
"RequestHeader": {
"description": "Model for storing HTTP request headers.",
"properties": {
"name": {
"description": "The name of the HTTP header.",
"title": "Name",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "The value of the HTTP header.",
"title": "Value"
}
},
"required": [
"name",
"value"
],
"title": "RequestHeader",
"type": "object"
},
"SAMApiPluginSpec": {
"description": "Smarter API Manifest ApiConnection.spec",
"properties": {
"connection": {
"description": "ApiPlugin.spec.selector[obj]: the name of an existing SqlConnector to use for the ApiPlugin",
"title": "Connection",
"type": "string"
},
"apiData": {
"$ref": "#/$defs/ApiData",
"description": "ApiPlugin.spec.selector[obj]: the ApiData to use for the ApiPlugin"
}
},
"required": [
"connection",
"apiData"
],
"title": "SAMApiPluginSpec",
"type": "object"
},
"SAMPluginCommonMetadata": {
"description": "Smarter API Plugin Manifest - common Metadata class.",
"properties": {
"name": {
"description": "The camelCase name of the manifest resource",
"title": "Name",
"type": "string"
},
"description": {
"description": "The description for this resource. Be brief. Keep it under 255 characters.",
"title": "Description",
"type": "string"
},
"version": {
"description": "The semantic version of the manifest. Example: 0.1.0",
"title": "Version",
"type": "string"
},
"tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The tags of the manifest. These are fully functional but are not currently used. Example: [tag1, tag2]",
"title": "Tags"
},
"annotations": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The manifest annotations. These are fully functional but are not currently used.",
"title": "Annotations"
},
"pluginClass": {
"description": "The class of the plugin. one of: [static, api, sql]",
"title": "Pluginclass",
"type": "string"
}
},
"required": [
"name",
"description",
"version",
"pluginClass"
],
"title": "SAMPluginCommonMetadata",
"type": "object"
},
"SAMPluginCommonStatus": {
"description": "Smarter API Plugin Manifest - Status class.",
"properties": {
"account_number": {
"default": null,
"description": "Plugin.status.account_number: The account owner of this Plugin. Read only.",
"title": "Account Number",
"type": "string"
},
"username": {
"default": null,
"description": "Plugin.status.account_number: The Smarter user who created this Plugin. Read only.",
"title": "Username",
"type": "string"
},
"created": {
"default": null,
"description": "Plugin.status.created: The date in which this Plugin was created. Read only.",
"format": "date-time",
"title": "Created",
"type": "string"
},
"modified": {
"default": null,
"description": "Plugin.status.modified: The date in which this Plugin was most recently changed. Read only.",
"format": "date-time",
"title": "Modified",
"type": "string"
}
},
"title": "SAMPluginCommonStatus",
"type": "object"
},
"TestValue": {
"description": "TestValue class for SqlPlugin and ApiPlugin test values.",
"properties": {
"name": {
"description": "The name of the parameter being tested.",
"title": "Name",
"type": "string"
},
"value": {
"description": "The test value for the parameter.",
"title": "Value"
}
},
"required": [
"name",
"value"
],
"title": "TestValue",
"type": "object"
},
"UrlParam": {
"description": "Model for storing url param k-v pairs.",
"properties": {
"key": {
"description": "The key (ie name) of the url param.",
"title": "Key",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "The value for the key.",
"title": "Value"
}
},
"required": [
"key",
"value"
],
"title": "UrlParam",
"type": "object"
}
},
"description": "Smarter API Manifest - ApiPlugin Model",
"properties": {
"apiVersion": {
"description": "apiVersion[String]: Required. The API version of the AbstractSAMBase.",
"title": "Apiversion",
"type": "string"
},
"kind": {
"description": "kind[String]: Required. The kind of resource described by the manifest.",
"title": "Kind",
"type": "string"
},
"metadata": {
"$ref": "#/$defs/SAMPluginCommonMetadata",
"description": "Plugin.metadata[obj]: Required, the Plugin metadata."
},
"spec": {
"$ref": "#/$defs/SAMApiPluginSpec",
"description": "ApiPlugin.spec[obj]: Required, the ApiPlugin specification."
},
"status": {
"anyOf": [
{
"$ref": "#/$defs/SAMPluginCommonStatus"
},
{
"type": "null"
}
],
"default": null,
"description": "Plugin.status[obj]: Optional, Read-only. Stateful status information about the Plugin."
}
},
"required": [
"apiVersion",
"kind",
"metadata",
"spec"
],
"title": "SAMApiPlugin",
"type": "object"
}