{ "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": [ "https" ], "basePath": "/api", "consumes": [ "application/json" ], "produces": [ "application/json" ], "securityDefinitions": { "cert": { "type": "cert", "description": "Certificate based mutual TLS authentication. AUTHENTICATION must be set to 'CERT'. This is done by the client verifying the server certificate and the server verifying the client certificate. The client certificate Common Name (CN) should contain the username of a user that exists in the database. Client certificate verification is handled by NGINX. For more information, see https://www.rfc-editor.org/rfc/rfc5246." }, "token": { "type": "apiKey", "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. New 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://localhost/api/v1`. AUTHENTICATION should be set to 'TOKEN'", "name": "Token", "in": "header" } }, "security": [ { "cert": [] }, { "token": [] } ], "paths": { "/v1/": { "get": { "operationId": "v1_list", "description": "SCOS sensor API root.", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [] }, "/v1/capabilities/": { "get": { "operationId": "v1_capabilities_list", "description": "The capabilites of the sensor.", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [] }, "/v1/capabilities/{format}": { "get": { "operationId": "v1_capabilities_read", "description": "The capabilites of the sensor.", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [ { "name": "format", "in": "path", "required": true, "type": "string" } ] }, "/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": { "$ref": "#/definitions/ScheduleEntry" } } } } } }, "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": { "$ref": "#/definitions/ScheduleEntry" } } ], "responses": { "201": { "description": "", "schema": { "$ref": "#/definitions/ScheduleEntry" } } }, "tags": [ "v1" ] }, "parameters": [] }, "/v1/schedule/{name}/": { "get": { "operationId": "v1_schedule_read", "description": "Returns the specified schedule entry.", "parameters": [], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/ScheduleEntry" } } }, "tags": [ "v1" ] }, "put": { "operationId": "v1_schedule_update", "description": "Updates the specified schedule entry.", "parameters": [ { "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ScheduleEntry" } } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/ScheduleEntry" } } }, "tags": [ "v1" ] }, "patch": { "operationId": "v1_schedule_partial_update", "description": "Partially updates the specified schedule entry.", "parameters": [ { "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ScheduleEntry" } } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/ScheduleEntry" } } }, "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": [] }, "/v1/status{format}": { "get": { "operationId": "v1_read", "description": "The status overview of the sensor.", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [ { "name": "format", "in": "path", "required": true, "type": "string" } ] }, "/v1/tasks/": { "get": { "operationId": "v1_tasks_list", "description": "Provides links to upcoming and completed tasks", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [] }, "/v1/tasks/completed/": { "get": { "operationId": "v1_tasks_completed_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/tasks/completed/{schedule_entry_name}/": { "get": { "operationId": "v1_tasks_completed_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" ] }, "delete": { "operationId": "v1_tasks_completed_delete", "description": "Deletes all results created by the given schedule entry.", "parameters": [], "responses": { "204": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [ { "name": "schedule_entry_name", "in": "path", "required": true, "type": "string" } ] }, "/v1/tasks/completed/{schedule_entry_name}/archive/": { "get": { "operationId": "v1_tasks_completed_archive", "description": "Downloads the acquisition's SigMF archive.", "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/tasks/completed/{schedule_entry_name}/archive{format}": { "get": { "operationId": "v1_tasks_archive", "description": "Downloads the acquisition's SigMF archive.", "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" }, { "name": "format", "in": "path", "required": true, "type": "string" } ] }, "/v1/tasks/completed/{schedule_entry_name}/{task_id}/": { "get": { "operationId": "v1_tasks_completed_read", "description": "Returns a specific result.", "parameters": [], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/TaskResult" } } }, "tags": [ "v1" ] }, "delete": { "operationId": "v1_tasks_completed_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 result", "required": true, "type": "integer" } ] }, "/v1/tasks/completed/{schedule_entry_name}/{task_id}/archive": { "get": { "operationId": "v1_tasks_completed_archive", "description": "Downloads the acquisition's SigMF archive.", "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/tasks/completed/{schedule_entry_name}/{task_id}/archive{format}": { "get": { "operationId": "v1_tasks_archive", "description": "Downloads the acquisition's SigMF archive.", "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" }, { "name": "format", "in": "path", "required": true, "type": "string" } ] }, "/v1/tasks/completed/{schedule_entry_name}/{task_id}{format}": { "get": { "operationId": "v1_tasks_completed_read", "description": "Returns a specific result.", "parameters": [], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/TaskResult" } } }, "tags": [ "v1" ] }, "delete": { "operationId": "v1_tasks_completed_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 result", "required": true, "type": "integer" }, { "name": "format", "in": "path", "required": true, "type": "string" } ] }, "/v1/tasks/completed/{schedule_entry_name}{format}": { "get": { "operationId": "v1_tasks_completed_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" ] }, "delete": { "operationId": "v1_tasks_completed_delete", "description": "Deletes all results created by the given schedule entry.", "parameters": [], "responses": { "204": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [ { "name": "schedule_entry_name", "in": "path", "required": true, "type": "string" }, { "name": "format", "in": "path", "required": true, "type": "string" } ] }, "/v1/tasks/completed{format}": { "get": { "operationId": "v1_tasks_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": [ { "name": "format", "in": "path", "required": true, "type": "string" } ] }, "/v1/tasks/upcoming/": { "get": { "operationId": "v1_tasks_upcoming_list", "description": "Returns a snapshot of upcoming tasks.", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [] }, "/v1/tasks/upcoming{format}": { "get": { "operationId": "v1_tasks_read", "description": "Returns a snapshot of upcoming tasks.", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [ { "name": "format", "in": "path", "required": true, "type": "string" } ] }, "/v1/tasks/{format}": { "get": { "operationId": "v1_tasks_read", "description": "Provides links to upcoming and completed tasks", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [ { "name": "format", "in": "path", "required": true, "type": "string" } ] }, "/v1/users/": { "get": { "operationId": "v1_users_list", "description": "View user details and create users.", "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/UserDetails" } } } } } }, "tags": [ "v1" ] }, "post": { "operationId": "v1_users_create", "description": "View user details and create users.", "parameters": [ { "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/UserDetails" } } ], "responses": { "201": { "description": "", "schema": { "$ref": "#/definitions/UserDetails" } } }, "tags": [ "v1" ] }, "parameters": [] }, "/v1/users/me/": { "get": { "operationId": "v1_users_me_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/UserDetails" } } }, "tags": [ "v1" ] }, "put": { "operationId": "v1_users_me_update", "description": "", "parameters": [ { "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/UserDetails" } } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/UserDetails" } } }, "tags": [ "v1" ] }, "patch": { "operationId": "v1_users_me_partial_update", "description": "", "parameters": [ { "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/UserDetails" } } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/UserDetails" } } }, "tags": [ "v1" ] }, "delete": { "operationId": "v1_users_me_delete", "description": "", "parameters": [], "responses": { "204": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [] }, "/v1/users/me{format}": { "get": { "operationId": "v1_users_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/UserDetails" } } }, "tags": [ "v1" ] }, "put": { "operationId": "v1_users_update", "description": "", "parameters": [ { "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/UserDetails" } } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/UserDetails" } } }, "tags": [ "v1" ] }, "patch": { "operationId": "v1_users_partial_update", "description": "", "parameters": [ { "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/UserDetails" } } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/UserDetails" } } }, "tags": [ "v1" ] }, "delete": { "operationId": "v1_users_delete", "description": "", "parameters": [], "responses": { "204": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [ { "name": "format", "in": "path", "required": true, "type": "string" } ] }, "/v1/users/{format}": { "get": { "operationId": "v1_users_read", "description": "View user details and create users.", "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/UserDetails" } } } } } }, "tags": [ "v1" ] }, "post": { "operationId": "v1_users_create", "description": "View user details and create users.", "parameters": [ { "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/UserDetails" } } ], "responses": { "201": { "description": "", "schema": { "$ref": "#/definitions/UserDetails" } } }, "tags": [ "v1" ] }, "parameters": [ { "name": "format", "in": "path", "required": true, "type": "string" } ] }, "/v1/users/{id}/": { "get": { "operationId": "v1_users_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/UserDetails" } } }, "tags": [ "v1" ] }, "put": { "operationId": "v1_users_update", "description": "", "parameters": [ { "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/UserDetails" } } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/UserDetails" } } }, "tags": [ "v1" ] }, "patch": { "operationId": "v1_users_partial_update", "description": "", "parameters": [ { "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/UserDetails" } } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/UserDetails" } } }, "tags": [ "v1" ] }, "delete": { "operationId": "v1_users_delete", "description": "", "parameters": [], "responses": { "204": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [ { "name": "id", "in": "path", "description": "A unique integer value identifying this user.", "required": true, "type": "integer" } ] }, "/v1/users/{id}{format}": { "get": { "operationId": "v1_users_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/UserDetails" } } }, "tags": [ "v1" ] }, "put": { "operationId": "v1_users_update", "description": "", "parameters": [ { "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/UserDetails" } } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/UserDetails" } } }, "tags": [ "v1" ] }, "patch": { "operationId": "v1_users_partial_update", "description": "", "parameters": [ { "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/UserDetails" } } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/UserDetails" } } }, "tags": [ "v1" ] }, "delete": { "operationId": "v1_users_delete", "description": "", "parameters": [], "responses": { "204": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [ { "name": "id", "in": "path", "description": "A unique integer value identifying this user.", "required": true, "type": "integer" }, { "name": "format", "in": "path", "required": true, "type": "string" } ] }, "/v1/{format}": { "get": { "operationId": "v1_read", "description": "SCOS sensor API root.", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "v1" ] }, "parameters": [ { "name": "format", "in": "path", "required": true, "type": "string" } ] } }, "definitions": { "ScheduleEntry": { "required": [ "name", "action" ], "type": "object", "properties": { "self": { "title": "Self", "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": [ "test_SEA_CBRS_Measure_Baseline", "test_monitor_sigan", "test_multi_frequency_iq_action", "test_single_frequency_iq_action", "test_single_frequency_m4s_action", "test_survey_iq_action", "test_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 }, "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 }, "task_results": { "title": "Task 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 } } }, "TaskResultsOverview": { "type": "object", "properties": { "archive": { "title": "Archive", "description": "The link to a multi-recording archive of all available acquisitions", "type": "string", "readOnly": true }, "task_results": { "title": "Task results", "description": "The link to the task results", "type": "string", "readOnly": true }, "task_results_available": { "title": "Task 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 } } }, "Acquisition": { "required": [ "metadata" ], "type": "object", "properties": { "recording_id": { "title": "Recording id", "description": "The id of the recording relative to the task", "type": "integer" }, "archive": { "title": "Archive", "description": "The url to download a SigMF archive of this acquisition", "type": "string", "format": "uri", "readOnly": true }, "metadata": { "title": "Metadata", "description": "The SigMF metadata for the acquisition", "type": "object", "additionalProperties": { "type": "string", "x-nullable": true } } } }, "TaskResult": { "required": [ "task_id", "started", "finished", "data" ], "type": "object", "properties": { "self": { "title": "Self", "description": "The url of the result", "type": "string", "format": "uri", "readOnly": true }, "schedule_entry": { "title": "Schedule entry", "description": "The url of the parent schedule entry", "type": "string", "readOnly": true }, "task_id": { "title": "Task id", "description": "The id of the task relative to the result", "type": "integer" }, "status": { "title": "Status", "description": "\"success\", \"failure\", or \"notification_failed\"", "type": "string", "enum": [ 1, 2, 3, 4 ] }, "detail": { "title": "Detail", "description": "Arbitrary detail string", "type": "string", "maxLength": 512 }, "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 %H:%M:%S.%f format", "type": "string" }, "data": { "type": "array", "items": { "$ref": "#/definitions/Acquisition" } } } }, "UserDetails": { "required": [ "username" ], "type": "object", "properties": { "self": { "title": "Self", "type": "string", "format": "uri", "readOnly": true }, "username": { "title": "Username", "description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.", "type": "string", "pattern": "^[\\w.@+-]+$", "maxLength": 150, "minLength": 1 }, "is_active": { "title": "Active", "description": "Designates whether this user should be treated as active. Unselect this instead of deleting accounts.", "type": "boolean" }, "schedule_entries": { "title": "Schedule entries", "description": "The list of schedule entries owned by the user", "type": "string", "readOnly": true }, "date_joined": { "title": "Date joined", "type": "string", "format": "date-time", "readOnly": true }, "last_login": { "title": "Last login", "type": "string", "format": "date-time", "readOnly": true }, "email": { "title": "Email", "type": "string", "format": "email", "maxLength": 254, "minLength": 1, "x-nullable": true }, "auth_token": { "title": "Auth token", "type": "string", "readOnly": true }, "has_usable_password": { "title": "Has usable password", "type": "string", "readOnly": true }, "is_admin": { "title": "Is admin", "type": "string", "readOnly": true } } } } }