接口说明
利用蒲公英提供的接口,第三方开发者可以把蒲公英提供的应用上传托管、安装等功能,接入到自己的应用中,并且可以根据数据接口,获取蒲公英提供的各种应用数据,以方便开发者更容易的进行内测应用的分发。
本页面展示的是最新版本 API 2.0,旧版本 API 1.0 将不再维护和更新。
鉴权说明
大部分 API 都是需要鉴权的,开发者可以登录蒲公英后台的 API 信息页面 获取 API Key,然后在需要鉴权的 API 中,以 POST
方式传入以下参数即可:
参数 |
说明 |
_api_key |
API Key,用来识别API调用者的身份,如不特别说明,每个接口中都需要含有此参数。对于同一个蒲公英的注册用户来说,这个值是固定的。 |
API 调用说明
开发者发送数据格式请设置为 Content-Type: application/x-www-form-urlencoded
,除非特别说明时,请求方式均为 POST
方式,返回数据格式为 JSON
。以下是通用参数概念解释:
参数 |
说明 |
appKey |
独立 App 的唯一标识符。例如某 App 上传了三个版本,那么这三个版本具有相同的 appKey。获取方式:可以在 App 管理页面中找到 appKey,也可以在某个 API 返回的结果中获取到 |
buildKey |
独立 App 版本的唯一标识符。例如某 App 上传了三个版本,那么这三个版本具有不同的 buildKey。获取方式:可以在某些 API 返回的结果中获取 |
快速上传 App (新版)
通过 API 上传 App 到蒲公英平台。代码调用示例:https://github.com/PGYER/upload-app-api-example
1、获取上传的 token
通过该接口,开发者可以获取预上传 url 和相关的签名参数
API地址
POST http://api.pgyer.com/apiv2/app/getCOSToken
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
buildType |
String |
(必填) 需要上传的应用类型,如果是iOS类型请传ios 或ipa ,如果是Android类型请传android 或apk |
oversea |
Integer |
(选填) 是否使用海外加速上传,值为:1 使用海外加速上传,2 国内加速上传;留空根据 IP 自动判断海外加速或国内加速 |
buildInstallType |
Integer |
(选填)应用安装方式,值为(1,2,3,默认为1 公开安装)。1:公开安装,2:密码安装,3:邀请安装 |
buildPassword |
String |
(选填) 设置App安装密码,密码为空时默认公开安装 |
buildDescription |
String |
(选填) 应用介绍,如没有介绍请传空字符串,或不传。 |
buildUpdateDescription |
String |
(选填) 版本更新描述,请传空字符串,或不传。 |
buildInstallDate |
Integer |
(选填)是否设置安装有效期,值为:1 设置有效时间, 2 长期有效,如果不填写不修改上一次的设置 |
buildInstallStartDate |
String |
(选填)安装有效期开始时间,字符串型,如:2018-01-01 |
buildInstallEndDate |
String |
(选填)安装有效期结束时间,字符串型,如:2018-12-31 |
buildChannelShortcut |
String |
(选填)所需更新指定的渠道短链接,渠道短链接须为已创建成功的,并且只可指定一个渠道,字符串型,如:abcd |
返回数据
参数 |
类型 |
说明 |
key |
String |
key 上传文件存储标识唯一 key |
endpoint |
String |
上传文件的 URL |
params |
Object |
上传文件需要的参数,包含signature、x-cos-security-token、key |
2、上传文件到第上一步获取的 URL
在这一步中上传 App 成功后,App 会自动进入服务器后台队列继续后续的发布流程。所以,在这一步中 App 上传完成后,并不代表 App 已经完成发布。一般来说,一般1分钟以内就能完成发布。要检查是否发布完成,请调用下一步中的 API,发送数据格式请设置为 Content-Type: multipart/form-data
。
API地址
POST 上一步响应中 endpoint
的值
POST参数
参数 |
类型 |
说明 |
key |
String |
(必填) 从上一步响应中得到 |
signature |
String |
(必填) 从上一步响应中得到 |
x-cos-security-token |
String |
(必填) 从上一步响应中得到 |
x-cos-meta-file-name |
String |
(选填) 上传的原始文件名,如 app-release.apk |
file |
File |
(必填) App 文件的本地路径 |
返回数据
如果上传成功:返回 http 状态码为 204 No Content;
如果上传失败:返回相应错误信息说明
3、检测应用是否发布完成,并获取发布应用的信息
API地址
GET http://api.pgyer.com/apiv2/app/buildInfo
参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
buildKey |
String |
(必填) 第一步中返回的key |
返回的值分为以下 3 种情况:
发布成功返回数据
参数 |
类型 |
说明 |
buildKey |
String |
Build Key是唯一标识应用的索引ID |
buildType |
Integer |
应用类型(1:iOS; 2:Android) |
buildIsFirst |
Integer |
是否是第一个App(1:是; 2:否) |
buildIsLastest |
Integer |
是否是最新版(1:是; 2:否) |
buildFileSize |
Integer |
App 文件大小 |
buildName |
String |
应用名称 |
buildVersion |
String |
版本号, 默认为1.0 (是应用向用户宣传时候用到的标识,例如:1.1、8.2.1等。) |
buildVersionNo |
String |
上传包的版本编号,默认为1 (即编译的版本号,一般来说,编译一次会变动一次这个版本号, 在 Android 上叫 Version Code。对于 iOS 来说,是字符串类型;对于 Android 来说是一个整数。例如:1001,28等。) |
buildBuildVersion |
Integer |
蒲公英生成的用于区分历史版本的build号 |
buildIdentifier |
String |
应用程序包名,iOS为BundleId,Android为包名 |
buildIcon |
String |
应用的Icon图标key,访问地址为 https://cdn-app-icon2.pgyer.com/<buildIconPath>/<buildIcon>?x-oss-process=image/resize,m_lfit,h_120,w_120/format,jpg , buildIconPath 为 buildIcon 前 5 个字符用/连接,如 buildIcon = '123abcdefaaa', buildIconPath= '1/2/3/a/b' |
buildDescription |
String |
应用介绍 |
buildUpdateDescription |
String |
应用更新说明 |
buildScreenShots |
String |
应用截图的key,获取地址为 https://www.pgyer.com/image/view/app_screenshots/<screenshot_key> |
buildShortcutUrl |
String |
应用短链接 |
buildQRCodeURL |
String |
应用二维码地址 |
buildCreated |
String |
应用上传时间 |
buildUpdated |
String |
应用更新时间 |
发布成功失败返回数据
参数 |
类型 |
说明 |
code |
Integer |
错误码,1216 应用发布失败 |
message |
String |
信息提示 |
正在发布返回数据
参数 |
类型 |
说明 |
code |
Integer |
错误码,1247 应用正在发布中 |
message |
String |
信息提示 |
如果返回 code = 1246 ,可间隔 3s ~ 5s 重新调用 URL 进行检测,直到返回成功或失败。
上传App (旧版)
本接口上传速度较慢,建议您使用 快速上传App 中的方式来替代。
API地址
POST http://api.pgyer.com/apiv2/app/upload
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
file |
File |
(必填) 需要上传的ipa或者apk文件 |
buildInstallType |
Integer |
(选填)应用安装方式,值为(1,2,3,默认为1 公开安装)。1:公开安装,2:密码安装,3:邀请安装 |
buildPassword |
String |
(选填) 设置App安装密码,密码为空时默认公开安装 |
buildUpdateDescription |
String |
(选填) 版本更新描述,请传空字符串,或不传。 |
buildInstallDate |
Integer |
(选填)是否设置安装有效期,值为:1 设置有效时间, 2 长期有效,如果不填写不修改上一次的设置 |
buildInstallStartDate |
String |
(选填)安装有效期开始时间,字符串型,如:2018-01-01 |
buildInstallEndDate |
String |
(选填)安装有效期结束时间,字符串型,如:2018-12-31 |
buildChannelShortcut |
String |
(选填)所需更新的指定渠道的下载短链接,只可指定一个渠道,字符串型,如:abcd |
返回数据
参数 |
类型 |
说明 |
buildKey |
String |
Build Key是唯一标识应用的索引ID |
buildType |
Integer |
应用类型(1:iOS; 2:Android) |
buildIsFirst |
Integer |
是否是第一个App(1:是; 2:否) |
buildIsLastest |
Integer |
是否是最新版(1:是; 2:否) |
buildFileSize |
Integer |
App 文件大小 |
buildName |
String |
应用名称 |
buildVersion |
String |
版本号, 默认为1.0 (是应用向用户宣传时候用到的标识,例如:1.1、8.2.1等。) |
buildVersionNo |
String |
上传包的版本编号,默认为1 (即编译的版本号,一般来说,编译一次会变动一次这个版本号, 在 Android 上叫 Version Code。对于 iOS 来说,是字符串类型;对于 Android 来说是一个整数。例如:1001,28等。) |
buildBuildVersion |
Integer |
蒲公英生成的用于区分历史版本的build号 |
buildIdentifier |
String |
应用程序包名,iOS为BundleId,Android为包名 |
buildIcon |
String |
应用的Icon图标key,访问地址为 https://cdn-app-icon2.pgyer.com/<buildIconPath>/<buildIcon>?x-oss-process=image/resize,m_lfit,h_120,w_120/format,jpg , buildIconPath 为 buildIcon 前 5 个字符用/连接,如 buildIcon = '123abcdefaaa', buildIconPath= '1/2/3/a/b' |
buildDescription |
String |
应用介绍 |
buildUpdateDescription |
String |
应用更新说明 |
buildScreenShots |
String |
应用截图的key,获取地址为 https://www.pgyer.com/image/view/app_screenshots/<screenshot_key> |
buildShortcutUrl |
String |
应用短链接 |
buildQRCodeURL |
String |
应用二维码地址 |
buildCreated |
String |
应用上传时间 |
buildUpdated |
String |
应用更新时间 |
安装 App
通过该接口,可以让开发者直接将安装蒲公英平台上的 App 的功能,集成到开发者自己的系统中,而不再需要通过蒲公英提供的 App 下载 Web 页。开发者需使用 GET
方式请求该接口,且必须在 iOS/Android 系统中使用。
请注意:该接口为付费接口,目前每个用户每天赠送 200 次免费请求次数,超出后将会按照 ¥0.03/次的价格从蒲公英账户余额中扣除,当账户余额不足时,该接口会返回错误。因此,在使用本接口时,开发者请保持账号余额充足。
API 地址
GET http://api.pgyer.com/apiv2/app/install
参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
appKey |
String |
(buildKey和appKey不能同时为空) 支持传入 appKey 或应用短链接,此时为安装 App 最新版本 |
buildKey |
String |
(buildKey和appKey不能同时为空) 请见 buildKey,安装 App 具体的某个版本 |
buildPassword |
String |
(选填) 当应用需要安装密码时,请传入应用安装密码 |
返回数据
接口会根据应用的类型(iOS或Android),自动使用相应的的安装方式来安装应用。
示例代码
http://api.pgyer.com/apiv2/app/install?_api_key=&buildKey={buildKey}&buildPassword={buildPassword}
iOS应用内安装
iOS应用内安装接口,可以实现用户安装应用时,无需打开浏览器,即可直接安装的效果。接口地址:
itms-services://?action=download-manifest&url=https://www.pgyer.com/app/plist/{buildKey}
如果应用为密码安装,接口地址:
itms-services://?action=download-manifest&url=https://www.pgyer.com/app/plist/{buildKey}?password={password}
请将其中的{buildKey}
换成App的buildKey,{password}
换成App的安装密码,不包含大括号。
示例代码
Web:
<a href="itms-services://?action=download-manifest&url=https://www.pgyer.com/app/plist/{buildKey}">安装</a>
iOS:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@'itms-services://?action=download-manifest&url=https://www.pgyer.com/app/plist/{buildKey}']];
或者:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@'https://api.pgyer.com/apiv2/app/install?_api_key=&buildKey={buildKey}&buildPassword={buildPassword}']];
获取App详细信息
该接口可以获取某个 App 的某个具体版本的详细信息。
API地址
POST http://api.pgyer.com/apiv2/app/view
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
appKey |
String |
(必填) 见 appKey |
buildKey |
String |
(选填) 见 buildKey |
返回数据
应用详情返回参数 |
类型 |
说明 |
buildKey |
String |
Build Key是唯一标识应用的索引ID |
buildType |
Integer |
应用类型(1:iOS; 2:Android) |
buildIsFirst |
Integer |
是否是第一个App(1:是; 2:否) |
buildIsLastest |
Integer |
是否是最新版(1:是; 2:否) |
buildFileSize |
Integer |
App 文件大小 |
buildName |
String |
应用名称 |
iconUrl |
String |
应用图标地址 |
buildVersion |
String |
版本号, 默认为1.0 (是应用向用户宣传时候用到的标识,例如:1.1、8.2.1等。) |
buildVersionNo |
String |
上传包的版本编号,默认为1 (即编译的版本号,一般来说,编译一次会变动一次这个版本号, 在 Android 上叫 Version Code。对于 iOS 来说,是字符串类型;对于 Android 来说是一个整数。例如:1001,28等。) |
buildBuildVersion |
Integer |
蒲公英生成的用于区分历史版本的build号 |
buildIdentifier |
String |
应用程序包名,iOS为BundleId,Android为包名 |
buildIcon |
String |
应用的Icon图标key,访问地址为 https://cdn-app-icon2.pgyer.com/<buildIconPath>/<buildIcon>?x-oss-process=image/resize,m_lfit,h_120,w_120/format,jpg , buildIconPath 为 buildIcon 前 5 个字符用/连接,如 buildIcon = '123abcdefaaa', buildIconPath= '1/2/3/a/b' |
buildDescription |
String |
应用介绍 |
buildUpdateDescription |
String |
应用更新说明 |
buildScreenShots |
String |
应用截图的key,获取地址为 https://www.pgyer.com/image/view/app_screenshots/<screenshot_key> |
buildScreenshotsUrl |
array |
应用截图地址 |
buildShortcutUrl |
String |
应用短链接 |
buildCates |
String |
应用分类,多个分类用 “,” 号隔开 |
buildQRCodeURL |
String |
应用二维码地址 |
buildCreated |
String |
应用上传时间 |
buildUpdated |
String |
应用更新时间 |
otherApps |
array |
历史版本 |
otherAppsCount |
int |
历史版本数量 |
todayDownloadCount |
int |
今日应用下载总次数 |
todayBuildDownloadCount |
int |
今日版本下载总次数 |
历史版本返回参数 |
类型 |
说明 |
buildKey |
String |
Build Key是唯一标识应用的索引ID |
buildName |
String |
应用名称 |
buildVersion |
String |
版本号, 默认为1.0 (是应用向用户宣传时候用到的标识,例如:1.1、8.2.1等。) |
buildBuildVersion |
Integer |
蒲公英生成的用于区分历史版本的build号 |
buildCreated |
String |
应用上传时间 |
buildUpdated |
String |
应用更新时间 |
修改 App 详细信息(更新所有版本)
API 地址
POST http://api.pgyer.com/apiv2/app/update
参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
appKey |
String |
(必填) 见 appKey |
buildShortcutUrl |
String |
(选填) 应用短链接地址 |
buildInstallType |
Integer |
(必填) 应用安装方式(2:密码安装;3:邀请安装) |
buildPassword |
String |
(选填) 安装密码 buildInstallType 为2时使用) |
appIsInstallDate |
Integer |
(选填) 是否设置有效期 (1:是;2:否) |
appInstallStartDate |
String |
(选填)有效期开始时间 (buildInstallDate 为1时使用) |
appInstallEndDate |
String |
(选填) 有效期结束时间 (buildInstallDate 为1时使用) |
appLang |
Integer |
(选填) 语言设置 (1:中文;2:英文; 3:自动;) |
buildVersionType |
Integer |
(选填) Build 版本号设置 (1:使用蒲公英生成的自增 Build 版本号; 2:使用 App 本身的 Build 版本号;) |
appAutoSync |
Integer |
(选填) 是否自动同步app信息 (1:是;2:否;) |
appShowPgyerCopyright |
Integer |
(选填) 是否在安装页面显示蒲公英版权信息 (1:是;2:否;) |
buildQrcodeShowAppIcon |
Integer |
(选填) 二维码是否显示应用图标(1:是;2:否) |
appFeedbackStatus |
Integer |
(选填) 是否开启反馈 (1:是;2:否) |
buildTemplate |
String |
(选填) 设置模版 ( 可填写的值 classic,fashion,gray,green,colorful) |
返回数据
返回参数 |
类型 |
说明 |
buildKey |
String |
Build Key是唯一标识应用的索引ID |
buildType |
Integer |
应用类型(1:iOS; 2:Android) |
buildIsFirst |
Integer |
是否是第一个App(1:是; 2:否) |
buildIsLastest |
Integer |
是否是最新版(1:是; 2:否) |
buildFileSize |
Integer |
App 文件大小 |
buildName |
String |
应用名称 |
buildPassword |
String |
应用安装密码 |
buildVersion |
String |
版本号, 默认为1.0 (是应用向用户宣传时候用到的标识,例如:1.1、8.2.1等。) |
buildVersionNo |
String |
上传包的版本编号,默认为1 (即编译的版本号,一般来说,编译一次会变动一次这个版本号, 在 Android 上叫 Version Code。对于 iOS 来说,是字符串类型;对于 Android 来说是一个整数。例如:1001,28等。) |
buildQrcodeShowAppIcon |
Integer |
是否显示二维码中的图标(1:是; 2:否) |
buildVersionType |
Integer |
是否使用蒲公英版本号(1:是; 2:否) |
buildBuildVersion |
Integer |
蒲公英生成的用于区分历史版本的build号 |
buildIdentifier |
String |
应用程序包名,iOS为BundleId,Android为包名 |
buildIcon |
String |
应用的Icon图标key,访问地址为 https://cdn-app-icon2.pgyer.com/<buildIconPath>/<buildIcon>?x-oss-process=image/resize,m_lfit,h_120,w_120/format,jpg , buildIconPath 为 buildIcon 前 5 个字符用/连接,如 buildIcon = '123abcdefaaa', buildIconPath= '1/2/3/a/b' |
buildDescription |
String |
应用介绍 |
buildUpdateDescription |
String |
应用更新说明 |
buildScreenShots |
String |
应用截图的key,获取地址为 https://www.pgyer.com/image/view/app_screenshots/<screenshot_key> |
buildShortcutUrl |
String |
应用短链接 |
buildIsAcceptFeedback |
Integer |
是否开启反馈 (1:是;2:否) |
buildIsUploadCrashlog |
Integer |
是否接受Crash(1:是;2:否) |
buildTemplate |
String |
模版 |
buildInstallType |
Integer |
应用安装方式(2:密码安装;3:邀请安装) |
buildManuallyBlocked |
Integer |
是否被屏蔽(1:是;2:否) |
buildIsPlaceholder |
Integer |
是否是空应用(1:是;2:否) |
buildCreated |
String |
应用上传时间 |
buildUpdated |
String |
应用更新时间 |
buildQRCodeURL |
String |
应用二维码地址 |
isOwner |
Integer |
是否是自己的应用(1:是;2:否) |
isJoin |
Integer |
是否是参与的应用(1:是;2:否) |
appExpiredDate |
String |
app过期时间 |
appExpiredStatus |
Integer |
是否即将过期(1:是;2:否) |
otherApps |
Array |
其他版本 |
otherAppsCount |
Integer |
版本数 |
todayDownloadCount |
Integer |
今日下载数 |
appKey |
String |
app组的Key |
appAutoSync |
Integer |
是否是同步应用市场(1:是;2:否) |
appShowPgyerCopyright |
Integer |
是否显示蒲公英版权(1:是;2:否) |
appDownloadPay |
Integer |
见 appDownloadPay参数对应的金额或其含义 |
appDownloadDescription |
String |
应用下载说明 |
appLang |
Integer |
应用语言(1:中文;2:英文; 3:自动;) |
appIsTestFlight |
Integer |
是否是TestFlight应用(1:是;2:否) |
appIsInstallDate |
Integer |
是否有安装时间限制(1:是;2:否) |
appInstallStartDate |
String |
安装开始时间 |
appInstallEndDate |
String |
安装结束时间 |
appFeedbackStatus |
Integer |
是否是开启反馈(1:是;2:否) |
isMerged |
Integer |
是否已合并(1:是;2:否) |
mergeAppInfo |
Array |
合并的应用信息 |
修改App详细信息
API地址
POST http://api.pgyer.com/apiv2/app/updateApp
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
userKey |
String |
(必填) 用户Key,用来标识当前用户的身份,开发者可在 API 信息页面中查看 |
buildKey |
String |
(选填) 见 buildKey |
screenshot |
file |
(选填) 应用截图 |
buildShortcutUrl |
String |
(选填) 应用短链接地址 |
buildUpdateDescription |
String |
(选填,传值为空则更新为空) 应用更新说明 |
buildDescription |
String |
(选填,传值为空则更新为空) 应用说明 |
buildPassword |
String |
(选填,传值为空则更新为空) 设置应用密码 |
buildVersion |
String |
(选填) 版本号, 默认为1.0 (是应用向用户宣传时候用到的标识,例如:1.1、8.2.1等。) |
buildInstallType |
Integer |
(选填) 应用安装方式 |
返回数据
返回参数 |
类型 |
说明 |
buildKey |
String |
Build Key是唯一标识应用的索引ID |
buildType |
Integer |
应用类型(1:iOS; 2:Android) |
buildIsFirst |
Integer |
是否是第一个App(1:是; 2:否) |
buildIsLastest |
Integer |
是否是最新版(1:是; 2:否) |
buildFileSize |
Integer |
App 文件大小 |
buildName |
String |
应用名称 |
buildVersion |
String |
版本号, 默认为1.0 (是应用向用户宣传时候用到的标识,例如:1.1、8.2.1等。) |
buildVersionNo |
String |
上传包的版本编号,默认为1 (即编译的版本号,一般来说,编译一次会变动一次这个版本号, 在 Android 上叫 Version Code。对于 iOS 来说,是字符串类型;对于 Android 来说是一个整数。例如:1001,28等。) |
buildBuildVersion |
Integer |
蒲公英生成的用于区分历史版本的build号 |
buildIdentifier |
String |
应用程序包名,iOS为BundleId,Android为包名 |
buildIcon |
String |
应用的Icon图标key,访问地址为 https://cdn-app-icon2.pgyer.com/<buildIconPath>/<buildIcon>?x-oss-process=image/resize,m_lfit,h_120,w_120/format,jpg , buildIconPath 为 buildIcon 前 5 个字符用/连接,如 buildIcon = '123abcdefaaa', buildIconPath= '1/2/3/a/b' |
buildDescription |
String |
应用介绍 |
buildUpdateDescription |
String |
应用更新说明 |
buildScreenShots |
String |
应用截图的key,获取地址为 https://www.pgyer.com/image/view/app_screenshots/<screenshot_key> |
buildShortcutUrl |
String |
应用短链接 |
buildCreated |
String |
应用上传时间 |
buildUpdated |
String |
应用更新时间 |
获取App所有版本
API地址
POST http://api.pgyer.com/apiv2/app/builds
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
appKey |
String |
(必填) 见 appKey |
buildKey |
String |
(选填) 见 buildKey |
page |
Integer |
(选填) 历史版本分页页数 |
返回数据
返回参数 |
类型 |
说明 |
buildKey |
String |
Build Key是唯一标识应用的索引ID |
buildType |
Integer |
应用类型(1:iOS; 2:Android) |
buildFileSize |
Integer |
App 文件大小 |
buildName |
String |
应用名称 |
buildVersion |
String |
版本号, 默认为1.0 (是应用向用户宣传时候用到的标识,例如:1.1、8.2.1等。) |
buildVersionNo |
String |
上传包的版本编号,默认为1 (即编译的版本号,一般来说,编译一次会变动一次这个版本号, 在 Android 上叫 Version Code。对于 iOS 来说,是字符串类型;对于 Android 来说是一个整数。例如:1001,28等。) |
buildBuildVersion |
Integer |
蒲公英生成的用于区分历史版本的build号 |
buildIdentifier |
String |
应用程序包名,iOS为BundleId,Android为包名 |
buildIcon |
String |
应用的Icon图标key,访问地址为 https://cdn-app-icon2.pgyer.com/<buildIconPath>/<buildIcon>?x-oss-process=image/resize,m_lfit,h_120,w_120/format,jpg , buildIconPath 为 buildIcon 前 5 个字符用/连接,如 buildIcon = '123abcdefaaa', buildIconPath= '1/2/3/a/b' |
buildCreated |
String |
应用上传时间 |
pageCount |
Integer |
版本总页数 |
currentPage |
Integer |
当前页 |
通过短链接获取App信息
API地址
POST http://api.pgyer.com/apiv2/app/getByShortcut
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
buildShortcutUrl |
String |
(必填) 应用短链接,例如pgyer.com/PgY8,只需要传入PgY8参数即可 |
返回数据
应用详情返回参数 |
类型 |
说明 |
buildKey |
String |
Build Key是唯一标识应用的索引ID |
buildIsFirst |
Integer |
是否是第一个App(1:是; 2:否) |
buildIsLastest |
Integer |
是否是最新版(1:是; 2:否) |
buildType |
Integer |
应用类型(1:iOS; 2:Android) |
buildFileName |
String |
上传的应用文件名 |
buildFileSize |
Integer |
App 文件大小 |
buildName |
String |
应用名称 |
buildVersion |
String |
版本号, 默认为1.0 (是应用向用户宣传时候用到的标识,例如:1.1、8.2.1等。) |
buildVersionNo |
String |
上传包的版本编号,默认为1 (即编译的版本号,一般来说,编译一次会变动一次这个版本号, 在 Android 上叫 Version Code。对于 iOS 来说,是字符串类型;对于 Android 来说是一个整数。例如:1001,28等。) |
buildBuildVersion |
Integer |
蒲公英生成的用于区分历史版本的build号 |
buildIdentifier |
String |
应用程序包名,iOS为BundleId,Android为包名 |
buildCreated |
String |
应用上传时间 |
buildDescription |
String |
应用介绍 |
buildUpdateDescription |
String |
应用更新说明 |
buildShortcutUrl |
String |
应用短链接 |
buildScreenShots |
String |
应用截图的key,获取地址为 https://www.pgyer.com/image/view/app_screenshots/<screenshot_key> |
查看自己上传的应用
API地址
POST http://api.pgyer.com/apiv2/app/listMy
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
page |
Integer |
(选填) 填写数字页数 |
返回数据
返回参数 |
类型 |
说明 |
buildKey |
String |
Build Key是唯一标识应用的索引ID |
buildType |
Integer |
应用类型(1:iOS; 2:Android) |
buildFileSize |
Integer |
App 文件大小 |
buildName |
String |
应用名称 |
buildVersion |
String |
版本号, 默认为1.0 (是应用向用户宣传时候用到的标识,例如:1.1、8.2.1等。) |
buildVersionNo |
String |
上传包的版本编号,默认为1 (即编译的版本号,一般来说,编译一次会变动一次这个版本号, 在 Android 上叫 Version Code。对于 iOS 来说,是字符串类型;对于 Android 来说是一个整数。例如:1001,28等。) |
buildBuildVersion |
Integer |
蒲公英生成的用于区分历史版本的build号 |
buildIdentifier |
String |
应用程序包名,iOS为BundleId,Android为包名 |
buildIcon |
String |
应用的Icon图标key,访问地址为 https://cdn-app-icon2.pgyer.com/<buildIconPath>/<buildIcon>?x-oss-process=image/resize,m_lfit,h_120,w_120/format,jpg , buildIconPath 为 buildIcon 前 5 个字符用/连接,如 buildIcon = '123abcdefaaa', buildIconPath= '1/2/3/a/b' |
buildCreated |
String |
应用上传时间 |
appKey |
String |
表示一个App组的唯一Key。 |
设置最新版本
API地址
POST http://api.pgyer.com/apiv2/app/setNewestVersion
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
buildKey |
String |
(选填) 见 buildKey |
返回数据
返回参数 |
类型 |
说明 |
code |
Integer |
Code 码(1:iOS; 2:Android) |
message |
String |
处理结果信息 |
取消最新版本
API地址
POST http://api.pgyer.com/apiv2/app/cancelNewestVersion
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
buildKey |
String |
(选填) 见 buildKey |
返回数据
返回参数 |
类型 |
说明 |
code |
Integer |
Code 码(1:iOS; 2:Android) |
message |
String |
处理结果信息 |
检测App是否有更新
API地址
POST http://api.pgyer.com/apiv2/app/check
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
appKey |
String |
(必填) 见 appKey |
buildVersion |
String |
(选填) 使用 App 本身的 Build 版本号,Android 对应字段为 versionname , iOS 对应字段为 version |
buildBuildVersion |
Integer |
(选填) 使用蒲公英生成的自增 Build 版本号 |
channelKey |
String |
(选填) 渠道 KEY |
返回数据
返回参数 |
类型 |
说明 |
buildBuildVersion |
Integer |
蒲公英生成的用于区分历史版本的build号 |
forceUpdateVersion |
String |
强制更新版本号(未设置强置更新默认为空) |
forceUpdateVersionNo |
String |
强制更新的版本编号 |
needForceUpdate |
Boolean |
是否强制更新 |
downloadURL |
String |
应用安装地址 |
appURL |
String |
应用安装单页地址 |
buildHaveNewVersion |
Boolean |
是否有新版本 |
buildVersionNo |
String |
上传包的版本编号,默认为1 (即编译的版本号,一般来说,编译一次会变动一次这个版本号, 在 Android 上叫 Version Code。对于 iOS 来说,是字符串类型;对于 Android 来说是一个整数。例如:1001,28等。) |
buildVersion |
String |
版本号, 默认为1.0 (是应用向用户宣传时候用到的标识,例如:1.1、8.2.1等。) |
buildShortcutUrl |
String |
应用短链接 |
buildUpdateDescription |
String |
应用更新说明 |
列出用户的App分组
这里说的分组,指的是开发者在「应用管理」-「我的分组」中设置的App分组。
API地址
POST http://api.pgyer.com/apiv2/appGroup/listAll
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
返回数据
返回参数 |
类型 |
说明 |
appGroupName |
String |
App分组名称 |
appGroupKey |
String |
App分组唯一标识Key |
appGroupShortcutURL |
String |
App分组的短链接 |
appGroupDescription |
String |
App分组的描述 |
appGroupCount |
String |
App分组中App的数量 |
appCreated |
String |
App分组的创建时间 |
查看用户的App分组
这里说的分组,指的是开发者在「应用管理」-「我的分组」中设置的App分组。
这个接口会返回某个App分组的详细信息,同时也返回这个分组里面包含的App信息(只列出最新版本)。
API地址
POST http://api.pgyer.com/apiv2/appGroup/view
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
appGroupKey |
String |
(必填) 用户App分组的Key。可以通过 appGroup/listAll 接口获取。 |
返回数据
返回参数 |
类型 |
说明 |
appGroupName |
String |
App分组名称 |
appGroupKey |
String |
App分组唯一标识Key |
appGroupShortcutURL |
String |
App分组的短链接 |
appGroupDescription |
String |
App分组的描述 |
appGroupCount |
String |
App分组中App的数量 |
appCreated |
String |
App分组的创建时间 |
apps |
Array |
包含的app信息(返回最新版本信息) |
查看App反馈信息列表
API地址
POST http://api.pgyer.com/apiv2/feedback/listAll
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
appKey |
String |
(必填) 见 appKey |
page |
Integer |
(选填) 分页页数 |
返回数据
返回参数 |
类型 |
说明 |
feedbackContent |
String |
反馈内容 |
feedbackImages |
Array |
反馈信息中图片地址 |
feedbackVoice |
String |
录音文件地址 |
feedbackFrom |
String |
反馈信息来源 |
feedbackProcess |
Integer |
反馈处理状态(1:已处理; 2:未处理) |
feedbackCreated |
String |
反馈创建时间 |
feedbackKey |
String |
feedbackKey |
查看App反馈信息详情
API地址
POST http://api.pgyer.com/apiv2/feedback/view
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
appKey |
String |
(必填) 见 appKey |
feedbackKey |
String |
(必填) 反馈信息的Key,可以通过feedbackListAll接口得到 |
返回数据
返回参数 |
类型 |
说明 |
feedbackContent |
String |
反馈内容 |
feedbackImages |
Array |
反馈信息中图片地址 |
feedbackVoice |
String |
录音文件地址 |
feedbackDeviceName |
String |
设备名称 |
feedbackOSVersion |
String |
手机系统版本 |
feedbackOSType |
Integer |
手机系统类型(1:iOS; 2:Android) |
feedbackOSJailBroken |
Integer |
手机是否越狱或ROOT(1:是; 2:否) |
feedbackFreeRam |
String |
手机剩余内存大小 |
feedbackFreeSpace |
String |
手机剩余磁盘空间大小 |
feedbackNetwork |
String |
手机网络 |
feedbackSDKVersion |
String |
SDK 版本 |
feedbackFrom |
String |
反馈信息来源 |
feedbackProcess |
Integer |
反馈处理状态(1:已处理; 2:未处理) |
buildType |
Integer |
应用类型 (1:iOS; 2:Android) |
buildName |
String |
应用名称 |
feedbackCreated |
String |
反馈创建时间 |
查看应用 Crash Log 列表
API地址
POST http://api.pgyer.com/apiv2/crash/listAll
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
appKey |
String |
(必填) 见 appKey |
page |
Integer |
(选填) 分页页数 |
返回数据
返回参数 |
类型 |
说明 |
crashCount |
Integer |
Crash 数量 |
crashTitle |
String |
Crash 标题 |
crashPattern |
String |
Crash Pattern |
crashDescribe |
String |
Crash 描述 |
crashAppVersion |
String |
Crash App 版本 |
crashProcess |
String |
Crash 处理状态 |
crashId |
Integer |
CrashGroupId |
crashCreated |
String |
Crash 创建时间 |
查看应用 Crash Log 详情
API地址
POST http://api.pgyer.com/apiv2/crash/view
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
appKey |
String |
(必填) 见 appKey |
crashId |
Integer |
(必填) crashId, 可以通过crashListAll获得某条crash的crashId |
返回数据
返回参数 |
类型 |
说明 |
crashLog |
String |
Crash Log |
crashCount |
Integer |
Crash 数量 |
crashTitle |
String |
Crash 标题 |
crashPattern |
String |
Crash Pattern |
crashDescribe |
String |
Crash 描述 |
crashAppVersion |
String |
Crash App 版本 |
crashIsSymbolicated |
String |
Crash Log 是否符号化 |
crashIsReaded |
String |
Crash 是否已读 |
crashProcess |
String |
Crash 处理状态 |
crashViewStatus |
String |
Crash 查看状态 |
deviceAffectList |
Array |
影响设备情况 |
crashCreated |
String |
Crash 创建时间 |
证书列表
通过该接口,开发者可以直接查看自己的证书管理。
API地址
POST http://api.pgyer.com/apiv2/certificate/index
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
返回数据
参数 |
类型 |
说明 |
certificateKey |
String |
证书的唯一标识Key |
certificateName |
String |
证书名称 |
certificateExpired |
Date |
证书的过期时间 |
certificateCreated |
Date |
证书的上传时间 |
certificateStatus |
String |
证书的状态 |
删除应用
通过该接口,开发者可以直接删除自己的应用。
API地址
POST http://api.pgyer.com/apiv2/app/deleteApp
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
appKey |
String |
(必填) 见 appKey |
返回数据
参数 |
类型 |
说明 |
code |
int |
code = 0, 删除成功,否则返回错误码 |
删除版本
通过该接口,开发者可以直接删除自己的应用指定版本。
API地址
POST http://api.pgyer.com/apiv2/app/buildDelete
POST参数
参数 |
类型 |
说明 |
_api_key |
String |
(必填) API Key,请见 鉴权说明 |
buildKey |
String |
(必填) 见 buildKey |
返回数据
参数 |
类型 |
说明 |
code |
int |
code = 0, 版本删除成功,否则返回错误码 |
错误码含义
错误码 |
说明 |
1001 |
_api_key 不能为空 |
1002 |
_api_key 错误 |
1003 |
同步用户信息到Tracup出错信息 |
1007 |
搜索词太短 |
1008 |
Build Key 和 appKey 不能同时为空 |
1009 |
没有找到该App相关信息 |
1010 |
App Key 不能为空 |
1011 |
Build Id 不能为空 |
1012 |
User key 不能为空 |
1013 |
没有找到该用户 |
1014 |
应用类型不能为空 |
1015 |
文件或App类型错误 |
1016 |
无效的包名 |
1017 |
短链接已被使用或者不符合规范 |
1018 |
App 数量超过套餐的上限 |
1019 |
实名认证身份照片不全,请上传身份证正面、背面及手持身份照片 |
1020 |
用户被禁止上传 |
1021 |
文件无效 |
1022 |
文件过大 |
1023 |
build key 不能为空 |
1024 |
发布范围超过限制 |
1025 |
文件上传失败 |
1026 |
无效文件,文件类型错误 |
1027 |
应用名称长度不符合规范 |
1028 |
未找到应用的标识符 |
1029 |
短链接已被使用或不符合规范 |
1030 |
发布企业签名数量超过套餐最大值 |
1031 |
短链接不能为空 |
1032 |
短链接无效 |
1033 |
只能修改自己的应用 |
1035 |
修改的字段超过限制 |
1036 |
修改内容不能为空 |
1037 |
图片必须以数组的形式上传 |
1038 |
图片数据不能为空 |
1039 |
应用截图最多不能超过5张 |
1040 |
应用截图上传失败 |
1041 |
应用截图key不能为空 |
1042 |
反馈内容不能为空 |
1043 |
反馈内容过长,不能超过200字 |
1044 |
添加反馈出错 |
1045 |
无效的 user Key |
1047 |
该应用收费,请使用手机进行安装 |
1048 |
应用已过期 |
1049 |
应用下载次数已用完 |
1050 |
密码错误 |
1051 |
应用违规 |
1052 |
应用仅认证用户可以下载 |
1053 |
下载速度超过限制 |
1054 |
今日下载次数已用完 |
1055 |
无效的 api key |
1056 |
请在 iOS 系统中打开该链接 |
1057 |
同步专家测试企业签名应用参数错误 |
1058 |
解析应用出错 |
1059 |
废弃的方法 |
1060 |
请输入你的邮箱 |
1061 |
请输入你的密码 |
1062 |
用户名或者密码不正确 |
1063 |
该邮箱已存在 |
1064 |
请输入你的用户名 |
1065 |
用户名不能超过15个字符 |
1066 |
请输入你的姓名 |
1067 |
请输入你的公司 |
1068 |
请输入你的职业 |
1069 |
该手机号码已存在 |
1070 |
请输入验证码 |
1071 |
验证码无效 |
1072 |
该邮箱不存在 |
1073 |
请输入正确的账户信息 |
1075 |
App group key 不能为空 |
1076 |
App key 不正确 |
1079 |
录音上传失败 |
1080 |
反馈失败 |
1081 |
非法请求 |
1082 |
Feedback Key 不能为空 |
1083 |
反馈信息未找到 |
1084 |
日志信息不能为空 |
1085 |
系统类型不正确 |
1086 |
crash id 不能为空 |
1087 |
crash 信息没有找到 |
1089 |
获取平台参数不能为空 |
1090 |
平台参数为windows或者mac |
1091 |
版本参数不对 |
1092 |
版本信息没有找到 |
1093 |
没有找到信息 |
1094 |
app group key 不正确 |
1095 |
应用名称过长 |
1096 |
错误的方法 |
1097 |
签名错误 |
1098 |
Api 请求达到每小时的上限 |
1099 |
更新 App 失败 |
1100 |
没有找到 App 分组信息 |
1102 |
请输入邮箱验证码 |
1103 |
您输入的验证码不正确 |
1104 |
您输入的邮箱地址无效 |
1105 |
该账号已存在 |
1106 |
真实姓名的长度必须小于15 |
1107 |
请填写密码 |
1108 |
请正确填写您的手机号码 |
1109 |
请输入您的6位验证码 |
1110 |
注册失败 |
1111 |
请输入你的账号 |
1112 |
该手机号码绑定多个账号,请使用密码进行登录 |
1113 |
请填写邮箱地址 |
1115 |
用户不存在 |
1116 |
手机号码或密码不正确 |
1117 |
邮箱地址或密码不正确 |
1118 |
请输入手机号码 |
1120 |
每次发送短信的间隔必须在30秒以上 |
1121 |
验证失败 |
1122 |
权限不足 |
1123 |
统计类型出错 |
1124 |
授权信息失败 |
1125 |
绑定已有账号 |
1126 |
邮箱未更改 |
1127 |
邮箱地址已存在 |
1128 |
权限不足,只能删除自己上传的应用 |
1129 |
该账号已绑定微信号,请重新输入账号 |
1130 |
请输入您的新密码 |
1131 |
请再次输入密码 |
1132 |
两次输入密码不一致 请重新输入 |
1133 |
JSCode 不能为空 |
1134 |
JSCode 无效 |
1135 |
没有找到资质文件 |
1136 |
删除资质文件失败 |
1137 |
上传资质文件出错 |
1138 |
文件数量超过最大限制 |
1139 |
一种类型只能上传两张文件 |
1140 |
添加资质文件失败 |
1141 |
交易类型不能为空 |
1142 |
当前版本不可隐藏 |
1143 |
encryptedData和iv不能为空 |
1144 |
请输入安装开始时间及结束时间 |
1145 |
安装结束时间必须大于开始时间 |
1148 |
请上传身份证正面照片 |
1149 |
请上传身份证反面照片 |
1150 |
请上传手持身份证照片 |
1151 |
企业名称不能为空 |
1152 |
营业执照号码不能为空 |
1153 |
请上传营业执照照片 |
1154 |
省份不能为空 |
1155 |
城市不能为空 |
1156 |
当日自动审核次数已用完 |
1157 |
自动审核未通过 |
1158 |
图片不能大于10M |
1159 |
图片不能小于15k |
1160 |
图片类型不正确 |
1161 |
fileType 不能为空 |
1162 |
名称不能为空 |
1163 |
描述不能为空 |
1164 |
appKeys 不能为空 |
1165 |
描述文字太长 |
1166 |
分组名称不符合规则 |
1167 |
分组的应用,至少两个 |
1168 |
网址后缀不能为空 |
1169 |
新号码和旧号码不能一样 |
1170 |
手机号码错误 |
1171 |
真实姓名不能为空 |
1172 |
身份证号不能为空 |
1173 |
真实姓名不匹配 |
1174 |
身份证号不匹配 |
1175 |
发布时间不能为空 |
1176 |
请输入正确的发布时间 |
1177 |
获取应用信息失败 |
1178 |
应用类型不能为空 |
1179 |
不能合并空白应用 |
1180 |
应用已合并 |
1181 |
请合并iOS应用 |
1182 |
请合并Android应用 |
1183 |
必须是自己的应用 |
1184 |
不能和自己合并 |
1185 |
图标已存在不等上传图标 |
1186 |
应用未发布 |
1187 |
请升级您的版本 |
1188 |
发生错误 |
1189 |
暂时不能更改文件 |
1190 |
请上传文网文 |
1191 |
请上传ICP 许可证 |
1192 |
上传软件著作权登记证 |
1193 |
上传营业热照 |
1194 |
请上传金融牌照 |
1195 |
请上传其他证件 |
1196 |
请上传有关资质文件 |
1197 |
请上传信息网络传播视听节目许可证 |
1198 |
请重新上传审核不通过的文件 |
1199 |
相关文件数目不匹配 |
1200 |
申诉理由不能少于20个字符,不能多于500字符 |
1201 |
申诉图片不能大于5张 |
1202 |
不能删除所有可下载版本,如需删除应用,可在设置中删除应用 |
1203 |
不能删除所有显示的版本 |
1212 |
渠道短链接无效,请检查短链接 |