POST
v1.0.0stable

Add source app

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

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

Parametry żądania

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

ParametrRodzajWymaganeOpis
source_id
stringWymagane
Source ID owned by this user on the current site
Przykład: 12345678
name
stringWymagane
App name, up to 100 characters
Przykład: 演示应用
download_url
stringWymagane
HTTP(S) URL for downloading the app
Przykład: https://example.com/app.ipa
version
stringOpcjonalnie
App version
Przykład: 1.0
type
stringOpcjonalnie
App type
version_desc
stringOpcjonalnie
Release notes
icon_url
stringOpcjonalnie
HTTP(S) URL of the app icon
tint_color
stringOpcjonalnie
Theme color
size
stringOpcjonalnie
File size
is_lanzou
integerOpcjonalnie
LanZou Cloud link: 0/1
is_locked
integerOpcjonalnie
Requires a license key to unlock: 0/1
ios_version_limit
stringOpcjonalnie
iOS version restriction
weigh
integerOpcjonalnie
Sort weight

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":
{
"id":1,
"source_id":"12345678",
"name":"演示应用",
"version":"1.0",
"download_url":"https://example.com/app.ipa",
"status":1,
"publish_status":"published"
}
}

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/12345678/apps" \
  -H "X-Lang: pl" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "演示应用",
    "download_url": "https://example.com/app.ipa",
    "version": "1.0",
    "type": "example_type",
    "version_desc": "example_version_desc",
    "icon_url": "example_icon_url",
    "tint_color": "example_tint_color",
    "size": "example_size",
    "is_lanzou": 1,
    "is_locked": 1,
    "ios_version_limit": "example_ios_version_limit",
    "weigh": 1
  }'

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/sources/12345678/appsZamknięte na tej stronie
stringWymagane

Source ID owned by this user on the current site

stringWymagane

App name, up to 100 characters

stringWymagane

HTTP(S) URL for downloading the app

string

App version

string

App type

string

Release notes

string

HTTP(S) URL of the app icon

string

Theme color

string

File size

integer

LanZou Cloud link: 0/1

integer

Requires a license key to unlock: 0/1

string

iOS version restriction

integer

Sort weight