Web Performance Engineer (WPE)
Web Performance Engineer (WPE) · GPT Actions
Page Speed Analysis API
This API runs a page speed analysis on a given URL.
GET /page-speedPerform a page speed analysis.This endpoint performs a page speed analysis for a given URL.
GET /waitWaits for 20 seconds then returns response.Delay method used to wait for 20 seconds.
原始 API 定义
{
"openapi": "3.0.0",
"info": {
"title": "Page Speed Analysis API",
"description": "This API runs a page speed analysis on a given URL.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://wpe-gpt.aistudiolab.workers.dev",
"description": "Page Speed Analysis Service"
}
],
"paths": {
"/page-speed": {
"get": {
"operationId": "getPageSpeed",
"summary": "Perform a page speed analysis.",
"description": "This endpoint performs a page speed analysis for a given URL.",
"parameters": [
{
"name": "url",
"in": "query",
"description": "The URL to analyze.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Page speed analysis result in plain text format.",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
},
"400": {
"description": "Bad request (e.g., missing or invalid URL parameter)"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/wait": {
"get": {
"operationId": "wait",
"summary": "Waits for 20 seconds then returns response.",
"description": "Delay method used to wait for 20 seconds.",
"responses": {
"200": {
"description": "A plain text response with the next steps.",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Internal Server Error"
}
}
}
}
}
}