| CARVIEW |
Select Language
HTTP/2 301
date: Wed, 31 Dec 2025 07:42:41 GMT
content-type: text/html; charset=utf-8
content-length: 0
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
location: https://github.com/Project-PMPanel/PMPanelWebapi/wiki/REST-API
cache-control: no-cache
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com github.githubassets.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com marketplace-screenshots.githubusercontent.com/ copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com github.githubassets.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
set-cookie: _gh_sess=eJExzAzdP%2BBsdDFOq3dXWAGhXdDgCE5yV%2FpcPZ9lmwsOvP%2BecuyyOxUMAzQDDk2LgIiPFq4GdzYqbKb3Rz7k5wTEML8423k0otEOUimCpbLaFzmgciwUZwulcXO%2Frg%2BSfPzc8kPpRQA5AY6pUGrzl%2BXFoPpjm1qkaPAgKPljQLAw2LDXgjt5lWlcGCw%2FVbZyPekHPFDW46TtbxqSqQJ%2BdvEJTB9MNRVQanxvKs49%2BGO16aT0BzcOYEEepR1eoEGaHAesZWYuOVo2HZms4LfvOQ%3D%3D--2Q6wwyX%2FhCaLAnbM--rw2F3yMBzit7EIPQKS1amg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1470360243.1767166960; Path=/; Domain=github.com; Expires=Thu, 31 Dec 2026 07:42:40 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Thu, 31 Dec 2026 07:42:40 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: AB36:1D35DB:17D0EA3:1AEDBB4:6954D3F0
HTTP/2 200
date: Wed, 31 Dec 2025 07:42:41 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-robots-tag: none
etag: W/"0a702dd46d7df916394a246f7bb7c640"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com github.githubassets.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com marketplace-screenshots.githubusercontent.com/ copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com github.githubassets.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
x-github-request-id: AB36:1D35DB:17D0EF2:1AEDC06:6954D3F0
REST API · Project-PMPanel/PMPanelWebapi Wiki · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 13
REST API
ByteInternetHK edited this page Dec 1, 2021
·
14 revisions
全部接口GET请求参数均为url params 参数, & 拼接, POST请求均以json格式传输
参数均以小驼峰方式命名
对接的节点key需携带在header中的key字段
此接口需根据具体后端节点类型去请求对应类型的接口
GET /api/node
| 参数名称 | 参数类型 | 是否必须 | 备注 |
|---|---|---|---|
| type | string | true | 节点类型,类型见下方 |
| nodeId | number | true | 节点id |
type为以下值
- ss
- v2ray
- trojan
请求参数格式参考如下
?type=ss&nodeId=1
返回值根据具体的节点类型有不同字段返回值,分别返回如下格式
ss
{
"ret": 200,
"data": {
"method": "aes-256-gcm",
"id": 1,
"name": "test_ss",
"outServer": "test.ss.com",
"outPort": 8080,
"subServer": "test.ss.com",
"subPort": 8080,
"trafficRate": 1.0,
"clazz": 1,
"speedlimit": 0,
"heartbeat": "2021-07-30 21:15:23",
"flag": true
}
}v2ray
{
"ret": 200,
"data": {
"alterId": 2,
"network": "ws",
"security": "none",
"host": "www.iqiyi.com",
"path": "/video",
"id": 1,
"name": "test_v2ray",
"outServer": "test.v2ray.com",
"outPort": 443,
"subServer": "test.v2ray.com",
"subPort": 443,
"trafficRate": 1.0,
"clazz": 1,
"speedlimit": 0,
"heartbeat": "2021-07-25 22:10:19",
"flag": true
}
}trojan
{
"ret": 200,
"data": {
"grpc": false,
"id": 1,
"name": "test_trojan",
"outServer": "test.trojan.com",
"outPort": 443,
"subServer": "test.trojan.com",
"subPort": 443,
"trafficRate": 1.0,
"clazz": 1,
"speedlimit": 0,
"heartbeat": "2021-07-30 20:38:53",
"flag": true
}
}GET /api/users
| 参数名称 | 参数类型 | 是否必须 | 备注 |
|---|---|---|---|
| type | string | true | 节点类型 |
| nodeId | number | true | 节点id |
请求参数格式参考如下
?type=trojan&nodeId=1
返回参数格式参考如下
{
"ret": 200,
"data": [
{
"id":1,
"clazz":5,
"enable":true,
"expireIn":"2031-08-31 23:59:59",
"t":1633683659,
"u":6516995017,
"d":73620303942,
"p":78014010057,
"transferEnable":1099511627776,
"passwd":"a1516dd5-45b3-347b-a2f8-c49cb9236add",
"nodeSpeedlimit":500,
"nodeConnector":0,
"nodeGroup":0,
"lastUsedDate":"2021-10-08 17:01:00",
"isAdmin":1
},
{
"id":2,
"clazz":3,
"enable":true,
"expireIn":"2030-03-31 23:59:59",
"t":1632398085,
"u":29706689376,
"d":878866551121,
"p":906980301676,
"transferEnable":10737417166258176,
"passwd":"f296be52-0bbd-3114-b44c-51d4c37baf54",
"nodeSpeedlimit":0,
"nodeConnector":0,
"nodeGroup":0,
"lastUsedDate":"2021-09-23 19:54:46",
"isAdmin":0
}
]
}GET /api/rules
| 参数名称 | 参数类型 | 是否必须 | 备注 |
|---|---|---|---|
| type | string | true | 节点类型 |
| nodeId | number | true | 节点id |
请求参数格式参考如下
?type=ss&nodeId=1
返回参数格式参考如下
{
"ret": 200,
"data": [
{
"id": 1,
"name": "test1",
"regex": "test1",
"type": 1
},
{
"id": 2,
"name": "test2",
"regex": "test2",
"type": 1
}
]
}此接口需根据具体后端去请求对应类型的接口
POST /api/traffic
| 参数名称 | 参数类型 | 是否必须 | 备注 |
|---|---|---|---|
| type | string | true | 节点类型,类型见下方 |
| nodeId | number | true | 节点id |
| users | list | true | 本次用户流量,类型见下方 |
type为以下值
- ss
- v2ray
- trojan
users的json为以下格式
| 参数名称 | 参数类型 | 是否必须 | 备注 |
|---|---|---|---|
| id | number | true | 用户id |
| up | number | true | 本次上传流量 |
| down | number | true | 本次下载流量 |
| ip | string | true | 本次连接ip |
请求参数格式参考如下
{
"type": "ss",
"nodeId": 1,
"users": [
{
"id": 1,
"up": 1024,
"down": 1024,
"ip": "1.1.1.1"
}
]
}返回参数参考如下
{
"ret": 200,
"data": {}
}
POST /api/online
| 参数名称 | 参数类型 | 是否必须 | 备注 |
|---|---|---|---|
| type | string | true | 节点类型,类型见下方 |
| nodeId | number | true | 节点id |
| onlines | list | true | 本次用户在线ip,类型见下方 |
type为以下值
- ss
- v2ray
- trojan
onlines的json为以下格式
| 参数名称 | 参数类型 | 是否必须 | 备注 |
|---|---|---|---|
| user_id | number | true | 用户id |
| ip | string | true | 本次连接ip |
请求参数格式参考如下
{
"type": "ss",
"nodeId": 1,
"onlines": [
{
"user_id": 1,
"ip": "1.1.1.1"
}
]
}返回参数参考如下
{
"ret": 200,
"data": {}
}
Clone this wiki locally
You can’t perform that action at this time.