PPanel Edge

clients

由 openapi.json 自动生成的 3 个端点及其请求、响应和权限元数据。

此参考由已发布 API 契约生成。字段、请求头和权限要求如下。

下载完整 OpenAPI 文档 · SHA-256: ccaa20cec11fad96e369b88073ce3608a5b071ce55d6dc03fa31df7b0f08c525

标识符和数据结构与公开契约一致,说明直接给出调用规则。共享模型见 数据模型.

GET /api/v1/admin/distribution/clients

GET /api/v1/admin/distribution/clients

Edit the client catalog

{
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "clients": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "downloads": {
                      "items": {
                        "oneOf": [
                          {
                            "additionalProperties": false,
                            "properties": {
                              "platform": {
                                "maxLength": 50,
                                "minLength": 1,
                                "type": "string"
                              },
                              "type": {
                                "enum": [
                                  "external"
                                ],
                                "type": "string"
                              },
                              "url": {
                                "format": "uri",
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "platform",
                              "url"
                            ],
                            "type": "object"
                          },
                          {
                            "additionalProperties": false,
                            "properties": {
                              "file_id": {
                                "format": "uuid",
                                "type": "string"
                              },
                              "platform": {
                                "maxLength": 50,
                                "minLength": 1,
                                "type": "string"
                              },
                              "type": {
                                "enum": [
                                  "hosted"
                                ],
                                "type": "string"
                              },
                              "version": {
                                "maxLength": 100,
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "platform",
                              "file_id",
                              "version"
                            ],
                            "type": "object"
                          }
                        ]
                      },
                      "maxItems": 30,
                      "type": "array"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "i18n": {
                      "additionalProperties": {
                        "properties": {
                          "_meta": {
                            "properties": {
                              "origin": {
                                "enum": [
                                  "manual",
                                  "machine",
                                  "builtin"
                                ],
                                "type": "string"
                              },
                              "provider": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "origin"
                            ],
                            "type": "object"
                          },
                          "description": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "object"
                    },
                    "key": {
                      "pattern": "^[a-z0-9_.@-]{1,64}$",
                      "type": "string"
                    },
                    "source_locale": {
                      "pattern": "^[a-z]{2,3}(-[A-Z][a-z]{3})?(-([A-Z]{2}|\\d{3}))?$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "key",
                    "source_locale",
                    "i18n",
                    "enabled",
                    "downloads"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "version": {
                "type": "integer"
              }
            },
            "required": [
              "clients",
              "version"
            ],
            "type": "object"
          }
        }
      },
      "description": "Client catalog",
      "headers": {
        "ETag": {
          "description": "Current resource version for If-Match.",
          "schema": {
            "type": "string"
          }
        }
      }
    }
  },
  "summary": "Edit the client catalog",
  "tags": [
    "clients"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "x-concurrency": {
    "etag": true
  },
  "x-permission": "distribution.client.manage",
  "effectiveSecurity": []
}

PUT /api/v1/admin/distribution/clients

PUT /api/v1/admin/distribution/clients

Save client catalog with If-Match

{
  "parameters": [
    {
      "description": "Resource ETag; missing 428, malformed 412, stale 409.",
      "in": "header",
      "name": "If-Match",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "additionalProperties": false,
          "properties": {
            "clients": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "downloads": {
                    "items": {
                      "oneOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "platform": {
                              "maxLength": 50,
                              "minLength": 1,
                              "type": "string"
                            },
                            "type": {
                              "enum": [
                                "external"
                              ],
                              "type": "string"
                            },
                            "url": {
                              "format": "uri",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "platform",
                            "url"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "file_id": {
                              "format": "uuid",
                              "type": "string"
                            },
                            "platform": {
                              "maxLength": 50,
                              "minLength": 1,
                              "type": "string"
                            },
                            "type": {
                              "enum": [
                                "hosted"
                              ],
                              "type": "string"
                            },
                            "version": {
                              "maxLength": 100,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "platform",
                            "file_id",
                            "version"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "maxItems": 30,
                    "type": "array"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "i18n": {
                    "additionalProperties": {
                      "additionalProperties": false,
                      "properties": {
                        "_meta": {
                          "additionalProperties": false,
                          "properties": {
                            "origin": {
                              "enum": [
                                "manual",
                                "machine",
                                "builtin"
                              ],
                              "type": "string"
                            },
                            "provider": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "origin"
                          ],
                          "type": "object"
                        },
                        "description": {
                          "maxLength": 10000,
                          "type": "string"
                        },
                        "name": {
                          "maxLength": 200,
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "description"
                      ],
                      "type": "object"
                    },
                    "type": "object"
                  },
                  "key": {
                    "pattern": "^[a-z0-9_.@-]{1,64}$",
                    "type": "string"
                  },
                  "source_locale": {
                    "pattern": "^[a-z]{2,3}(-[A-Z][a-z]{3})?(-([A-Z]{2}|\\d{3}))?$",
                    "type": "string"
                  }
                },
                "required": [
                  "key",
                  "source_locale",
                  "i18n",
                  "enabled",
                  "downloads"
                ],
                "type": "object"
              },
              "maxItems": 100,
              "type": "array"
            }
          },
          "required": [
            "clients"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "clients": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "downloads": {
                      "items": {
                        "oneOf": [
                          {
                            "additionalProperties": false,
                            "properties": {
                              "platform": {
                                "maxLength": 50,
                                "minLength": 1,
                                "type": "string"
                              },
                              "type": {
                                "enum": [
                                  "external"
                                ],
                                "type": "string"
                              },
                              "url": {
                                "format": "uri",
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "platform",
                              "url"
                            ],
                            "type": "object"
                          },
                          {
                            "additionalProperties": false,
                            "properties": {
                              "file_id": {
                                "format": "uuid",
                                "type": "string"
                              },
                              "platform": {
                                "maxLength": 50,
                                "minLength": 1,
                                "type": "string"
                              },
                              "type": {
                                "enum": [
                                  "hosted"
                                ],
                                "type": "string"
                              },
                              "version": {
                                "maxLength": 100,
                                "minLength": 1,
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "platform",
                              "file_id",
                              "version"
                            ],
                            "type": "object"
                          }
                        ]
                      },
                      "maxItems": 30,
                      "type": "array"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "i18n": {
                      "additionalProperties": {
                        "properties": {
                          "_meta": {
                            "properties": {
                              "origin": {
                                "enum": [
                                  "manual",
                                  "machine",
                                  "builtin"
                                ],
                                "type": "string"
                              },
                              "provider": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "origin"
                            ],
                            "type": "object"
                          },
                          "description": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "object"
                    },
                    "key": {
                      "pattern": "^[a-z0-9_.@-]{1,64}$",
                      "type": "string"
                    },
                    "source_locale": {
                      "pattern": "^[a-z]{2,3}(-[A-Z][a-z]{3})?(-([A-Z]{2}|\\d{3}))?$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "key",
                    "source_locale",
                    "i18n",
                    "enabled",
                    "downloads"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "version": {
                "type": "integer"
              }
            },
            "required": [
              "clients",
              "version"
            ],
            "type": "object"
          }
        }
      },
      "description": "Client catalog",
      "headers": {
        "ETag": {
          "description": "Current resource version for If-Match.",
          "schema": {
            "type": "string"
          }
        }
      }
    }
  },
  "summary": "Save client catalog with If-Match",
  "tags": [
    "clients"
  ],
  "x-audit": "distribution.clients.update",
  "x-body": "json",
  "x-body-limit": 524288,
  "x-concurrency": {
    "etag": true,
    "ifMatch": true
  },
  "x-idempotency": "optional",
  "x-permission": "distribution.client.manage",
  "effectiveSecurity": []
}

GET /api/v1/public/clients

GET /api/v1/public/clients

Client downloads with verified installer metadata

{
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "items": {
                "items": {
                  "properties": {
                    "description": {
                      "type": "string"
                    },
                    "downloads": {
                      "items": {
                        "properties": {
                          "file_id": {
                            "format": "uuid",
                            "type": "string"
                          },
                          "filename": {
                            "type": "string"
                          },
                          "platform": {
                            "type": "string"
                          },
                          "sha256": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "size_bytes": {
                            "type": "string"
                          },
                          "type": {
                            "enum": [
                              "external",
                              "hosted"
                            ],
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "version": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "platform",
                          "url"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "key": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "key",
                    "downloads"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "items"
            ],
            "type": "object"
          }
        }
      },
      "description": "Client catalog"
    }
  },
  "summary": "Client downloads with verified installer metadata",
  "tags": [
    "clients"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "x-rate-limit": "distribution.clients.read",
  "effectiveSecurity": []
}