Files
2026-07-13 12:30:54 +08:00

11216 lines
320 KiB
JSON

{
"openapi": "3.1.0",
"info": {
"title": "Tianji OpenAPI (Read-Only)",
"description": "Filtered OpenAPI spec containing only GET endpoints for safe read-only access.",
"version": "v1.30.25"
},
"servers": [
{
"url": "/open"
}
],
"paths": {
"/workspace/{workspaceId}/aiGateway/all": {
"get": {
"operationId": "aiGateway-all",
"summary": "Get all gateways",
"tags": [
"AIGateway"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"name": {
"type": "string"
},
"modelApiKey": {
"type": "string",
"description": "[REDACTED] This field may contain sensitive data and should not be displayed."
},
"customModelBaseUrl": {
"type": "string",
"description": "[REDACTED] This field may contain sensitive data and should not be displayed."
},
"customModelName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"customModelInputPrice": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"customModelOutputPrice": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"workspaceId",
"name",
"createdAt",
"updatedAt"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/aiGateway/info": {
"get": {
"operationId": "aiGateway-info",
"summary": "Get gateway info",
"tags": [
"AI"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "query",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "gatewayId",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"name": {
"type": "string"
},
"modelApiKey": {
"type": "string",
"description": "[REDACTED] This field may contain sensitive data and should not be displayed."
},
"customModelBaseUrl": {
"type": "string",
"description": "[REDACTED] This field may contain sensitive data and should not be displayed."
},
"customModelName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"customModelInputPrice": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"customModelOutputPrice": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"workspaceId",
"name",
"createdAt",
"updatedAt"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/aiGateway/logs": {
"get": {
"operationId": "aiGateway-logs",
"summary": "Get gateway logs",
"tags": [
"AI"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "query",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "gatewayId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "cursor",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "limit",
"schema": {
"default": 20,
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
{
"in": "query",
"name": "logId",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"gatewayId": {
"type": "string"
},
"inputToken": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"outputToken": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"stream": {
"type": "boolean"
},
"modelName": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"Pending",
"Success",
"Failed"
]
},
"duration": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"ttft": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"price": {
"type": "number"
},
"userId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"requestPayload": {},
"responsePayload": {}
},
"required": [
"id",
"workspaceId",
"gatewayId",
"inputToken",
"outputToken",
"stream",
"modelName",
"status",
"duration",
"ttft",
"price",
"createdAt",
"updatedAt"
],
"additionalProperties": false
}
},
"nextCursor": {
"type": "string"
}
},
"required": [
"items"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/aiGateway/model-pricing": {
"get": {
"operationId": "aiGateway-modelPricing",
"summary": "Get model pricing",
"tags": [
"AI"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "query",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "search",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "limit",
"schema": {
"default": 10,
"type": "integer",
"minimum": 1,
"maximum": 50
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"providers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"api": {
"type": "string"
},
"doc": {
"type": "string"
},
"models": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"attachment": {
"type": "boolean"
},
"reasoning": {
"type": "boolean"
},
"temperature": {
"type": "boolean"
},
"tool_call": {
"type": "boolean"
},
"knowledge": {
"type": "string"
},
"release_date": {
"type": "string"
},
"last_updated": {
"type": "string"
},
"modalities": {
"type": "object",
"properties": {
"input": {
"type": "array",
"items": {
"type": "string"
}
},
"output": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"open_weights": {
"type": "boolean"
},
"cost": {
"type": "object",
"properties": {
"input": {
"type": "number"
},
"output": {
"type": "number"
},
"cache_read": {
"type": "number"
}
},
"additionalProperties": false
},
"limit": {
"type": "object",
"properties": {
"context": {
"type": "number"
},
"output": {
"type": "number"
}
},
"additionalProperties": false
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"name",
"models"
],
"additionalProperties": false
}
}
},
"required": [
"providers"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/aiGateway/quota-alert": {
"get": {
"operationId": "aiGateway-quotaAlert-get",
"summary": "Get quota alert",
"tags": [
"AI"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "query",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "gatewayId",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"dailyQuota": {
"type": "number"
},
"enabled": {
"type": "boolean"
},
"notificationId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lastAlertSentAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"alertLevel80Sent": {
"type": "boolean"
},
"alertLevel100Sent": {
"type": "boolean"
},
"alertLevel150Sent": {
"type": "boolean"
}
},
"required": [
"id",
"dailyQuota",
"enabled",
"notificationId",
"lastAlertSentAt",
"alertLevel80Sent",
"alertLevel100Sent",
"alertLevel150Sent"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/global/config": {
"get": {
"operationId": "global-config",
"summary": "Get global config",
"description": "Get Tianji system global config",
"tags": [
"Global"
],
"security": [
{
"Authorization": []
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"allowRegister": {
"type": "boolean"
},
"websiteId": {
"type": "string"
},
"amapToken": {
"type": "string"
},
"mapboxToken": {
"type": "string"
},
"alphaMode": {
"type": "boolean"
},
"disableAnonymousTelemetry": {
"type": "boolean"
},
"customTrackerScriptName": {
"type": "string"
},
"serverTimezone": {
"type": "string"
},
"authProvider": {
"type": "array",
"items": {
"type": "string"
}
},
"customAuthProviderIcon": {
"type": "string"
},
"smtpAvailable": {
"type": "boolean"
},
"enableBilling": {
"type": "boolean"
},
"ai": {
"type": "object",
"properties": {
"enable": {
"type": "boolean"
},
"contextWindow": {
"type": "number"
}
},
"required": [
"enable",
"contextWindow"
],
"additionalProperties": false
},
"enableFunctionWorker": {
"type": "boolean"
},
"observability": {
"type": "object",
"properties": {
"tianji": {
"type": "object",
"properties": {
"baseUrl": {
"type": "string"
},
"websiteId": {
"type": "string"
}
},
"additionalProperties": false
}
},
"required": [
"tianji"
],
"additionalProperties": false
}
},
"required": [
"allowRegister",
"alphaMode",
"disableAnonymousTelemetry",
"authProvider",
"smtpAvailable",
"enableBilling",
"ai",
"enableFunctionWorker",
"observability"
],
"additionalProperties": false
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/members": {
"get": {
"operationId": "workspace-members",
"summary": "Get members",
"tags": [
"Workspace"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"userId": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"role": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"user": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"nickname": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"emailVerified": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"username",
"nickname",
"email",
"emailVerified"
],
"additionalProperties": false
}
},
"required": [
"userId",
"workspaceId",
"role",
"createdAt",
"updatedAt",
"user"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/getServiceCount": {
"get": {
"operationId": "workspace-getServiceCount",
"summary": "Get service count",
"tags": [
"Workspace"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"website": {
"type": "number"
},
"application": {
"type": "number"
},
"monitor": {
"type": "number"
},
"server": {
"type": "number"
},
"telemetry": {
"type": "number"
},
"page": {
"type": "number"
},
"survey": {
"type": "number"
},
"feed": {
"type": "number"
},
"shortLink": {
"type": "number"
},
"aiGateway": {
"type": "number"
},
"functionWorker": {
"type": "number"
}
},
"required": [
"website",
"application",
"monitor",
"server",
"telemetry",
"page",
"survey",
"feed",
"shortLink",
"aiGateway",
"functionWorker"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/website/{websiteId}/onlineCount": {
"get": {
"operationId": "website-onlineCount",
"summary": "Get online count",
"tags": [
"Website"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "websiteId",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "number"
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/website/all": {
"get": {
"operationId": "website-all",
"summary": "Get all websites",
"tags": [
"Website"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"name": {
"type": "string"
},
"domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"shareId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"resetAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"monitorId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"deletedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"workspaceId",
"name",
"domain",
"shareId",
"resetAt",
"monitorId",
"createdAt",
"updatedAt",
"deletedAt"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/website/allOverview": {
"get": {
"operationId": "website-allOverview",
"summary": "Get overview",
"tags": [
"Website"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/website/{websiteId}/info": {
"get": {
"operationId": "website-info",
"summary": "Get website info",
"tags": [
"Website"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "websiteId",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"name": {
"type": "string"
},
"domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"shareId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"resetAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"monitorId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"deletedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"workspaceId",
"name",
"domain",
"shareId",
"resetAt",
"monitorId",
"createdAt",
"updatedAt",
"deletedAt"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/website/{websiteId}/stats": {
"get": {
"operationId": "website-stats",
"summary": "Get stats",
"tags": [
"Website"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "websiteId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "startAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "endAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "unit",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "url",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "country",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "region",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "city",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "timezone",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "referrer",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "title",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "os",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "browser",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "device",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"pageviews": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"prev": {
"type": "number"
}
},
"required": [
"value",
"prev"
],
"additionalProperties": false
},
"uniques": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"prev": {
"type": "number"
}
},
"required": [
"value",
"prev"
],
"additionalProperties": false
},
"totaltime": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"prev": {
"type": "number"
}
},
"required": [
"value",
"prev"
],
"additionalProperties": false
},
"bounces": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"prev": {
"type": "number"
}
},
"required": [
"value",
"prev"
],
"additionalProperties": false
}
},
"required": [
"pageviews",
"uniques",
"totaltime",
"bounces"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/website/{websiteId}/geoStats": {
"get": {
"operationId": "website-geoStats",
"summary": "Get geo stats",
"tags": [
"Website"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "websiteId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "startAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "endAt",
"schema": {
"type": "number"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"longitude": {
"type": "number"
},
"latitude": {
"type": "number"
},
"count": {
"type": "number"
}
},
"required": [
"longitude",
"latitude",
"count"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/website/{websiteId}/pageviews": {
"get": {
"operationId": "website-pageviews",
"summary": "Get pageviews",
"tags": [
"Website"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "websiteId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "startAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "endAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "unit",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "url",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "country",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "region",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "city",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "timezone",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "referrer",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "title",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "os",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "browser",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "device",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"pageviews": {},
"sessions": {}
},
"required": [
"pageviews",
"sessions"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/website/{websiteId}/metrics": {
"get": {
"operationId": "website-metrics",
"summary": "Get metrics",
"tags": [
"Website"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "websiteId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "type",
"schema": {
"type": "string",
"enum": [
"url",
"language",
"referrer",
"title",
"browser",
"os",
"device",
"country",
"event",
"utm_source",
"utm_medium",
"utm_campaign",
"utm_term",
"utm_content"
]
},
"required": true
},
{
"in": "query",
"name": "startAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "endAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "url",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "referrer",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "title",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "os",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "browser",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "device",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "country",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "region",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "city",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "language",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "event",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "utm_source",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "utm_medium",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "utm_campaign",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "utm_term",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "utm_content",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"x": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"y": {
"type": "number"
}
},
"required": [
"x",
"y"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/website/{websiteId}/getLighthouseReport": {
"get": {
"operationId": "website-getLighthouseReport",
"summary": "Get Lighthouse report",
"tags": [
"Website"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "websiteId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "limit",
"schema": {
"default": 10,
"type": "number",
"minimum": 1,
"maximum": 100
}
},
{
"in": "query",
"name": "cursor",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"Pending",
"Success",
"Failed"
]
},
"url": {
"type": "string"
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"status",
"url",
"createdAt"
],
"additionalProperties": false
}
},
"nextCursor": {
"type": "string"
}
},
"required": [
"items"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/lighthouse/{lighthouseId}": {
"get": {
"operationId": "website-getLighthouseJSON",
"summary": "Get Lighthouse JSON",
"tags": [
"Website"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "lighthouseId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/website/public/{shareId}/info": {
"get": {
"operationId": "website-getPublicInfoByShareId",
"summary": "Get public info",
"tags": [
"Website"
],
"parameters": [
{
"in": "path",
"name": "shareId",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"shareId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"name",
"createdAt",
"updatedAt"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/website/public/{shareId}/stats": {
"get": {
"operationId": "website-getPublicStatsByShareId",
"summary": "Get public stats",
"tags": [
"Website"
],
"parameters": [
{
"in": "path",
"name": "shareId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "range",
"schema": {
"default": "24h",
"type": "string",
"enum": [
"realtime",
"24h",
"7d",
"30d",
"90d"
]
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"pageviews": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"prev": {
"type": "number"
}
},
"required": [
"value",
"prev"
],
"additionalProperties": false
},
"visitors": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"prev": {
"type": "number"
}
},
"required": [
"value",
"prev"
],
"additionalProperties": false
},
"bounce_rate": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"prev": {
"type": "number"
}
},
"required": [
"value",
"prev"
],
"additionalProperties": false
},
"average_visit_duration": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"prev": {
"type": "number"
}
},
"required": [
"value",
"prev"
],
"additionalProperties": false
},
"pageviews_trend": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"value": {
"type": "number"
}
},
"required": [
"date",
"value"
],
"additionalProperties": false
}
}
},
"required": [
"pageviews",
"visitors",
"bounce_rate",
"average_visit_duration",
"pageviews_trend"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/website/public/{shareId}/metrics": {
"get": {
"operationId": "website-getPublicMetricsByShareId",
"summary": "Get public metrics",
"tags": [
"Website"
],
"parameters": [
{
"in": "path",
"name": "shareId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "type",
"schema": {
"type": "string",
"enum": [
"url",
"language",
"referrer",
"title",
"browser",
"os",
"device",
"country",
"event",
"utm_source",
"utm_medium",
"utm_campaign",
"utm_term",
"utm_content"
]
},
"required": true
},
{
"in": "query",
"name": "range",
"schema": {
"default": "24h",
"type": "string",
"enum": [
"realtime",
"24h",
"7d",
"30d",
"90d"
]
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"x": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"y": {
"type": "number"
},
"ratio": {
"type": "number"
}
},
"required": [
"x",
"y",
"ratio"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/application/all": {
"get": {
"operationId": "application-all",
"summary": "Get all applications",
"tags": [
"Application"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"name": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"deletedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"workspaceId",
"name",
"createdAt",
"updatedAt"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/application/{applicationId}/info": {
"get": {
"operationId": "application-info",
"summary": "Get application info",
"tags": [
"Application"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "applicationId",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"name": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"deletedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"applicationStoreInfos": {
"type": "array",
"items": {
"type": "object",
"properties": {
"applicationId": {
"type": "string"
},
"storeType": {
"type": "string"
},
"storeId": {
"type": "string"
},
"appId": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"releaseNotes": {
"type": "string"
},
"url": {
"type": "string"
},
"downloads": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"score": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"ratingCount": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"reviews": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"version": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"size": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"applicationId",
"storeType",
"storeId",
"appId",
"title",
"description",
"releaseNotes",
"url",
"createdAt",
"updatedAt"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"workspaceId",
"name",
"createdAt",
"updatedAt",
"applicationStoreInfos"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/application/storeAppSearch": {
"get": {
"operationId": "application-storeAppSearch",
"summary": "Search store apps",
"tags": [
"Application"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "query",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "keyword",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "storeType",
"schema": {
"type": "string",
"enum": [
"appstore",
"googleplay"
]
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"appId": {
"type": "string"
},
"title": {
"type": "string"
},
"icon": {
"type": "string"
}
},
"required": [
"appId",
"title",
"icon"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/application/{applicationId}/storeInfoHistory": {
"get": {
"operationId": "application-storeInfoHistory",
"summary": "Get store info history",
"tags": [
"Application"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "applicationId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "storeType",
"schema": {
"type": "string",
"enum": [
"appstore",
"googleplay"
]
},
"required": true
},
{
"in": "query",
"name": "storeId",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "startAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "endAt",
"schema": {
"type": "number"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"downloads": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"score": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"ratingCount": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"reviews": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"size": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
}
},
"required": [
"createdAt"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/application/{applicationId}/eventStats": {
"get": {
"operationId": "application-eventStats",
"summary": "Get event stats",
"tags": [
"Application"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "applicationId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "startAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "endAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "timezone",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "unit",
"schema": {
"type": "string",
"enum": [
"minute",
"hour",
"day",
"month",
"year"
]
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"current": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"eventCount": {
"type": "number"
},
"sessionCount": {
"type": "number"
},
"totalTime": {
"type": "number"
},
"avgEventsPerSession": {
"type": "number"
},
"avgScreensPerSession": {
"type": "number"
}
},
"required": [
"date",
"eventCount",
"sessionCount",
"totalTime",
"avgEventsPerSession",
"avgScreensPerSession"
],
"additionalProperties": false
}
},
"previous": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"eventCount": {
"type": "number"
},
"sessionCount": {
"type": "number"
},
"totalTime": {
"type": "number"
},
"avgEventsPerSession": {
"type": "number"
},
"avgScreensPerSession": {
"type": "number"
}
},
"required": [
"date",
"eventCount",
"sessionCount",
"totalTime",
"avgEventsPerSession",
"avgScreensPerSession"
],
"additionalProperties": false
}
},
"currentTotalSessionCount": {
"type": "number"
},
"previousTotalSessionCount": {
"type": "number"
}
},
"required": [
"current",
"previous",
"currentTotalSessionCount",
"previousTotalSessionCount"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/monitor/all": {
"get": {
"operationId": "monitor-all",
"summary": "Get all monitors",
"tags": [
"Monitor"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"active": {
"type": "boolean"
},
"interval": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"maxRetries": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"payload": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"trendingMode": {
"type": "boolean"
},
"recentError": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"upMessageTemplate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"downMessageTemplate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"notifications": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"workspaceId",
"name",
"type",
"active",
"interval",
"maxRetries",
"payload",
"trendingMode",
"createdAt",
"updatedAt",
"notifications"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/monitor/{monitorId}/get": {
"get": {
"operationId": "monitor-get",
"summary": "Get monitor",
"tags": [
"Monitor"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "monitorId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"active": {
"type": "boolean"
},
"interval": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"maxRetries": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"payload": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"trendingMode": {
"type": "boolean"
},
"recentError": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"upMessageTemplate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"downMessageTemplate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"notifications": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"workspaceId",
"name",
"type",
"active",
"interval",
"maxRetries",
"payload",
"trendingMode",
"createdAt",
"updatedAt",
"notifications"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/monitor/{monitorId}/data": {
"get": {
"operationId": "monitor-data",
"summary": "Get data",
"tags": [
"Monitor"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "monitorId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "startAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "endAt",
"schema": {
"type": "number"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"createdAt": {
"type": "string"
}
},
"required": [
"value",
"createdAt"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/monitor/{monitorId}/recentData": {
"get": {
"operationId": "monitor-recentData",
"summary": "Get recent data",
"tags": [
"Monitor"
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "monitorId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "take",
"schema": {
"type": "number"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"createdAt": {
"type": "string"
}
},
"required": [
"value",
"createdAt"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/monitor/{monitorId}/publicSummary": {
"get": {
"operationId": "monitor-publicSummary",
"summary": "Get public summary",
"tags": [
"Monitor"
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "monitorId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"day": {
"type": "string"
},
"totalCount": {
"type": "number"
},
"upCount": {
"type": "number"
},
"upRate": {
"type": "number"
}
},
"required": [
"day",
"totalCount",
"upCount",
"upRate"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/monitor/{monitorId}/publicData": {
"get": {
"operationId": "monitor-publicData",
"summary": "Get public data",
"tags": [
"Monitor"
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "monitorId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"createdAt": {
"type": "string"
}
},
"required": [
"value",
"createdAt"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/monitor/{monitorId}/dataMetrics": {
"get": {
"operationId": "monitor-dataMetrics",
"summary": "Get data metrics",
"tags": [
"Monitor"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "monitorId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"recent1DayAvg": {
"type": "number"
},
"recent1DayOnlineCount": {
"type": "number"
},
"recent1DayOfflineCount": {
"type": "number"
},
"recent30DayOnlineCount": {
"type": "number"
},
"recent30DayOfflineCount": {
"type": "number"
}
},
"required": [
"recent1DayAvg",
"recent1DayOnlineCount",
"recent1DayOfflineCount",
"recent30DayOnlineCount",
"recent30DayOfflineCount"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/monitor/events": {
"get": {
"operationId": "monitor-events",
"summary": "Get events",
"tags": [
"Monitor"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "monitorId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
}
},
{
"in": "query",
"name": "limit",
"schema": {
"default": 20,
"type": "number"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"message": {
"type": "string"
},
"monitorId": {
"type": "string"
},
"type": {
"type": "string"
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"message",
"monitorId",
"type",
"createdAt"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/monitor/{monitorId}/status": {
"get": {
"operationId": "monitor-getStatus",
"summary": "Get status",
"tags": [
"Monitor"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "monitorId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "statusName",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"monitorId": {
"type": "string"
},
"statusName": {
"type": "string"
},
"payload": {
"anyOf": [
{
"type": "null"
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "boolean"
},
{
"type": "number"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"monitorId",
"statusName",
"payload",
"createdAt",
"updatedAt"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/page/all": {
"get": {
"operationId": "page-getAllPages",
"summary": "Get all pages",
"tags": [
"Page"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "type",
"schema": {
"default": "all",
"type": "string",
"enum": [
"status",
"static",
"all"
]
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"body": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"monitorList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"showCurrent": {
"default": false,
"type": "boolean"
},
"showDetail": {
"default": true,
"type": "boolean"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"type": {
"type": "string",
"const": "status"
}
},
"required": [
"id",
"workspaceId",
"slug",
"title",
"description",
"body",
"monitorList",
"createdAt",
"updatedAt",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"type": {
"type": "string",
"const": "static"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"payload": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"workspaceId",
"type",
"slug",
"title",
"description",
"payload",
"createdAt",
"updatedAt"
],
"additionalProperties": false
}
]
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/page/{slug}": {
"get": {
"operationId": "page-getPageInfo",
"summary": "Get page info",
"tags": [
"Page"
],
"parameters": [
{
"in": "path",
"name": "slug",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"body": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"monitorList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"showCurrent": {
"default": false,
"type": "boolean"
},
"showDetail": {
"default": true,
"type": "boolean"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"type": {
"type": "string",
"const": "status"
}
},
"required": [
"id",
"workspaceId",
"slug",
"title",
"description",
"body",
"monitorList",
"createdAt",
"updatedAt",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"type": {
"type": "string",
"const": "static"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"domain": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"payload": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"workspaceId",
"type",
"slug",
"title",
"description",
"payload",
"createdAt",
"updatedAt"
],
"additionalProperties": false
}
]
},
{
"type": "null"
}
]
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/telemetry/all": {
"get": {
"operationId": "telemetry-all",
"summary": "Get all telemetry",
"tags": [
"Telemetry"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"name": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"deletedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"workspaceId",
"name",
"createdAt",
"updatedAt"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/telemetry/info": {
"get": {
"operationId": "telemetry-info",
"summary": "Get telemetry info",
"tags": [
"Telemetry"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "telemetryId",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"name": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"deletedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"workspaceId",
"name",
"createdAt",
"updatedAt"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/telemetry/allEventCount": {
"get": {
"operationId": "telemetry-allEventCount",
"summary": "Get all event count",
"tags": [
"Telemetry"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/telemetry/eventCount": {
"get": {
"operationId": "telemetry-eventCount",
"summary": "Get event count",
"tags": [
"Telemetry"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "telemetryId",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "number"
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/telemetry/pageviews": {
"get": {
"operationId": "telemetry-pageviews",
"summary": "Get pageviews",
"tags": [
"Telemetry"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "telemetryId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "startAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "endAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "unit",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "url",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "country",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "region",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "city",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "timezone",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"pageviews": {},
"sessions": {}
},
"required": [
"pageviews",
"sessions"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/telemetry/metrics": {
"get": {
"operationId": "telemetry-metrics",
"summary": "Get metrics",
"tags": [
"Telemetry"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "telemetryId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "type",
"schema": {
"type": "string",
"enum": [
"source",
"url",
"event",
"referrer",
"country"
]
},
"required": true
},
{
"in": "query",
"name": "startAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "endAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "url",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "country",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "region",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "city",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "timezone",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"x": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"y": {
"type": "number"
}
},
"required": [
"x",
"y"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/telemetry/stats": {
"get": {
"operationId": "telemetry-stats",
"summary": "Get stats",
"tags": [
"Telemetry"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "telemetryId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "startAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "endAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "unit",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "url",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "country",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "region",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "city",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "timezone",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"pageviews": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"prev": {
"type": "number"
}
},
"required": [
"value",
"prev"
],
"additionalProperties": false
},
"uniques": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"prev": {
"type": "number"
}
},
"required": [
"value",
"prev"
],
"additionalProperties": false
}
},
"required": [
"pageviews",
"uniques"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/survey/all": {
"get": {
"operationId": "survey-all",
"summary": "Get all surveys",
"description": "Get all surveys",
"tags": [
"Survey"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"name": {
"type": "string"
},
"desc": {
"type": "string"
},
"payload": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"text",
"select",
"email",
"imageUrl",
"hidden"
]
},
"options": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"label",
"name",
"type"
],
"additionalProperties": false
}
}
},
"required": [
"items"
],
"additionalProperties": false
},
"feedChannelIds": {
"type": "array",
"items": {
"type": "string"
}
},
"feedTemplate": {
"type": "string"
},
"webhookUrl": {
"type": "string"
},
"recentSuggestionCategory": {
"type": "array",
"items": {
"type": "string"
}
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"workspaceId",
"name",
"desc",
"payload",
"feedChannelIds",
"feedTemplate",
"webhookUrl",
"recentSuggestionCategory",
"createdAt",
"updatedAt"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/survey/{surveyId}/get": {
"get": {
"operationId": "survey-get",
"summary": "Get survey",
"description": "Get a specific survey by ID",
"tags": [
"Survey"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "path",
"name": "surveyId",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"name": {
"type": "string"
},
"desc": {
"type": "string"
},
"payload": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"text",
"select",
"email",
"imageUrl",
"hidden"
]
},
"options": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"label",
"name",
"type"
],
"additionalProperties": false
}
}
},
"required": [
"items"
],
"additionalProperties": false
},
"feedChannelIds": {
"type": "array",
"items": {
"type": "string"
}
},
"feedTemplate": {
"type": "string"
},
"webhookUrl": {
"type": "string"
},
"recentSuggestionCategory": {
"type": "array",
"items": {
"type": "string"
}
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"workspaceId",
"name",
"desc",
"payload",
"feedChannelIds",
"feedTemplate",
"webhookUrl",
"recentSuggestionCategory",
"createdAt",
"updatedAt"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/survey/{surveyId}/count": {
"get": {
"operationId": "survey-count",
"summary": "Get result count",
"description": "Get the total count of survey results",
"tags": [
"Survey"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "surveyId",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "number"
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/survey/allResultCount": {
"get": {
"operationId": "survey-allResultCount",
"summary": "Get all result counts",
"description": "Get result counts for all surveys in the workspace",
"tags": [
"Survey"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number"
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/survey/result/{resultId}": {
"get": {
"operationId": "survey-getResult",
"summary": "Get result",
"description": "Get a specific survey result by result ID",
"tags": [
"Survey"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "resultId",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"surveyId": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"sessionId": {
"type": "string"
},
"payload": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"browser": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"os": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ip": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"country": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"subdivision1": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"subdivision2": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"city": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"longitude": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"latitude": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"accuracyRadius": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"aiCategory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"aiTranslation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"surveyId",
"createdAt",
"sessionId",
"payload"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/survey/{surveyId}/result/list": {
"get": {
"operationId": "survey-resultList",
"summary": "Get result list",
"description": "Get paginated list of survey results with optional date range and filters",
"tags": [
"Survey"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "surveyId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "limit",
"schema": {
"default": 50,
"type": "number",
"minimum": 1,
"maximum": 1000
}
},
{
"in": "query",
"name": "cursor",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "startAt",
"schema": {
"type": "number"
}
},
{
"in": "query",
"name": "endAt",
"schema": {
"type": "number"
}
},
{
"in": "query",
"name": "filter",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"surveyId": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"sessionId": {
"type": "string"
},
"payload": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"browser": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"os": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ip": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"country": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"subdivision1": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"subdivision2": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"city": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"longitude": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"latitude": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"accuracyRadius": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"aiCategory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"aiTranslation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"surveyId",
"createdAt",
"sessionId",
"payload"
],
"additionalProperties": false
}
},
"nextCursor": {
"type": "string"
}
},
"required": [
"items"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/survey/{surveyId}/stats": {
"get": {
"operationId": "survey-stats",
"summary": "Get stats",
"description": "Get survey submission statistics grouped by date",
"tags": [
"Survey"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "surveyId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "startAt",
"schema": {
"type": "number"
}
},
{
"in": "query",
"name": "endAt",
"schema": {
"type": "number"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"date",
"count"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/survey/{surveyId}/aiCategoryList": {
"get": {
"operationId": "survey-aiCategoryList",
"summary": "Get AI categories",
"description": "Get AI-categorized survey results with counts for each category",
"tags": [
"Survey"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "surveyId",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"count": {
"type": "number"
}
},
"required": [
"name",
"count"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/audit/fetchByCursor": {
"get": {
"operationId": "auditLog-fetchByCursor",
"summary": "Fetch audit log",
"description": "Fetch workspace audit log",
"tags": [
"AuditLog"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "query",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "limit",
"schema": {
"default": 50,
"type": "number",
"minimum": 1,
"maximum": 100
}
},
{
"in": "query",
"name": "cursor",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"content": {
"type": "string"
},
"relatedId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"relatedType": {
"anyOf": [
{
"type": "string",
"enum": [
"Monitor",
"Notification",
"Task",
"FunctionWorker"
]
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"workspaceId",
"content",
"createdAt"
],
"additionalProperties": false
}
},
"nextCursor": {
"type": "string"
}
},
"required": [
"items"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/billing/usage": {
"get": {
"operationId": "billing-usage",
"summary": "Get usage",
"description": "get workspace usage",
"tags": [
"Billing"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "query",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "startAt",
"schema": {
"type": "number"
},
"required": true
},
{
"in": "query",
"name": "endAt",
"schema": {
"type": "number"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"websiteAcceptedCount": {
"type": "number"
},
"websiteEventCount": {
"type": "number"
},
"monitorExecutionCount": {
"type": "number"
},
"surveyCount": {
"type": "number"
},
"feedEventCount": {
"type": "number"
}
},
"required": [
"websiteAcceptedCount",
"websiteEventCount",
"monitorExecutionCount",
"surveyCount",
"feedEventCount"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/billing/limit": {
"get": {
"operationId": "billing-limit",
"summary": "Get limit",
"description": "get workspace subscription limit",
"tags": [
"Billing"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "query",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"maxWebsiteCount": {
"type": "number"
},
"maxWebsiteEventCount": {
"type": "number"
},
"maxMonitorExecutionCount": {
"type": "number"
},
"maxSurveyCount": {
"type": "number"
},
"maxFeedChannelCount": {
"type": "number"
},
"maxFeedEventCount": {
"type": "number"
}
},
"required": [
"maxWebsiteCount",
"maxWebsiteEventCount",
"maxMonitorExecutionCount",
"maxSurveyCount",
"maxFeedChannelCount",
"maxFeedEventCount"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/billing/currentTier": {
"get": {
"operationId": "billing-currentTier",
"summary": "Get current tier",
"description": "get workspace current tier",
"tags": [
"Billing"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "query",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "string",
"enum": [
"FREE",
"PRO",
"TEAM",
"UNLIMITED"
]
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/billing/currentSubscription": {
"get": {
"operationId": "billing-currentSubscription",
"summary": "Get subscription",
"description": "get workspace current subscription",
"tags": [
"Billing"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "query",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"subscriptionId": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"storeId": {
"type": "string"
},
"productId": {
"type": "string"
},
"variantId": {
"type": "string"
},
"status": {
"type": "string"
},
"cardBrand": {
"type": "string"
},
"cardLastFour": {
"type": "string"
},
"renewsAt": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"tier": {
"type": "string"
}
},
"required": [
"subscriptionId",
"workspaceId",
"storeId",
"productId",
"variantId",
"status",
"cardBrand",
"cardLastFour",
"renewsAt",
"createdAt",
"updatedAt",
"tier"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/billing/credit": {
"get": {
"operationId": "billing-credit",
"summary": "Get credit",
"description": "get workspace credit balance",
"tags": [
"Billing"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "query",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"credit": {
"type": "number"
}
},
"required": [
"credit"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/billing/credit/bills": {
"get": {
"operationId": "billing-creditBills",
"summary": "Get credit bills",
"description": "list workspace credit bills",
"tags": [
"Billing"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "query",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "page",
"schema": {
"default": 1,
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
}
},
{
"in": "query",
"name": "pageSize",
"schema": {
"default": 10,
"type": "integer",
"minimum": 1,
"maximum": 100
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"type": {
"type": "string"
},
"amount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"workspaceId",
"type",
"amount",
"createdAt"
],
"additionalProperties": false
}
},
"total": {
"type": "number"
},
"page": {
"type": "number"
},
"pageSize": {
"type": "number"
}
},
"required": [
"list",
"total",
"page",
"pageSize"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/billing/credit/packs": {
"get": {
"operationId": "billing-creditPacks",
"summary": "Get credit packs",
"description": "list available credit packs",
"tags": [
"Billing"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "query",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"variantId": {
"type": "string"
},
"credit": {
"type": "number"
},
"price": {
"type": "number"
},
"currency": {
"type": "string"
}
},
"required": [
"id",
"name",
"variantId",
"credit",
"price",
"currency"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/feed/channels": {
"get": {
"operationId": "feed-channels",
"summary": "Get all channels",
"tags": [
"Feed"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"name": {
"type": "string"
},
"webhookSignature": {
"type": "string"
},
"notifyFrequency": {
"type": "string",
"enum": [
"none",
"event",
"day",
"week",
"month"
]
},
"publicShareId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"_count": {
"type": "object",
"properties": {
"events": {
"type": "number"
}
},
"required": [
"events"
],
"additionalProperties": false
}
},
"required": [
"id",
"workspaceId",
"name",
"webhookSignature",
"notifyFrequency",
"createdAt",
"updatedAt",
"_count"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/feed/{channelId}/info": {
"get": {
"operationId": "feed-channelInfo",
"summary": "Get channel info",
"tags": [
"Feed"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "channelId",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"notificationIds": {
"type": "array",
"items": {
"type": "string"
}
},
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"name": {
"type": "string"
},
"webhookSignature": {
"type": "string"
},
"notifyFrequency": {
"type": "string",
"enum": [
"none",
"event",
"day",
"week",
"month"
]
},
"publicShareId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"notificationIds",
"id",
"workspaceId",
"name",
"webhookSignature",
"notifyFrequency",
"createdAt",
"updatedAt"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/feed/{channelId}/fetchEventsByCursor": {
"get": {
"operationId": "feed-fetchEventsByCursor",
"summary": "Fetch events",
"description": "Fetch workspace feed channel events",
"tags": [
"Feed"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "channelId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "limit",
"schema": {
"default": 50,
"type": "number",
"minimum": 1,
"maximum": 100
}
},
{
"in": "query",
"name": "cursor",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "archived",
"schema": {
"default": false,
"type": "boolean"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"channelId": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"eventName": {
"type": "string"
},
"eventContent": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"source": {
"type": "string"
},
"senderId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"senderName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"important": {
"type": "boolean"
},
"archived": {
"type": "boolean"
},
"payload": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"channelId",
"createdAt",
"updatedAt",
"eventName",
"eventContent",
"tags",
"source",
"important",
"archived"
],
"additionalProperties": false
}
},
"nextCursor": {
"type": "string"
}
},
"required": [
"items"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/feed/public/{shareId}/events": {
"get": {
"operationId": "feed-fetchPublicEventsByCursor",
"description": "Fetch public feed channel events by shareId",
"tags": [
"Feed"
],
"parameters": [
{
"in": "path",
"name": "shareId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "limit",
"schema": {
"default": 50,
"type": "number",
"minimum": 1,
"maximum": 100
}
},
{
"in": "query",
"name": "cursor",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"channelId": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"eventName": {
"type": "string"
},
"eventContent": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"source": {
"type": "string"
},
"senderId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"senderName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"important": {
"type": "boolean"
},
"archived": {
"type": "boolean"
},
"payload": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"channelId",
"createdAt",
"updatedAt",
"eventName",
"eventContent",
"tags",
"source",
"important",
"archived"
],
"additionalProperties": false
}
},
"nextCursor": {
"type": "string"
}
},
"required": [
"items"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/feed/public/{shareId}/info": {
"get": {
"operationId": "feed-getChannelByShareId",
"description": "Fetch public feed channel info by shareId",
"tags": [
"Feed"
],
"parameters": [
{
"in": "path",
"name": "shareId",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"publicShareId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/feed/state/all": {
"get": {
"operationId": "feed-state-all",
"summary": "Get all states",
"tags": [
"Feed"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "query",
"name": "channelId",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "limit",
"schema": {
"default": 5,
"type": "number"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"channelId": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"eventId": {
"type": "string"
},
"eventName": {
"type": "string"
},
"eventContent": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"source": {
"type": "string"
},
"senderId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"senderName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"important": {
"type": "boolean"
},
"status": {
"type": "string",
"enum": [
"Ongoing",
"Resolved"
]
},
"resolvedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"payload": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"channelId",
"createdAt",
"updatedAt",
"eventId",
"eventName",
"eventContent",
"tags",
"source",
"important",
"status"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/worker/all": {
"get": {
"operationId": "worker-all",
"summary": "Get all workers in workspace",
"tags": [
"Worker"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"code": {
"type": "string"
},
"revision": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"active": {
"type": "boolean"
},
"enableCron": {
"type": "boolean"
},
"cronExpression": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"visibility": {
"type": "string",
"enum": [
"Public",
"Private"
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"workspaceId",
"name",
"code",
"revision",
"active",
"enableCron",
"visibility",
"createdAt",
"updatedAt"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/worker/{workerId}/info": {
"get": {
"operationId": "worker-get",
"summary": "Get worker by ID",
"tags": [
"Worker"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "workerId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"code": {
"type": "string"
},
"revision": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"active": {
"type": "boolean"
},
"enableCron": {
"type": "boolean"
},
"cronExpression": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"visibility": {
"type": "string",
"enum": [
"Public",
"Private"
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"workspaceId",
"name",
"code",
"revision",
"active",
"enableCron",
"visibility",
"createdAt",
"updatedAt"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
},
"/workspace/{workspaceId}/worker/{workerId}/revisions": {
"get": {
"operationId": "worker-getRevisions",
"summary": "Get worker revisions",
"tags": [
"Worker"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"in": "path",
"name": "workspaceId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
},
{
"in": "path",
"name": "workerId",
"schema": {
"type": "string",
"format": "cuid2",
"pattern": "^[0-9a-z]+$"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"workerId": {
"type": "string"
},
"revision": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"code": {
"type": "string"
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"workerId",
"revision",
"code",
"createdAt"
],
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid input data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.BAD_REQUEST"
}
}
}
},
"401": {
"description": "Authorization not provided",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.UNAUTHORIZED"
}
}
}
},
"403": {
"description": "Insufficient access",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.FORBIDDEN"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.NOT_FOUND"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"error.BAD_REQUEST": {
"title": "Invalid input data error (400)",
"description": "The error information",
"example": {
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
},
"type": "object",
"properties": {
"message": {
"description": "The error message",
"example": "Invalid input data",
"type": "string"
},
"code": {
"description": "The error code",
"example": "BAD_REQUEST",
"type": "string"
},
"issues": {
"description": "An array of issues that were responsible for the error",
"example": [],
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
],
"additionalProperties": false
}
}
},
"required": [
"message",
"code"
],
"additionalProperties": false
},
"error.UNAUTHORIZED": {
"title": "Authorization not provided error (401)",
"description": "The error information",
"example": {
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
},
"type": "object",
"properties": {
"message": {
"description": "The error message",
"example": "Authorization not provided",
"type": "string"
},
"code": {
"description": "The error code",
"example": "UNAUTHORIZED",
"type": "string"
},
"issues": {
"description": "An array of issues that were responsible for the error",
"example": [],
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
],
"additionalProperties": false
}
}
},
"required": [
"message",
"code"
],
"additionalProperties": false
},
"error.FORBIDDEN": {
"title": "Insufficient access error (403)",
"description": "The error information",
"example": {
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
},
"type": "object",
"properties": {
"message": {
"description": "The error message",
"example": "Insufficient access",
"type": "string"
},
"code": {
"description": "The error code",
"example": "FORBIDDEN",
"type": "string"
},
"issues": {
"description": "An array of issues that were responsible for the error",
"example": [],
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
],
"additionalProperties": false
}
}
},
"required": [
"message",
"code"
],
"additionalProperties": false
},
"error.NOT_FOUND": {
"title": "Not found error (404)",
"description": "The error information",
"example": {
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
},
"type": "object",
"properties": {
"message": {
"description": "The error message",
"example": "Not found",
"type": "string"
},
"code": {
"description": "The error code",
"example": "NOT_FOUND",
"type": "string"
},
"issues": {
"description": "An array of issues that were responsible for the error",
"example": [],
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
],
"additionalProperties": false
}
}
},
"required": [
"message",
"code"
],
"additionalProperties": false
},
"error.INTERNAL_SERVER_ERROR": {
"title": "Internal server error error (500)",
"description": "The error information",
"example": {
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
},
"type": "object",
"properties": {
"message": {
"description": "The error message",
"example": "Internal server error",
"type": "string"
},
"code": {
"description": "The error code",
"example": "INTERNAL_SERVER_ERROR",
"type": "string"
},
"issues": {
"description": "An array of issues that were responsible for the error",
"example": [],
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
],
"additionalProperties": false
}
}
},
"required": [
"message",
"code"
],
"additionalProperties": false
}
},
"securitySchemes": {
"Authorization": {
"type": "http",
"scheme": "bearer"
}
}
}
}