{ "swagger": "2.0", "info": { "title": "SCOS Sensor API", "description": "A RESTful API for controlling a SCOS-compatible sensor.\n\n# Errors\n\nThe API uses standard HTTP status codes to indicate the success or failure of\nthe API call. The body of the response will be JSON in the following format:\n\n## 400 Bad Request (Parse Error)\n\n```json\n{\n \"field_name\": [\n \"description of first error\",\n \"description of second error\",\n ...\n ]\n}\n```\n\n## 400 Bad Request (Protected Error)\n\n```json\n{\n \"detail\": \"description of error\",\n \"protected_objects\": [\n \"url_to_protected_item_1\",\n \"url_to_protected_item_2\",\n ...\n ]\n}\n```\n\n## 409 Conflict (DB Integrity Error)\n\n```json\n{\n \"detail\": \"description of error\"\n}\n```\n\n", "contact": { "email": "sms@ntia.doc.gov" }, "license": { "name": "NTIA/ITS", "url": "https://github.com/NTIA/scos-sensor/blob/master/LICENSE.md" }, "version": "v1" }, "host": "testserver", "schemes": [ "http" ], "basePath": "/api", "consumes": [ "application/json" ], "produces": [ "application/json" ], "securityDefinitions": { "token": { "description": "Tokens are automatically generated for all users. You can view yours by going to your User Details view in the browsable API at `/api/v1/users/me` and looking for the `auth_token` key. Non-admin user accounts do not initially have a password and so can not log in to the browsable API. To set a password for a user (for testing purposes), an admin can do that in the Sensor Configuration Portal, but only the account's token should be stored and used for general purpose API access. Example cURL call: `curl -kLsS -H \"Authorization: Token 529c30e6e04b3b546f2e073e879b75fdfa147c15\" https://greyhound5.sms.internal/api/v1`", "in": "header", "name": "Token", "type": "apiKey" } }, "security": [ { "token": [] } ], "paths": { "/v1/": { "get": { "operationId": "v1_list", "description": "SCOS sensor API root.", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [] }, "/v1/acquisitions/": { "get": { "operationId": "v1_acquisitions_list", "description": "Returns an overview of how many acquisitions are available per schedule\nentry.", "parameters": [ { "name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer" }, { "name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer" } ], "responses": { "200": { "description": "", "schema": { "required": [ "count", "results" ], "type": "object", "properties": { "count": { "type": "integer" }, "next": { "type": "string", "format": "uri", "x-nullable": true }, "previous": { "type": "string", "format": "uri", "x-nullable": true }, "results": { "type": "array", "items": { "$ref": "#/definitions/AcquisitionsOverview" } } } } } }, "tags": [ "v1" ] }, "parameters": [] }, "/v1/acquisitions/{schedule_entry_name}/": { "get": { "operationId": "v1_acquisitions_list", "description": "Returns a list of all acquisitions created by the given schedule entry.", "parameters": [ { "name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string" }, { "name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string" }, { "name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer" }, { "name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer" } ], "responses": { "200": { "description": "", "schema": { "required": [ "count", "results" ], "type": "object", "properties": { "count": { "type": "integer" }, "next": { "type": "string", "format": "uri", "x-nullable": true }, "previous": { "type": "string", "format": "uri", "x-nullable": true }, "results": { "type": "array", "items": { "$ref": "#/definitions/Acquisition" } } } } } }, "tags": [ "v1" ] }, "delete": { "operationId": "v1_acquisitions_delete", "description": "Deletes all acquisitions created by the given schedule entry.", "parameters": [ { "name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string" }, { "name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string" } ], "responses": { "204": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [ { "name": "schedule_entry_name", "in": "path", "required": true, "type": "string" } ] }, "/v1/acquisitions/{schedule_entry_name}/archive": { "get": { "operationId": "v1_acquisitions_archive", "description": "", "parameters": [ { "name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string" }, { "name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string" }, { "name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer" }, { "name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer" } ], "responses": { "200": { "description": "", "schema": { "required": [ "count", "results" ], "type": "object", "properties": { "count": { "type": "integer" }, "next": { "type": "string", "format": "uri", "x-nullable": true }, "previous": { "type": "string", "format": "uri", "x-nullable": true }, "results": { "type": "array", "items": { "$ref": "#/definitions/Acquisition" } } } } } }, "tags": [ "v1" ] }, "parameters": [ { "name": "schedule_entry_name", "in": "path", "required": true, "type": "string" } ] }, "/v1/acquisitions/{schedule_entry_name}/{task_id}/": { "get": { "operationId": "v1_acquisitions_read", "description": "Returns all available metadata about an acquisition.", "parameters": [], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/Acquisition" } } }, "tags": [ "v1" ] }, "delete": { "operationId": "v1_acquisitions_delete", "description": "Deletes the specified acquisition.", "parameters": [], "responses": { "204": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [ { "name": "schedule_entry_name", "in": "path", "required": true, "type": "string" }, { "name": "task_id", "in": "path", "description": "The id of the task relative to the acquisition", "required": true, "type": "integer" } ] }, "/v1/acquisitions/{schedule_entry_name}/{task_id}/archive": { "get": { "operationId": "v1_acquisitions_archive", "description": "Downloads the acquisition's SigMF archive.", "parameters": [], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/Acquisition" } } }, "tags": [ "v1" ] }, "parameters": [ { "name": "schedule_entry_name", "in": "path", "required": true, "type": "string" }, { "name": "task_id", "in": "path", "description": "The id of the task relative to the acquisition", "required": true, "type": "integer" } ] }, "/v1/capabilities/": { "get": { "operationId": "v1_capabilities_list", "description": "The capabilites of the sensor.", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [] }, "/v1/results/": { "get": { "operationId": "v1_results_list", "description": "Returns an overview of how many results are available per schedule\nentry.", "parameters": [ { "name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer" }, { "name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer" } ], "responses": { "200": { "description": "", "schema": { "required": [ "count", "results" ], "type": "object", "properties": { "count": { "type": "integer" }, "next": { "type": "string", "format": "uri", "x-nullable": true }, "previous": { "type": "string", "format": "uri", "x-nullable": true }, "results": { "type": "array", "items": { "$ref": "#/definitions/TaskResultsOverview" } } } } } }, "tags": [ "v1" ] }, "parameters": [] }, "/v1/results/{schedule_entry_name}/": { "get": { "operationId": "v1_results_list", "description": "Returns a list of all results created by the given schedule entry.", "parameters": [ { "name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string" }, { "name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string" }, { "name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer" }, { "name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer" } ], "responses": { "200": { "description": "", "schema": { "required": [ "count", "results" ], "type": "object", "properties": { "count": { "type": "integer" }, "next": { "type": "string", "format": "uri", "x-nullable": true }, "previous": { "type": "string", "format": "uri", "x-nullable": true }, "results": { "type": "array", "items": { "$ref": "#/definitions/TaskResult" } } } } } }, "tags": [ "v1" ] }, "parameters": [ { "name": "schedule_entry_name", "in": "path", "required": true, "type": "string" } ] }, "/v1/results/{schedule_entry_name}/{task_id}/": { "get": { "operationId": "v1_results_read", "description": "Returns a specific result.", "parameters": [], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/TaskResult" } } }, "tags": [ "v1" ] }, "parameters": [ { "name": "schedule_entry_name", "in": "path", "required": true, "type": "string" }, { "name": "task_id", "in": "path", "description": "The id of the task relative to the result", "required": true, "type": "integer" } ] }, "/v1/schedule/": { "get": { "operationId": "v1_schedule_list", "description": "Retrieves the current schedule.", "parameters": [ { "name": "search", "in": "query", "description": "A search term.", "required": false, "type": "string" }, { "name": "ordering", "in": "query", "description": "Which field to use when ordering the results.", "required": false, "type": "string" }, { "name": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer" }, { "name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer" } ], "responses": { "200": { "description": "", "schema": { "required": [ "count", "results" ], "type": "object", "properties": { "count": { "type": "integer" }, "next": { "type": "string", "format": "uri", "x-nullable": true }, "previous": { "type": "string", "format": "uri", "x-nullable": true }, "results": { "type": "array", "items": { "required": [ "name", "action" ], "type": "object", "properties": { "url": { "title": "Url", "description": "The url of the entry", "type": "string", "format": "uri", "readOnly": true }, "name": { "title": "Name", "description": "[Required] The unique identifier used in URLs and filenames", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", "maxLength": 50, "minLength": 1 }, "action": { "title": "Action", "description": "[Required] The name of the action to be scheduled", "type": "string", "enum": [ "acquire_700_band_iq", "acquire_700c_dl", "logger", "mock_acquire", "admin_logger", "monitor_usrp", "sync_gps" ] }, "priority": { "title": "Priority", "description": "Lower number is higher priority (default=10)", "type": "integer", "maximum": 19, "minimum": -20, "x-nullable": true }, "start": { "title": "Start", "description": "UTC time (ISO 8601) to start, or leave blank for 'now'", "type": "string", "format": "date-time", "x-nullable": true }, "stop": { "title": "Absolute stop", "description": "UTC time (ISO 8601) to stop, or leave blank for 'never' (not valid with relative stop)", "type": "string", "format": "date-time", "x-nullable": true }, "relative_stop": { "title": "Relative stop", "description": "Integer seconds after start to stop, or leave blank for 'never' (not valid with absolute stop)", "type": "integer", "minimum": 1, "x-nullable": true }, "interval": { "title": "Interval", "description": "Seconds between tasks, or leave blank to run once", "type": "integer", "minimum": 1, "x-nullable": true }, "is_active": { "title": "Is active", "description": "Indicates whether the entry should be removed from the scheduler without removing it from the system", "type": "boolean", "readOnly": true }, "is_private": { "title": "Is private", "description": "Indicates whether the entry, and resulting data, are only visible to admins", "type": "boolean" }, "callback_url": { "title": "Callback url", "description": "If given, the scheduler will POST a `TaskResult` JSON object to this URL after each task completes", "type": "string", "format": "uri", "maxLength": 200, "x-nullable": true }, "next_task_time": { "title": "Next task time", "description": "UTC time (ISO 8601) the next task is scheduled for", "type": "string", "format": "date-time", "readOnly": true }, "next_task_id": { "title": "Next task id", "description": "The id of the next task to be executed", "type": "integer", "readOnly": true }, "created": { "title": "Created", "description": "The date the entry was created", "type": "string", "format": "date-time", "readOnly": true }, "modified": { "title": "Modified", "description": "The date the entry was modified", "type": "string", "format": "date-time", "readOnly": true }, "owner": { "title": "Owner", "description": "The name of the user who owns the entry", "type": "string", "format": "uri", "readOnly": true }, "acquisitions": { "title": "Acquisitions", "description": "The list of acquisitions related to the entry", "type": "string", "readOnly": true }, "results": { "title": "Results", "description": "The list of results related to the entry", "type": "string", "readOnly": true }, "validate_only": { "title": "Validate only", "description": "Only validate the input, do not modify the schedule", "type": "boolean", "default": false } } } } } } } }, "tags": [ "v1" ] }, "post": { "operationId": "v1_schedule_create", "description": "Return NO CONTENT when input is valid but validate_only is True.", "parameters": [ { "name": "data", "in": "body", "required": true, "schema": { "required": [ "name", "action" ], "type": "object", "properties": { "url": { "title": "Url", "description": "The url of the entry", "type": "string", "format": "uri", "readOnly": true }, "name": { "title": "Name", "description": "[Required] The unique identifier used in URLs and filenames", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", "maxLength": 50, "minLength": 1 }, "action": { "title": "Action", "description": "[Required] The name of the action to be scheduled", "type": "string", "enum": [ "acquire_700_band_iq", "acquire_700c_dl", "logger", "mock_acquire", "admin_logger", "monitor_usrp", "sync_gps" ] }, "priority": { "title": "Priority", "description": "Lower number is higher priority (default=10)", "type": "integer", "maximum": 19, "minimum": -20, "x-nullable": true }, "start": { "title": "Start", "description": "UTC time (ISO 8601) to start, or leave blank for 'now'", "type": "string", "format": "date-time", "x-nullable": true }, "stop": { "title": "Absolute stop", "description": "UTC time (ISO 8601) to stop, or leave blank for 'never' (not valid with relative stop)", "type": "string", "format": "date-time", "x-nullable": true }, "relative_stop": { "title": "Relative stop", "description": "Integer seconds after start to stop, or leave blank for 'never' (not valid with absolute stop)", "type": "integer", "minimum": 1, "x-nullable": true }, "interval": { "title": "Interval", "description": "Seconds between tasks, or leave blank to run once", "type": "integer", "minimum": 1, "x-nullable": true }, "is_active": { "title": "Is active", "description": "Indicates whether the entry should be removed from the scheduler without removing it from the system", "type": "boolean", "readOnly": true }, "is_private": { "title": "Is private", "description": "Indicates whether the entry, and resulting data, are only visible to admins", "type": "boolean" }, "callback_url": { "title": "Callback url", "description": "If given, the scheduler will POST a `TaskResult` JSON object to this URL after each task completes", "type": "string", "format": "uri", "maxLength": 200, "x-nullable": true }, "next_task_time": { "title": "Next task time", "description": "UTC time (ISO 8601) the next task is scheduled for", "type": "string", "format": "date-time", "readOnly": true }, "next_task_id": { "title": "Next task id", "description": "The id of the next task to be executed", "type": "integer", "readOnly": true }, "created": { "title": "Created", "description": "The date the entry was created", "type": "string", "format": "date-time", "readOnly": true }, "modified": { "title": "Modified", "description": "The date the entry was modified", "type": "string", "format": "date-time", "readOnly": true }, "owner": { "title": "Owner", "description": "The name of the user who owns the entry", "type": "string", "format": "uri", "readOnly": true }, "acquisitions": { "title": "Acquisitions", "description": "The list of acquisitions related to the entry", "type": "string", "readOnly": true }, "results": { "title": "Results", "description": "The list of results related to the entry", "type": "string", "readOnly": true }, "validate_only": { "title": "Validate only", "description": "Only validate the input, do not modify the schedule", "type": "boolean", "default": false } } } } ], "responses": { "201": { "description": "", "schema": { "required": [ "name", "action" ], "type": "object", "properties": { "url": { "title": "Url", "description": "The url of the entry", "type": "string", "format": "uri", "readOnly": true }, "name": { "title": "Name", "description": "[Required] The unique identifier used in URLs and filenames", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", "maxLength": 50, "minLength": 1 }, "action": { "title": "Action", "description": "[Required] The name of the action to be scheduled", "type": "string", "enum": [ "acquire_700_band_iq", "acquire_700c_dl", "logger", "mock_acquire", "admin_logger", "monitor_usrp", "sync_gps" ] }, "priority": { "title": "Priority", "description": "Lower number is higher priority (default=10)", "type": "integer", "maximum": 19, "minimum": -20, "x-nullable": true }, "start": { "title": "Start", "description": "UTC time (ISO 8601) to start, or leave blank for 'now'", "type": "string", "format": "date-time", "x-nullable": true }, "stop": { "title": "Absolute stop", "description": "UTC time (ISO 8601) to stop, or leave blank for 'never' (not valid with relative stop)", "type": "string", "format": "date-time", "x-nullable": true }, "relative_stop": { "title": "Relative stop", "description": "Integer seconds after start to stop, or leave blank for 'never' (not valid with absolute stop)", "type": "integer", "minimum": 1, "x-nullable": true }, "interval": { "title": "Interval", "description": "Seconds between tasks, or leave blank to run once", "type": "integer", "minimum": 1, "x-nullable": true }, "is_active": { "title": "Is active", "description": "Indicates whether the entry should be removed from the scheduler without removing it from the system", "type": "boolean", "readOnly": true }, "is_private": { "title": "Is private", "description": "Indicates whether the entry, and resulting data, are only visible to admins", "type": "boolean" }, "callback_url": { "title": "Callback url", "description": "If given, the scheduler will POST a `TaskResult` JSON object to this URL after each task completes", "type": "string", "format": "uri", "maxLength": 200, "x-nullable": true }, "next_task_time": { "title": "Next task time", "description": "UTC time (ISO 8601) the next task is scheduled for", "type": "string", "format": "date-time", "readOnly": true }, "next_task_id": { "title": "Next task id", "description": "The id of the next task to be executed", "type": "integer", "readOnly": true }, "created": { "title": "Created", "description": "The date the entry was created", "type": "string", "format": "date-time", "readOnly": true }, "modified": { "title": "Modified", "description": "The date the entry was modified", "type": "string", "format": "date-time", "readOnly": true }, "owner": { "title": "Owner", "description": "The name of the user who owns the entry", "type": "string", "format": "uri", "readOnly": true }, "acquisitions": { "title": "Acquisitions", "description": "The list of acquisitions related to the entry", "type": "string", "readOnly": true }, "results": { "title": "Results", "description": "The list of results related to the entry", "type": "string", "readOnly": true }, "validate_only": { "title": "Validate only", "description": "Only validate the input, do not modify the schedule", "type": "boolean", "default": false } } } } }, "tags": [ "v1" ] }, "parameters": [] }, "/v1/schedule/{name}/": { "get": { "operationId": "v1_schedule_read", "description": "Returns the specified schedule entry.", "parameters": [], "responses": { "200": { "description": "", "schema": { "required": [ "name", "action" ], "type": "object", "properties": { "url": { "title": "Url", "description": "The url of the entry", "type": "string", "format": "uri", "readOnly": true }, "name": { "title": "Name", "description": "[Required] The unique identifier used in URLs and filenames", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", "maxLength": 50, "minLength": 1 }, "action": { "title": "Action", "description": "[Required] The name of the action to be scheduled", "type": "string", "enum": [ "acquire_700_band_iq", "acquire_700c_dl", "logger", "mock_acquire", "admin_logger", "monitor_usrp", "sync_gps" ] }, "priority": { "title": "Priority", "description": "Lower number is higher priority (default=10)", "type": "integer", "maximum": 19, "minimum": -20, "x-nullable": true }, "start": { "title": "Start", "description": "UTC time (ISO 8601) to start, or leave blank for 'now'", "type": "string", "format": "date-time", "x-nullable": true }, "stop": { "title": "Absolute stop", "description": "UTC time (ISO 8601) to stop, or leave blank for 'never' (not valid with relative stop)", "type": "string", "format": "date-time", "x-nullable": true }, "relative_stop": { "title": "Relative stop", "description": "Integer seconds after start to stop, or leave blank for 'never' (not valid with absolute stop)", "type": "integer", "minimum": 1, "x-nullable": true }, "interval": { "title": "Interval", "description": "Seconds between tasks, or leave blank to run once", "type": "integer", "minimum": 1, "x-nullable": true }, "is_active": { "title": "Is active", "description": "Indicates whether the entry should be removed from the scheduler without removing it from the system", "type": "boolean", "readOnly": true }, "is_private": { "title": "Is private", "description": "Indicates whether the entry, and resulting data, are only visible to admins", "type": "boolean" }, "callback_url": { "title": "Callback url", "description": "If given, the scheduler will POST a `TaskResult` JSON object to this URL after each task completes", "type": "string", "format": "uri", "maxLength": 200, "x-nullable": true }, "next_task_time": { "title": "Next task time", "description": "UTC time (ISO 8601) the next task is scheduled for", "type": "string", "format": "date-time", "readOnly": true }, "next_task_id": { "title": "Next task id", "description": "The id of the next task to be executed", "type": "integer", "readOnly": true }, "created": { "title": "Created", "description": "The date the entry was created", "type": "string", "format": "date-time", "readOnly": true }, "modified": { "title": "Modified", "description": "The date the entry was modified", "type": "string", "format": "date-time", "readOnly": true }, "owner": { "title": "Owner", "description": "The name of the user who owns the entry", "type": "string", "format": "uri", "readOnly": true }, "acquisitions": { "title": "Acquisitions", "description": "The list of acquisitions related to the entry", "type": "string", "readOnly": true }, "results": { "title": "Results", "description": "The list of results related to the entry", "type": "string", "readOnly": true }, "validate_only": { "title": "Validate only", "description": "Only validate the input, do not modify the schedule", "type": "boolean", "default": false } } } } }, "tags": [ "v1" ] }, "put": { "operationId": "v1_schedule_update", "description": "Updates the specified schedule entry.", "parameters": [ { "name": "data", "in": "body", "required": true, "schema": { "type": "object", "properties": { "url": { "title": "Url", "description": "The url of the entry", "type": "string", "format": "uri", "readOnly": true }, "name": { "title": "Name", "description": "[Required] The unique identifier used in URLs and filenames", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", "readOnly": true, "minLength": 1 }, "action": { "title": "Action", "description": "[Required] The name of the action to be scheduled", "type": "string", "enum": [ "acquire_700_band_iq", "acquire_700c_dl", "logger", "mock_acquire", "admin_logger", "monitor_usrp", "sync_gps" ], "readOnly": true }, "priority": { "title": "Priority", "description": "Lower number is higher priority (default=10)", "type": "integer", "maximum": 19, "minimum": -20, "x-nullable": true }, "start": { "title": "Start", "description": "UTC time (ISO 8601) to start, or leave blank for 'now'", "type": "string", "format": "date-time", "x-nullable": true }, "stop": { "title": "Absolute stop", "description": "UTC time (ISO 8601) to stop, or leave blank for 'never' (not valid with relative stop)", "type": "string", "format": "date-time", "x-nullable": true }, "relative_stop": { "title": "Relative stop", "description": "Integer seconds after start to stop, or leave blank for 'never' (not valid with absolute stop)", "type": "integer", "minimum": 1, "x-nullable": true }, "interval": { "title": "Interval", "description": "Seconds between tasks, or leave blank to run once", "type": "integer", "minimum": 1, "x-nullable": true }, "is_active": { "title": "Is active", "description": "Indicates whether the entry should be removed from the scheduler without removing it from the system", "type": "boolean" }, "is_private": { "title": "Is private", "description": "Indicates whether the entry, and resulting data, are only visible to admins", "type": "boolean" }, "callback_url": { "title": "Callback url", "description": "If given, the scheduler will POST a `TaskResult` JSON object to this URL after each task completes", "type": "string", "format": "uri", "maxLength": 200, "x-nullable": true }, "next_task_time": { "title": "Next task time", "description": "UTC time (ISO 8601) the next task is scheduled for", "type": "string", "format": "date-time", "readOnly": true }, "next_task_id": { "title": "Next task id", "description": "The id of the next task to be executed", "type": "integer", "readOnly": true }, "created": { "title": "Created", "description": "The date the entry was created", "type": "string", "format": "date-time", "readOnly": true }, "modified": { "title": "Modified", "description": "The date the entry was modified", "type": "string", "format": "date-time", "readOnly": true }, "owner": { "title": "Owner", "description": "The name of the user who owns the entry", "type": "string", "format": "uri", "readOnly": true }, "acquisitions": { "title": "Acquisitions", "description": "The list of acquisitions related to the entry", "type": "string", "readOnly": true }, "results": { "title": "Results", "description": "The list of results related to the entry", "type": "string", "readOnly": true }, "validate_only": { "title": "Validate only", "description": "Only validate the input, do not modify the schedule", "type": "boolean", "default": false } } } } ], "responses": { "200": { "description": "", "schema": { "type": "object", "properties": { "url": { "title": "Url", "description": "The url of the entry", "type": "string", "format": "uri", "readOnly": true }, "name": { "title": "Name", "description": "[Required] The unique identifier used in URLs and filenames", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", "readOnly": true, "minLength": 1 }, "action": { "title": "Action", "description": "[Required] The name of the action to be scheduled", "type": "string", "enum": [ "acquire_700_band_iq", "acquire_700c_dl", "logger", "mock_acquire", "admin_logger", "monitor_usrp", "sync_gps" ], "readOnly": true }, "priority": { "title": "Priority", "description": "Lower number is higher priority (default=10)", "type": "integer", "maximum": 19, "minimum": -20, "x-nullable": true }, "start": { "title": "Start", "description": "UTC time (ISO 8601) to start, or leave blank for 'now'", "type": "string", "format": "date-time", "x-nullable": true }, "stop": { "title": "Absolute stop", "description": "UTC time (ISO 8601) to stop, or leave blank for 'never' (not valid with relative stop)", "type": "string", "format": "date-time", "x-nullable": true }, "relative_stop": { "title": "Relative stop", "description": "Integer seconds after start to stop, or leave blank for 'never' (not valid with absolute stop)", "type": "integer", "minimum": 1, "x-nullable": true }, "interval": { "title": "Interval", "description": "Seconds between tasks, or leave blank to run once", "type": "integer", "minimum": 1, "x-nullable": true }, "is_active": { "title": "Is active", "description": "Indicates whether the entry should be removed from the scheduler without removing it from the system", "type": "boolean" }, "is_private": { "title": "Is private", "description": "Indicates whether the entry, and resulting data, are only visible to admins", "type": "boolean" }, "callback_url": { "title": "Callback url", "description": "If given, the scheduler will POST a `TaskResult` JSON object to this URL after each task completes", "type": "string", "format": "uri", "maxLength": 200, "x-nullable": true }, "next_task_time": { "title": "Next task time", "description": "UTC time (ISO 8601) the next task is scheduled for", "type": "string", "format": "date-time", "readOnly": true }, "next_task_id": { "title": "Next task id", "description": "The id of the next task to be executed", "type": "integer", "readOnly": true }, "created": { "title": "Created", "description": "The date the entry was created", "type": "string", "format": "date-time", "readOnly": true }, "modified": { "title": "Modified", "description": "The date the entry was modified", "type": "string", "format": "date-time", "readOnly": true }, "owner": { "title": "Owner", "description": "The name of the user who owns the entry", "type": "string", "format": "uri", "readOnly": true }, "acquisitions": { "title": "Acquisitions", "description": "The list of acquisitions related to the entry", "type": "string", "readOnly": true }, "results": { "title": "Results", "description": "The list of results related to the entry", "type": "string", "readOnly": true }, "validate_only": { "title": "Validate only", "description": "Only validate the input, do not modify the schedule", "type": "boolean", "default": false } } } } }, "tags": [ "v1" ] }, "patch": { "operationId": "v1_schedule_partial_update", "description": "Partially updates the specified schedule entry.", "parameters": [ { "name": "data", "in": "body", "required": true, "schema": { "type": "object", "properties": { "url": { "title": "Url", "description": "The url of the entry", "type": "string", "format": "uri", "readOnly": true }, "name": { "title": "Name", "description": "[Required] The unique identifier used in URLs and filenames", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", "readOnly": true, "minLength": 1 }, "action": { "title": "Action", "description": "[Required] The name of the action to be scheduled", "type": "string", "enum": [ "acquire_700_band_iq", "acquire_700c_dl", "logger", "mock_acquire", "admin_logger", "monitor_usrp", "sync_gps" ], "readOnly": true }, "priority": { "title": "Priority", "description": "Lower number is higher priority (default=10)", "type": "integer", "maximum": 19, "minimum": -20, "x-nullable": true }, "start": { "title": "Start", "description": "UTC time (ISO 8601) to start, or leave blank for 'now'", "type": "string", "format": "date-time", "x-nullable": true }, "stop": { "title": "Absolute stop", "description": "UTC time (ISO 8601) to stop, or leave blank for 'never' (not valid with relative stop)", "type": "string", "format": "date-time", "x-nullable": true }, "relative_stop": { "title": "Relative stop", "description": "Integer seconds after start to stop, or leave blank for 'never' (not valid with absolute stop)", "type": "integer", "minimum": 1, "x-nullable": true }, "interval": { "title": "Interval", "description": "Seconds between tasks, or leave blank to run once", "type": "integer", "minimum": 1, "x-nullable": true }, "is_active": { "title": "Is active", "description": "Indicates whether the entry should be removed from the scheduler without removing it from the system", "type": "boolean" }, "is_private": { "title": "Is private", "description": "Indicates whether the entry, and resulting data, are only visible to admins", "type": "boolean" }, "callback_url": { "title": "Callback url", "description": "If given, the scheduler will POST a `TaskResult` JSON object to this URL after each task completes", "type": "string", "format": "uri", "maxLength": 200, "x-nullable": true }, "next_task_time": { "title": "Next task time", "description": "UTC time (ISO 8601) the next task is scheduled for", "type": "string", "format": "date-time", "readOnly": true }, "next_task_id": { "title": "Next task id", "description": "The id of the next task to be executed", "type": "integer", "readOnly": true }, "created": { "title": "Created", "description": "The date the entry was created", "type": "string", "format": "date-time", "readOnly": true }, "modified": { "title": "Modified", "description": "The date the entry was modified", "type": "string", "format": "date-time", "readOnly": true }, "owner": { "title": "Owner", "description": "The name of the user who owns the entry", "type": "string", "format": "uri", "readOnly": true }, "acquisitions": { "title": "Acquisitions", "description": "The list of acquisitions related to the entry", "type": "string", "readOnly": true }, "results": { "title": "Results", "description": "The list of results related to the entry", "type": "string", "readOnly": true }, "validate_only": { "title": "Validate only", "description": "Only validate the input, do not modify the schedule", "type": "boolean", "default": false } } } } ], "responses": { "200": { "description": "", "schema": { "type": "object", "properties": { "url": { "title": "Url", "description": "The url of the entry", "type": "string", "format": "uri", "readOnly": true }, "name": { "title": "Name", "description": "[Required] The unique identifier used in URLs and filenames", "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$", "readOnly": true, "minLength": 1 }, "action": { "title": "Action", "description": "[Required] The name of the action to be scheduled", "type": "string", "enum": [ "acquire_700_band_iq", "acquire_700c_dl", "logger", "mock_acquire", "admin_logger", "monitor_usrp", "sync_gps" ], "readOnly": true }, "priority": { "title": "Priority", "description": "Lower number is higher priority (default=10)", "type": "integer", "maximum": 19, "minimum": -20, "x-nullable": true }, "start": { "title": "Start", "description": "UTC time (ISO 8601) to start, or leave blank for 'now'", "type": "string", "format": "date-time", "x-nullable": true }, "stop": { "title": "Absolute stop", "description": "UTC time (ISO 8601) to stop, or leave blank for 'never' (not valid with relative stop)", "type": "string", "format": "date-time", "x-nullable": true }, "relative_stop": { "title": "Relative stop", "description": "Integer seconds after start to stop, or leave blank for 'never' (not valid with absolute stop)", "type": "integer", "minimum": 1, "x-nullable": true }, "interval": { "title": "Interval", "description": "Seconds between tasks, or leave blank to run once", "type": "integer", "minimum": 1, "x-nullable": true }, "is_active": { "title": "Is active", "description": "Indicates whether the entry should be removed from the scheduler without removing it from the system", "type": "boolean" }, "is_private": { "title": "Is private", "description": "Indicates whether the entry, and resulting data, are only visible to admins", "type": "boolean" }, "callback_url": { "title": "Callback url", "description": "If given, the scheduler will POST a `TaskResult` JSON object to this URL after each task completes", "type": "string", "format": "uri", "maxLength": 200, "x-nullable": true }, "next_task_time": { "title": "Next task time", "description": "UTC time (ISO 8601) the next task is scheduled for", "type": "string", "format": "date-time", "readOnly": true }, "next_task_id": { "title": "Next task id", "description": "The id of the next task to be executed", "type": "integer", "readOnly": true }, "created": { "title": "Created", "description": "The date the entry was created", "type": "string", "format": "date-time", "readOnly": true }, "modified": { "title": "Modified", "description": "The date the entry was modified", "type": "string", "format": "date-time", "readOnly": true }, "owner": { "title": "Owner", "description": "The name of the user who owns the entry", "type": "string", "format": "uri", "readOnly": true }, "acquisitions": { "title": "Acquisitions", "description": "The list of acquisitions related to the entry", "type": "string", "readOnly": true }, "results": { "title": "Results", "description": "The list of results related to the entry", "type": "string", "readOnly": true }, "validate_only": { "title": "Validate only", "description": "Only validate the input, do not modify the schedule", "type": "boolean", "default": false } } } } }, "tags": [ "v1" ] }, "delete": { "operationId": "v1_schedule_delete", "description": "Deletes the specified schedule entry.", "parameters": [], "responses": { "204": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [ { "name": "name", "in": "path", "description": "[Required] The unique identifier used in URLs and filenames", "required": true, "type": "string", "format": "slug", "pattern": "^[-a-zA-Z0-9_]+$" } ] }, "/v1/status": { "get": { "operationId": "v1_status_list", "description": "The status overview of the sensor.", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [] } }, "definitions": { "AcquisitionsOverview": { "type": "object", "properties": { "url": { "title": "Url", "description": "The url of the list of acquisitions", "type": "string", "format": "uri", "readOnly": true }, "acquisitions_available": { "title": "Acquisitions available", "description": "The number of available acquisitions", "type": "string", "readOnly": true }, "archive": { "title": "Archive", "description": "The url to download a SigMF archive of all acquisitions", "type": "string", "readOnly": true }, "schedule_entry": { "title": "Schedule entry", "description": "The related schedule entry for the acquisition", "type": "string", "readOnly": true } } }, "Acquisition": { "required": [ "task_id", "sigmf_metadata" ], "type": "object", "properties": { "url": { "title": "Url", "description": "The url of the acquisition", "type": "string", "format": "uri", "readOnly": true }, "task_id": { "title": "Task id", "description": "The id of the task relative to the acquisition", "type": "integer" }, "created": { "title": "Created", "description": "The time the acquisition was created", "type": "string", "format": "date-time", "readOnly": true }, "archive": { "title": "Archive", "description": "The url to download a SigMF archive of this acquisition", "type": "string", "format": "uri", "readOnly": true }, "sigmf_metadata": { "title": "Sigmf metadata", "description": "The sigmf meta data for the acquisition", "type": "object", "additionalProperties": { "type": "string" } } } }, "TaskResultsOverview": { "type": "object", "properties": { "url": { "title": "Url", "description": "The url of the list of results", "type": "string", "format": "uri", "readOnly": true }, "results_available": { "title": "Results available", "description": "The number of available results", "type": "string", "readOnly": true }, "schedule_entry": { "title": "Schedule entry", "description": "The related schedule entry for the result", "type": "string", "readOnly": true } } }, "TaskResult": { "required": [ "task_id", "started", "finished", "duration", "result" ], "type": "object", "properties": { "url": { "title": "Url", "description": "The url of the result", "type": "string", "format": "uri", "readOnly": true }, "task_id": { "title": "Task id", "description": "The id of the task relative to the result", "type": "integer" }, "started": { "title": "Started", "description": "The time the task started", "type": "string", "format": "date-time" }, "finished": { "title": "Finished", "description": "The time the task finished", "type": "string", "format": "date-time" }, "duration": { "title": "Duration", "description": "Task duration in seconds", "type": "number" }, "result": { "title": "Result", "description": "\"success\" or \"failure\"", "type": "string", "enum": [ 1, 2 ] }, "detail": { "title": "Detail", "description": "Arbitrary detail string", "type": "string", "maxLength": 512 }, "schedule_entry": { "title": "Schedule entry", "description": "The url of the parent schedule entry", "type": "string", "readOnly": true } } } } }