POST
v1.0.0stable

Create source

Create source. Manage only sources owned by this token on the current tenant.

POST/api/appstore/manage/sources
Auth:Bearer Token
Granica:30/minute

Parametry żądania

Wszystkie parametry mogą być przekazywane za pośrednictwem zapytania lub ciała

ParametrRodzajWymaganeOpis
name
stringWymagane
Source name, up to 100 characters
Przykład: 我的软件源
message
stringOpcjonalnie
Source announcement
Przykład: 欢迎使用
identifier
stringOpcjonalnie
Source identifier, up to 100 characters
source_icon
stringOpcjonalnie
HTTP(S) URL of the source icon
pay_url
stringOpcjonalnie
HTTP(S) URL of the payment page
encrypt_enabled
integerOpcjonalnie
Response encryption: 0=off, 1=on (default on when created)
Przykład: 1
open_black
integerOpcjonalnie
Auto-block devices used to add apps: 0/1
Przykład: 0
open_black2
integerOpcjonalnie
Auto-block cracking attempts: 0/1
Przykład: 0
health_alert
objectOpcjonalnie
Complete link-health alert configuration as a JSON object

Odpowiedź

ParametrRodzajWymaganeOpis
code
integerWymagane
1 indicates success; otherwise a token, validation or source error code
Przykład: 1
msg
stringWymagane
Localized result message
Przykład: 获取成功
time
integerWymagane
Unix timestamp in seconds
data
objectWymagane
Allowlisted fields visible to the source owner
Przykład odpowiedzi
{
"code":1,
"msg":"Operation successful",
"time":1780000000,
"data":
{
"source_id":"12345678",
"name":"我的软件源",
"source_url":"/api/rjy/12345678/appstore",
"message":"欢迎使用",
"encrypt_enabled":1,
"app_count":0
}
}

Kod błędu

Kod błędu4 zdefiniowane
10
Invalid token
Token is invalid or rotated; HTTP 401
11
Token expired
Token has expired; HTTP 401
40001
Source not found
Source is missing or not owned by this user/tenant; HTTP 404

Język odpowiedzi

Dostosuj język odpowiedzi API do nagłówka X- Lang. Poniższe przykłady kodów automatycznie korzystają z aktualnego języka strony.

Zalecany nagłówek
X-Lang: pl
Obsługiwane języki
zh, en, zh-TW, vi, ar, es, ru

Obsługiwane jest również Accept- Language; X- Lang ma pierwszeństwo. Nieobsługiwane języki podążają za zapasami języka strony.

Przykłady kodów

curl -X POST "https://testypro.iwai.cc,https://cer.xyul.cn,https://cer.iwai.cc/api/appstore/manage/sources" \
  -H "X-Lang: pl" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "我的软件源",
    "message": "欢迎使用",
    "identifier": "example_identifier",
    "source_icon": "example_source_icon",
    "pay_url": "example_pay_url",
    "encrypt_enabled": 1,
    "open_black": 0,
    "open_black2": 0,
    "health_alert": "example_health_alert"
  }'

Uwagi

  • 必须使用 HTTPS 传输。接口不接受 uid、tenant_id、is_official、到期时间等管理员字段。
  • 响应不包含拥有者身份、内部草稿或敏感密钥;创建源和应用受订阅、试用及数量限制。

Spróbuj w konsoli

Wypełnij poniższe parametry i wyślij wniosek o przetestowanie. Żądania są kierowane tylko do API tej witryny; adres URL jest zablokowany i nie może być zmieniony, a obecne pliki cookie logowania są włączone.

POSThttps://testypro.iwai.cc/api/appstore/manage/sourcesZamknięte na tej stronie
stringWymagane

Source name, up to 100 characters

string

Source announcement

string

Source identifier, up to 100 characters

string

HTTP(S) URL of the source icon

string

HTTP(S) URL of the payment page

integer

Response encryption: 0=off, 1=on (default on when created)

integer

Auto-block devices used to add apps: 0/1

integer

Auto-block cracking attempts: 0/1

object

Complete link-health alert configuration as a JSON object