mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
4740 lines
152 KiB
JSON
4740 lines
152 KiB
JSON
{
|
||
"swagger": "2.0",
|
||
"info": {
|
||
"contact": {},
|
||
"license": {}
|
||
},
|
||
"paths": {
|
||
"/config_spiders": {
|
||
"put": {
|
||
"description": "Put config spider",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"config spider"
|
||
],
|
||
"summary": "Put config spider",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "spider item",
|
||
"name": "spider",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/model.Spider"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/config_spiders/{id}/config": {
|
||
"get": {
|
||
"description": "Get config spider",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"config spider"
|
||
],
|
||
"summary": "Get config spider",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"description": "Post config spider config",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"config spider"
|
||
],
|
||
"summary": "Post config spider config",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "spider item",
|
||
"name": "spider",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/model.Spider"
|
||
}
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/config_spiders/{id}/spiderfile": {
|
||
"post": {
|
||
"description": "Post config spider",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"config spider"
|
||
],
|
||
"summary": "Post config spider",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/config_spiders/{id}/upload": {
|
||
"post": {
|
||
"description": "Upload config spider",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"config spider"
|
||
],
|
||
"summary": "Upload config spider",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "spider item",
|
||
"name": "spider",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/model.Spider"
|
||
}
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/config_spiders_templates": {
|
||
"get": {
|
||
"description": "Get config spider template list",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"config spider"
|
||
],
|
||
"summary": "Get config spider template list",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/docs": {
|
||
"get": {
|
||
"description": "Get docs",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"docs"
|
||
],
|
||
"summary": "Get docs",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/file": {
|
||
"get": {
|
||
"description": "Get file",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"file"
|
||
],
|
||
"summary": "Get file",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/nodes": {
|
||
"get": {
|
||
"description": "Get nodes",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"node"
|
||
],
|
||
"summary": "Get nodes",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "With the bearer started",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/nodes/{id}": {
|
||
"get": {
|
||
"description": "Get node",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"node"
|
||
],
|
||
"summary": "Get node",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "With the bearer started",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"description": "Post node",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"node"
|
||
],
|
||
"summary": "Post node",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "With the bearer started",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "post node",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"description": "Delete node",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"node"
|
||
],
|
||
"summary": "Delete node",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "With the bearer started",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "node id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/nodes/{id}/deps": {
|
||
"get": {
|
||
"description": "Get dep list",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"system"
|
||
],
|
||
"summary": "Get dep list",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "node id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "language",
|
||
"name": "lang",
|
||
"in": "query",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "dep name",
|
||
"name": "dep_name",
|
||
"in": "query",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/nodes/{id}/deps/install": {
|
||
"post": {
|
||
"description": "Install dep",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"system"
|
||
],
|
||
"summary": "Install dep",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "node id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/nodes/{id}/deps/installed": {
|
||
"get": {
|
||
"description": "Get installed dep list",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"system"
|
||
],
|
||
"summary": "Get installed dep list",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "node id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "language",
|
||
"name": "lang",
|
||
"in": "query",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/nodes/{id}/deps/uninstall": {
|
||
"post": {
|
||
"description": "Uninstall dep",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"system"
|
||
],
|
||
"summary": "Uninstall dep",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "node id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/nodes/{id}/langs": {
|
||
"get": {
|
||
"description": "Get language list",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"system"
|
||
],
|
||
"summary": "Get language list",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "node id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/nodes/{id}/langs/install": {
|
||
"post": {
|
||
"description": "Install language",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"system"
|
||
],
|
||
"summary": "Install language",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "node id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/nodes/{id}/system": {
|
||
"get": {
|
||
"description": "Get system info",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"node"
|
||
],
|
||
"summary": "Get system info",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "With the bearer started",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "node id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/nodes/{id}/tasks": {
|
||
"get": {
|
||
"description": "Get tasks on node",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"node"
|
||
],
|
||
"summary": "Get tasks on node",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "With the bearer started",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "node id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/projects": {
|
||
"get": {
|
||
"description": "Get projects",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"project"
|
||
],
|
||
"summary": "Get projects",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "With the bearer started",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "projects",
|
||
"name": "tag",
|
||
"in": "query",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"description": "Put project",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"project"
|
||
],
|
||
"summary": "Put project",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "With the bearer started",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "post project",
|
||
"name": "p",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/model.Project"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/projects/tags": {
|
||
"get": {
|
||
"description": "Get projects tags",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"project"
|
||
],
|
||
"summary": "Get project tags",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/projects/{id}": {
|
||
"post": {
|
||
"description": "Post project",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"project"
|
||
],
|
||
"summary": "Post project",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "project id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "project item",
|
||
"name": "item",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/model.Project"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"description": "Delete project",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"project"
|
||
],
|
||
"summary": "Delete project",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "project id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/releases/latest": {
|
||
"get": {
|
||
"description": "Get latest release",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"version"
|
||
],
|
||
"summary": "Get latest release",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/schedules": {
|
||
"get": {
|
||
"description": "Get spider list",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Get spider list",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "page num",
|
||
"name": "page_num",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "page size",
|
||
"name": "page_size",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "keyword",
|
||
"name": "keyword",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "project_id",
|
||
"name": "project_id",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "type",
|
||
"name": "type",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "sort_key",
|
||
"name": "sort_key",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "sort_direction",
|
||
"name": "sort_direction",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "owner_type",
|
||
"name": "owner_type",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"description": "Put schedule",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"schedule"
|
||
],
|
||
"summary": "Put schedule",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "schedule item",
|
||
"name": "item",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/model.Schedule"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/schedules/{id}": {
|
||
"get": {
|
||
"description": "Get schedule by id",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"schedule"
|
||
],
|
||
"summary": "Get schedule by id",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "schedule id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"description": "Post schedule",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"schedule"
|
||
],
|
||
"summary": "Post schedule",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "schedule id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "schedule item",
|
||
"name": "newItem",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/model.Schedule"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"description": "Delete schedule",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"schedule"
|
||
],
|
||
"summary": "Delete schedule",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "schedule id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/schedules/{id}/disable": {
|
||
"post": {
|
||
"description": "disable schedule",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"schedule"
|
||
],
|
||
"summary": "disable schedule",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "schedule id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/schedules/{id}/enable": {
|
||
"post": {
|
||
"description": "enable schedule",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"schedule"
|
||
],
|
||
"summary": "enable schedule",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "schedule id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/setting": {
|
||
"get": {
|
||
"description": "Get setting",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"setting"
|
||
],
|
||
"summary": "Get setting",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders": {
|
||
"put": {
|
||
"description": "Put spider",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Put spider",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "spider item",
|
||
"name": "spider",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/model.Spider"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"description": "delete spider",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "delete spider",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders-cancel": {
|
||
"post": {
|
||
"description": "cancel spider",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "cancel spider",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders-run": {
|
||
"post": {
|
||
"description": "run spider",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "run spider",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}": {
|
||
"get": {
|
||
"description": "Get spider by id",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Get spider by id",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "schedule id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"description": "Post spider",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Post spider",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "schedule id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "spider item",
|
||
"name": "item",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/model.Spider"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"description": "Delete spider by id",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Delete spider by id",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}/copy": {
|
||
"post": {
|
||
"description": "Copy spider",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Copy spider",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "schedule id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}/dir": {
|
||
"get": {
|
||
"description": "Get spider dir",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Get spider dir",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "path",
|
||
"name": "path",
|
||
"in": "query",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}/file": {
|
||
"get": {
|
||
"description": "Get spider file",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Get spider file",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "path",
|
||
"name": "path",
|
||
"in": "query",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"description": "Post spider dir",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Post spider dir",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "path",
|
||
"name": "reqBody",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/routes.SpiderFileReqBody"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"description": "Put spider file",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Put spider file",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "path",
|
||
"name": "reqBody",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/routes.SpiderFileReqBody"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"description": "Delete spider file",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Delete spider file",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "path",
|
||
"name": "reqBody",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/routes.SpiderFileReqBody"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}/file/rename": {
|
||
"post": {
|
||
"description": "Rename spider file",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Rename spider file",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "path",
|
||
"name": "reqBody",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/routes.SpiderFileReqBody"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}/file/tree": {
|
||
"get": {
|
||
"description": "Get spider dir",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Get spider dir",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}/git/reset": {
|
||
"post": {
|
||
"description": "Post spider reset git",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Post spider reset git",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}/git/sync": {
|
||
"post": {
|
||
"description": "Post spider sync git",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Post spider sync git",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}/publish": {
|
||
"post": {
|
||
"description": "Publish spider",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Publish spider",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "schedule id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}/schedules": {
|
||
"get": {
|
||
"description": "Get schedules",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Get schedules",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}/scrapy/items": {
|
||
"get": {
|
||
"description": "Get scrapy spider items",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Get scrapy spider items",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"description": "Post scrapy spider items",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Post scrapy spider items",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "req data",
|
||
"name": "reqData",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "entity.ScrapyItem",
|
||
"items": {
|
||
"$ref": "#/definitions/entity.ScrapyItem"
|
||
}
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}/scrapy/pipelines": {
|
||
"get": {
|
||
"description": "Get scrapy spider pipelines",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Get scrapy spider pipelines",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}/scrapy/settings": {
|
||
"get": {
|
||
"description": "Get scrapy spider settings",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Get scrapy spider settings",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"description": "Get scrapy spider file",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Get scrapy spider file",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "req data",
|
||
"name": "reqData",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "entity.ScrapySettingParam",
|
||
"items": {
|
||
"$ref": "#/definitions/entity.ScrapySettingParam"
|
||
}
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}/scrapy/spider/filepath": {
|
||
"get": {
|
||
"description": "Get scrapy spider file path",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Get scrapy spider file path",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}/scrapy/spiders": {
|
||
"get": {
|
||
"description": "Get scrapy spider file",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Get scrapy spider file",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"description": "Put scrapy spider file",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Put scrapy spider file",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}/stats": {
|
||
"get": {
|
||
"description": "Get spider stats",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Get spider stats",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}/tasks": {
|
||
"get": {
|
||
"description": "Get task list",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Get task list",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/spiders/{id}/upload": {
|
||
"post": {
|
||
"description": "Upload spider by id",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"spider"
|
||
],
|
||
"summary": "Upload spider by id",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "file",
|
||
"description": "spider file to upload",
|
||
"name": "file",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "spider id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/stats/home": {
|
||
"get": {
|
||
"description": "Get home stats",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"version"
|
||
],
|
||
"summary": "Get home stats",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/system/deps/": {
|
||
"get": {
|
||
"description": "Get all dep list",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"system"
|
||
],
|
||
"summary": "Get all dep list",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "language",
|
||
"name": "lang",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "dep name",
|
||
"name": "dep_nane",
|
||
"in": "query",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/system/deps/{lang}/{dep_name}/json": {
|
||
"get": {
|
||
"description": "Get dep json",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"system"
|
||
],
|
||
"summary": "Get dep json",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "language",
|
||
"name": "lang",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "dep name",
|
||
"name": "dep_name",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/task/{id}": {
|
||
"delete": {
|
||
"description": "Delete task",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"task"
|
||
],
|
||
"summary": "Delete task",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "task id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tasks": {
|
||
"get": {
|
||
"description": "Get task list",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"task"
|
||
],
|
||
"summary": "Get task list",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "req data",
|
||
"name": "data",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/routes.TaskListRequestData"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"description": "Put task",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"task"
|
||
],
|
||
"summary": "Put task",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"description": "Delete tasks",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"task"
|
||
],
|
||
"summary": "Delete tasks",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tasks/{id}": {
|
||
"get": {
|
||
"description": "Get task",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"task"
|
||
],
|
||
"summary": "Get task",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "task id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tasks/{id}/cancel": {
|
||
"post": {
|
||
"description": "Cancel task",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"task"
|
||
],
|
||
"summary": "Cancel task",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "task id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tasks/{id}/error-log": {
|
||
"delete": {
|
||
"description": "Get task error log",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"task"
|
||
],
|
||
"summary": "Get task error log",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "task id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tasks/{id}/log": {
|
||
"delete": {
|
||
"description": "Get task log",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"task"
|
||
],
|
||
"summary": "Get task log",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "task id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tasks/{id}/restart": {
|
||
"post": {
|
||
"description": "Restart task",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"task"
|
||
],
|
||
"summary": "Restart task",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "task id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tasks/{id}/results": {
|
||
"get": {
|
||
"description": "Get task list",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"task"
|
||
],
|
||
"summary": "Get task list",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "req data",
|
||
"name": "data",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/routes.TaskResultsRequestData"
|
||
}
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "task id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tasks/{id}/results/download": {
|
||
"get": {
|
||
"description": "Get task results",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"task"
|
||
],
|
||
"summary": "Get task results",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "task id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tasks_by_status": {
|
||
"delete": {
|
||
"description": "Delete task",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"task"
|
||
],
|
||
"summary": "Delete task",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "task status",
|
||
"name": "status",
|
||
"in": "query",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tokens": {
|
||
"get": {
|
||
"description": "token",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"token"
|
||
],
|
||
"summary": "Get token",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"description": "token",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"token"
|
||
],
|
||
"summary": "Put token",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tokens/{id}": {
|
||
"delete": {
|
||
"description": "Delete token",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"token"
|
||
],
|
||
"summary": "Delete token",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "token id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/users": {
|
||
"get": {
|
||
"description": "Get user list",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"token"
|
||
],
|
||
"summary": "Get user list",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "data body",
|
||
"name": "data",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/routes.UserListRequestData"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"description": "Put user",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"user"
|
||
],
|
||
"summary": "Put user",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "reqData body",
|
||
"name": "reqData",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/routes.UserRequestData"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/users/{id}": {
|
||
"get": {
|
||
"description": "user",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"user"
|
||
],
|
||
"summary": "Get user",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "user id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"description": "Post user",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"user"
|
||
],
|
||
"summary": "Post user",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "user body",
|
||
"name": "item",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/model.User"
|
||
}
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "user id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"description": "Delete user",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"user"
|
||
],
|
||
"summary": "Delete user",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "user id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/variable": {
|
||
"put": {
|
||
"description": "Put variable",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"variable"
|
||
],
|
||
"summary": "Put variable",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "reqData body",
|
||
"name": "variable",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/model.Variable"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/variable/{id}": {
|
||
"post": {
|
||
"description": "Post variable",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"variable"
|
||
],
|
||
"summary": "Post variable",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "reqData body",
|
||
"name": "variable",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/model.Variable"
|
||
}
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "variable id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"description": "Delete variable",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"variable"
|
||
],
|
||
"summary": "Delete variable",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "variable id",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/variables": {
|
||
"get": {
|
||
"description": "Get variable list",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"variable"
|
||
],
|
||
"summary": "Get variable list",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/version": {
|
||
"get": {
|
||
"description": "Get version",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"setting"
|
||
],
|
||
"summary": "Get version",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Authorization token",
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "json"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"definitions": {
|
||
"entity.ConfigSpiderData": {
|
||
"type": "object",
|
||
"properties": {
|
||
"cmd": {
|
||
"description": "自定义爬虫",
|
||
"type": "string"
|
||
},
|
||
"col": {
|
||
"type": "string"
|
||
},
|
||
"display_name": {
|
||
"type": "string"
|
||
},
|
||
"engine": {
|
||
"description": "可配置爬虫",
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"description": "通用",
|
||
"type": "string"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
},
|
||
"settings": {
|
||
"type": "object"
|
||
},
|
||
"stages": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/entity.Stage"
|
||
}
|
||
},
|
||
"start_stage": {
|
||
"type": "string"
|
||
},
|
||
"start_url": {
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"entity.Field": {
|
||
"type": "object",
|
||
"properties": {
|
||
"attr": {
|
||
"type": "string"
|
||
},
|
||
"css": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"next_stage": {
|
||
"type": "string"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
},
|
||
"xpath": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"entity.ScrapyItem": {
|
||
"type": "object",
|
||
"properties": {
|
||
"fields": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"entity.ScrapySettingParam": {
|
||
"type": "object",
|
||
"properties": {
|
||
"key": {
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
},
|
||
"value": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
},
|
||
"entity.Stage": {
|
||
"type": "object",
|
||
"properties": {
|
||
"fields": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/entity.Field"
|
||
}
|
||
},
|
||
"is_list": {
|
||
"type": "boolean"
|
||
},
|
||
"list_css": {
|
||
"type": "string"
|
||
},
|
||
"list_xpath": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"page_attr": {
|
||
"type": "string"
|
||
},
|
||
"page_css": {
|
||
"type": "string"
|
||
},
|
||
"page_xpath": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"model.Env": {
|
||
"type": "object",
|
||
"properties": {
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"value": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"model.Node": {
|
||
"type": "object",
|
||
"properties": {
|
||
"_id": {
|
||
"type": "string"
|
||
},
|
||
"create_ts": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"hostname": {
|
||
"type": "string"
|
||
},
|
||
"ip": {
|
||
"type": "string"
|
||
},
|
||
"is_master": {
|
||
"description": "前端展示",
|
||
"type": "boolean"
|
||
},
|
||
"key": {
|
||
"description": "用于唯一标识节点,可能是mac地址,可能是ip地址",
|
||
"type": "string"
|
||
},
|
||
"mac": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"port": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"update_ts": {
|
||
"type": "string"
|
||
},
|
||
"update_ts_unix": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"model.Project": {
|
||
"type": "object",
|
||
"properties": {
|
||
"_id": {
|
||
"type": "string"
|
||
},
|
||
"create_ts": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"spiders": {
|
||
"description": "前端展示",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/model.Spider"
|
||
}
|
||
},
|
||
"tags": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"update_ts": {
|
||
"type": "string"
|
||
},
|
||
"user_id": {
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"model.Schedule": {
|
||
"type": "object",
|
||
"properties": {
|
||
"_id": {
|
||
"type": "string"
|
||
},
|
||
"create_ts": {
|
||
"type": "string"
|
||
},
|
||
"cron": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"enabled": {
|
||
"type": "boolean"
|
||
},
|
||
"entry_id": {
|
||
"type": "integer"
|
||
},
|
||
"message": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"node_ids": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"nodes": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/model.Node"
|
||
}
|
||
},
|
||
"param": {
|
||
"type": "string"
|
||
},
|
||
"run_type": {
|
||
"type": "string"
|
||
},
|
||
"scrapy_log_level": {
|
||
"type": "string"
|
||
},
|
||
"scrapy_spider": {
|
||
"type": "string"
|
||
},
|
||
"spider_id": {
|
||
"type": "string"
|
||
},
|
||
"spider_name": {
|
||
"description": "前端展示",
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"update_ts": {
|
||
"type": "string"
|
||
},
|
||
"user_id": {
|
||
"type": "string"
|
||
},
|
||
"user_name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"model.Spider": {
|
||
"type": "object",
|
||
"properties": {
|
||
"_id": {
|
||
"description": "爬虫ID",
|
||
"type": "string"
|
||
},
|
||
"cmd": {
|
||
"description": "自定义爬虫",
|
||
"type": "string"
|
||
},
|
||
"col": {
|
||
"description": "结果储存位置",
|
||
"type": "string"
|
||
},
|
||
"config": {
|
||
"description": "可配置爬虫配置",
|
||
"type": "object",
|
||
"$ref": "#/definitions/entity.ConfigSpiderData"
|
||
},
|
||
"create_ts": {
|
||
"type": "string"
|
||
},
|
||
"dedup_field": {
|
||
"description": "去重字段",
|
||
"type": "string"
|
||
},
|
||
"dedup_method": {
|
||
"description": "去重方式",
|
||
"type": "string"
|
||
},
|
||
"display_name": {
|
||
"description": "爬虫显示名称",
|
||
"type": "string"
|
||
},
|
||
"envs": {
|
||
"description": "环境变量",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/model.Env"
|
||
}
|
||
},
|
||
"file_id": {
|
||
"description": "GridFS文件ID",
|
||
"type": "string"
|
||
},
|
||
"git_auto_sync": {
|
||
"description": "Git 是否自动同步",
|
||
"type": "boolean"
|
||
},
|
||
"git_branch": {
|
||
"description": "Git 分支",
|
||
"type": "string"
|
||
},
|
||
"git_has_credential": {
|
||
"description": "Git 是否加密",
|
||
"type": "boolean"
|
||
},
|
||
"git_password": {
|
||
"description": "Git 密码",
|
||
"type": "string"
|
||
},
|
||
"git_sync_error": {
|
||
"description": "Git 同步错误",
|
||
"type": "string"
|
||
},
|
||
"git_sync_frequency": {
|
||
"description": "Git 同步频率",
|
||
"type": "string"
|
||
},
|
||
"git_url": {
|
||
"description": "Git URL",
|
||
"type": "string"
|
||
},
|
||
"git_username": {
|
||
"description": "Git 用户名",
|
||
"type": "string"
|
||
},
|
||
"is_dedup": {
|
||
"description": "去重",
|
||
"type": "boolean"
|
||
},
|
||
"is_git": {
|
||
"description": "Git 设置",
|
||
"type": "boolean"
|
||
},
|
||
"is_long_task": {
|
||
"description": "长任务",
|
||
"type": "boolean"
|
||
},
|
||
"is_public": {
|
||
"description": "是否公开",
|
||
"type": "boolean"
|
||
},
|
||
"is_scrapy": {
|
||
"description": "Scrapy 爬虫(属于自定义爬虫)",
|
||
"type": "boolean"
|
||
},
|
||
"is_web_hook": {
|
||
"description": "Web Hook",
|
||
"type": "boolean"
|
||
},
|
||
"last_run_ts": {
|
||
"description": "前端展示",
|
||
"type": "string"
|
||
},
|
||
"last_status": {
|
||
"description": "最后执行状态",
|
||
"type": "string"
|
||
},
|
||
"latest_tasks": {
|
||
"description": "最近任务列表",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/model.Task"
|
||
}
|
||
},
|
||
"name": {
|
||
"description": "爬虫名称(唯一)",
|
||
"type": "string"
|
||
},
|
||
"project_id": {
|
||
"description": "项目ID",
|
||
"type": "string"
|
||
},
|
||
"remark": {
|
||
"description": "备注",
|
||
"type": "string"
|
||
},
|
||
"site": {
|
||
"description": "爬虫网站",
|
||
"type": "string"
|
||
},
|
||
"spider_names": {
|
||
"description": "爬虫名称列表",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"src": {
|
||
"description": "源码位置",
|
||
"type": "string"
|
||
},
|
||
"template": {
|
||
"description": "可配置爬虫",
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"description": "爬虫类别",
|
||
"type": "string"
|
||
},
|
||
"update_ts": {
|
||
"type": "string"
|
||
},
|
||
"user_id": {
|
||
"description": "时间",
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"description": "用户名称",
|
||
"type": "string"
|
||
},
|
||
"web_hook_url": {
|
||
"description": "Web Hook URL",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"model.Task": {
|
||
"type": "object",
|
||
"properties": {
|
||
"_id": {
|
||
"type": "string"
|
||
},
|
||
"cmd": {
|
||
"type": "string"
|
||
},
|
||
"create_ts": {
|
||
"type": "string"
|
||
},
|
||
"error": {
|
||
"type": "string"
|
||
},
|
||
"error_log_count": {
|
||
"type": "integer"
|
||
},
|
||
"finish_ts": {
|
||
"type": "string"
|
||
},
|
||
"log_path": {
|
||
"type": "string"
|
||
},
|
||
"node_id": {
|
||
"type": "string"
|
||
},
|
||
"node_name": {
|
||
"type": "string"
|
||
},
|
||
"param": {
|
||
"type": "string"
|
||
},
|
||
"pid": {
|
||
"type": "integer"
|
||
},
|
||
"result_count": {
|
||
"type": "integer"
|
||
},
|
||
"run_type": {
|
||
"type": "string"
|
||
},
|
||
"runtime_duration": {
|
||
"type": "number"
|
||
},
|
||
"schedule_id": {
|
||
"type": "string"
|
||
},
|
||
"spider_id": {
|
||
"type": "string"
|
||
},
|
||
"spider_name": {
|
||
"description": "前端数据",
|
||
"type": "string"
|
||
},
|
||
"start_ts": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"total_duration": {
|
||
"type": "number"
|
||
},
|
||
"update_ts": {
|
||
"type": "string"
|
||
},
|
||
"user_id": {
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
},
|
||
"wait_duration": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"model.User": {
|
||
"type": "object",
|
||
"properties": {
|
||
"_id": {
|
||
"type": "string"
|
||
},
|
||
"create_ts": {
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"password": {
|
||
"type": "string"
|
||
},
|
||
"role": {
|
||
"type": "string"
|
||
},
|
||
"setting": {
|
||
"type": "object",
|
||
"$ref": "#/definitions/model.UserSetting"
|
||
},
|
||
"update_ts": {
|
||
"type": "string"
|
||
},
|
||
"user_id": {
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"model.UserSetting": {
|
||
"type": "object",
|
||
"properties": {
|
||
"ding_talk_robot_webhook": {
|
||
"type": "string"
|
||
},
|
||
"enabled_notifications": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"error_regex_pattern": {
|
||
"type": "string"
|
||
},
|
||
"log_expire_duration": {
|
||
"type": "integer"
|
||
},
|
||
"max_error_log": {
|
||
"type": "integer"
|
||
},
|
||
"notification_trigger": {
|
||
"type": "string"
|
||
},
|
||
"wechat_robot_webhook": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"model.Variable": {
|
||
"type": "object",
|
||
"properties": {
|
||
"_id": {
|
||
"type": "string"
|
||
},
|
||
"key": {
|
||
"type": "string"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
},
|
||
"value": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"routes.SpiderFileReqBody": {
|
||
"type": "object",
|
||
"properties": {
|
||
"content": {
|
||
"type": "string"
|
||
},
|
||
"new_path": {
|
||
"type": "string"
|
||
},
|
||
"path": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"routes.TaskListRequestData": {
|
||
"type": "object",
|
||
"properties": {
|
||
"nodeId": {
|
||
"type": "string"
|
||
},
|
||
"pageNum": {
|
||
"type": "integer"
|
||
},
|
||
"pageSize": {
|
||
"type": "integer"
|
||
},
|
||
"scheduleId": {
|
||
"type": "string"
|
||
},
|
||
"spiderId": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"routes.TaskResultsRequestData": {
|
||
"type": "object",
|
||
"properties": {
|
||
"pageNum": {
|
||
"type": "integer"
|
||
},
|
||
"pageSize": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"routes.UserListRequestData": {
|
||
"type": "object",
|
||
"properties": {
|
||
"pageNum": {
|
||
"type": "integer"
|
||
},
|
||
"pageSize": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"routes.UserRequestData": {
|
||
"type": "object",
|
||
"properties": {
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"password": {
|
||
"type": "string"
|
||
},
|
||
"role": {
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
} |