{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 1024 }, "description": { "type": "string", "maxLength": 32767 }, "inputs": { "type": "array", "items": { "maxItems": 100, "oneOf": [ { "type": "object", "properties": { "inputType": { "type": "string", "enum": [ "deviceData" ] }, "fileName": { "type": "string", "pattern": "^[0-9a-zA-Z_.-]{1,255}$" }, "deviceTags": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "pattern": "^[0-9a-zA-Z_-]{1,255}$" }, "value": { "type": "string", "minLength": 1, "maxLength": 255 } }, "additionalProperties": false }, "maxItems": 100 }, "deviceIds": { "type": "array", "items": { "type": "string", "pattern": "^[A-Fa-f\\d]{24}$" }, "maxItems": 1000 }, "attributes": { "type": "array", "maxItems": 100, "items": { "type": "string", "pattern": "^[0-9a-zA-Z_-]{1,255}$" } }, "start": { "type": "number" }, "end": { "type": "number" } }, "required": [ "inputType", "fileName", "start", "end" ], "additionalProperties": false }, { "type": "object", "properties": { "inputType": { "type": "string", "enum": [ "deviceMetadata" ] }, "fileName": { "type": "string", "pattern": "^[0-9a-zA-Z_.-]{1,255}$" }, "deviceTags": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "pattern": "^[0-9a-zA-Z_-]{1,255}$" }, "value": { "type": "string", "minLength": 1, "maxLength": 255 } }, "additionalProperties": false }, "maxItems": 100 }, "deviceIds": { "type": "array", "items": { "type": "string", "pattern": "^[A-Fa-f\\d]{24}$" }, "maxItems": 1000 } }, "required": [ "inputType", "fileName" ], "additionalProperties": false }, { "type": "object", "properties": { "inputType": { "type": "string", "enum": [ "dataTable" ] }, "fileName": { "type": "string", "pattern": "^[0-9a-zA-Z_.-]{1,255}$" }, "dataTableId": { "type": "string", "pattern": "^[A-Fa-f\\d]{24}$" }, "queryJson": { "type": "string", "maxLength": 32767 } }, "required": [ "inputType", "fileName", "dataTableId" ], "additionalProperties": false }, { "type": "object", "properties": { "inputType": { "type": "string", "enum": [ "externalUrl" ] }, "fileName": { "type": "string", "pattern": "^[0-9a-zA-Z_.-]{1,255}$" }, "sourceUrl": { "type": "string", "minLength": 1, "maxLength": 1024 } }, "required": [ "inputType", "fileName", "sourceUrl" ], "additionalProperties": false } ] } }, "outputs": { "type": "array", "items": { "maxItems": 100, "oneOf": [ { "type": "object", "properties": { "outputType": { "type": "string", "enum": [ "dataTable" ] }, "fileName": { "type": "string", "pattern": "^[0-9a-zA-Z_.-]{1,255}$" }, "dataTableId": { "type": "string", "pattern": "^[A-Fa-f\\d]{24}$" }, "createMissingColumns": { "type": "boolean" }, "truncateExistingTable": { "type": "boolean" } }, "required": [ "fileName", "outputType", "dataTableId" ], "additionalProperties": false }, { "type": "object", "properties": { "outputType": { "type": "string", "enum": [ "file" ] }, "fileName": { "type": "string", "pattern": "^[0-9a-zA-Z_.-]{1,255}$" }, "destinationDirectoryTemplate": { "type": "string", "minLength": 1, "maxLength": 1024 }, "destinationFileNameTemplate": { "type": "string", "minLength": 1, "maxLength": 1024 } }, "required": [ "fileName", "outputType", "destinationFileNameTemplate" ], "additionalProperties": false }, { "type": "object", "properties": { "outputType": { "type": "string", "enum": [ "directory" ] }, "directoryName": { "type": "string", "pattern": "^[0-9a-zA-Z_.-]{1,255}$" }, "destinationDirectoryTemplate": { "type": "string", "minLength": 1, "maxLength": 1024 } }, "required": [ "directoryName", "outputType", "destinationDirectoryTemplate" ], "additionalProperties": false }, { "type": "object", "properties": { "outputType": { "type": "string", "enum": [ "executionResult" ] }, "fileName": { "type": "string", "enum": [ "result.html", "result.pdf", "result.ipynb", "result.error.log", "result.log" ] }, "destinationDirectoryTemplate": { "type": "string", "minLength": 1, "maxLength": 1024 }, "destinationFileNameTemplate": { "type": "string", "minLength": 1, "maxLength": 1024 } }, "required": [ "fileName", "outputType" ], "additionalProperties": false } ] } } }, "additionalProperties": false, "required": [ "name" ] }