重新孵育中继服务
届会
配对过程用于在API用户和Reincubate Relay应用程序实例之间建立链接。默认情况下,如果未配对,则重新孵化中继将显示其配对代码。用户必须将其提供给您的应用程序,以便它通过以下调用创建有效的会话。
curl https://ricloud-api.reincubate.com/sessions \
-X POST \
-H 'Authorization: Token <your key_token>' \
-H 'Content-Type: application/json' \
-d '{
"source": {
"user": "1",
"type": "rirelay.instance"
},
"payload": {
"code": "<Reincubate Relay pairing code>"
}
}'
创建会话后,您将能够通过会话对象的source属性查看有关应用实例的信息。看起来应该像这样:
{
"id": "<session ID>",
"resource": "session",
...
"source": {
"id": "<source ID>",
"resource": "source",
"user": "<user ID>",
"type": "rirelay.instance",
"identifier": "ee360f13-1b54-4d8c-8876-e5f573f0ba1c",
"info": null,
"parent": null,
"children": {
"data": [
{
"id": "<child source ID>",
"resource": "source",
"user": "<user ID>",
"type": "rirelay.source",
"identifier": "70a4982e-5893-4a5f-8af6-19db834d378d",
"info": {
"is_encrypted": true,
"apple_model_id": "iPhone10,4",
"apple_serial": "FFABCZGTJC12",
"name": "iPhone 8",
"ios_version": "13.2"
},
"children": {
"data": [],
"has_more": false,
"total_count": 0,
"url": "/sources/<child source ID>/children"
},
"state": "active",
"date_created": "2019-10-08T09:02:15.770532Z"
}
],
"has_more": false,
"total_count": 0,
"url": "/sources/<source ID>/children"
},
"state": "active",
"date_created": "2019-10-08T08:58:33.861941Z"
},
...
}
订阅内容
与其他服务不同,API必须先进行订阅,才能开始从Reincubate Relay源检索数据。这是为了帮助应用程序的用户准确了解正在访问的数据。
只能根据rirelay.source类型的源创建订阅,该源是Reincubate Relay实例的子级。还必须指定轮询源时要使用的会话。
curl https://ricloud-api.reincubate.com/subscriptions \
-X POST \
-H 'Authorization: Token <your key_token>' \
-H 'Content-Type: application/json' \
-d '{
"session": "<session ID>",
"source": "<child source ID>",
"poll_payload": {
"data_types": ["ios_messages.messages"]
}
}'
订阅将保持待定状态,直到用户允许在Reincubate Relay应用程序界面中访问特定设备为止。一旦被允许,状态将转换为active 。
订阅激活后将立即创建初始轮询,然后当Reincubate Relay应用程序向API通知新数据时将创建后续轮询。
民意调查
还可以针对具有有效订阅的源手动创建轮询。在对检索到的数据进行故障排除或测试新的数据类型时,这很有用。
curl https://ricloud-api.reincubate.com/polls \
-X POST \
-H 'Authorization: Token <your key_token>' \
-H 'Content-Type: application/json' \
-d '{
"subscription": "<subscription ID>",
"payload": {
"data_types": ["ios_phone.calls", "whatsapp.messages"]
}
}'
大事记
为了及时了解异步更改,例如创建新轮询的订阅或会话即将过期,您的实现将需要通过webhook端点从API接收事件通知。
有关如何设置和配置Webhook端点的详细信息,请参阅配置Webhooks 。
信息类型
Relay 服务目前仅支持从rirelay.instance源检索信息,其中包括任何关联rirelay.source源的嵌套信息。
rirelay.instance.info属性
| 名称 | 类型 | 描述 |
|---|---|---|
id | 来源 ID | 此 Relay 实例对应的源对象的 ID。 |
version | 字符串 | Reincubate Relay 应用程序的版本。 |
os | 字符串 | 运行 Reincubate Relay 应用程序的操作系统的标识符。 |
sources | rirelay.source.info列表 | 与实例关联的源列表。 |
date_created | 约会时间 | 首次看到此实例的日期时间。 |
date_last_seen | 约会时间 | 上次看到此实例的日期时间。 |
rirelay.source.info属性
| 名称 | 类型 | 描述 |
|---|---|---|
id | 来源 ID | 此 Relay 源对应的源对象的 ID。 |
uid | 字符串 | 中继源的唯一 iOS 设备 ID。 |
info | 嵌套的rirelay.source.info.info | 此中继源的元数据。 |
date_created | 约会时间 | 首次看到此来源的日期时间。 |
date_last_seen | 约会时间 | 上次看到此来源的日期时间。 |
rirelay.source.info.info属性
请注意, name 、 ios_version 、 apple_model_id 、 apple_serial和is_encrypted也包含在Source对象的嵌套info数据中,因此可以通过 API 端点直接访问。
对于其他属性,例如phone_number rirelay.instance.info进行完整轮询——因为这是 API 不存储的个人身份信息。
| 名称 | 类型 | 描述 |
|---|---|---|
name | 字符串 | 中继源的名称。在Source.info可用。 |
ios_version | 字符串 | 在 Relay 源上运行的 iOS 版本,即13.4 。在Source.info可用。 |
apple_model_id | 字符串 | Relay 源的型号 ID,即iPhone7,2 。在Source.info可用。 |
apple_serial | 字符串 | Relay 源的序列号,即F4KPWDR7G5DN 。在Source.info可用。 |
phone_number | 可选,str | 中继源的电话号码。如果设备上未启用蜂窝功能(即仅无 SIM 或 Wi-Fi),则为空。 |
is_encrypted | 布尔 | 中继源是否设置为生成加密备份。在Source.info可用。 |
资料类型
重新孵化Relay应用程序数据类型
| 标识符 | 描述 |
|---|---|
ios_messages.messages | 检索 iOS 消息数据,包括 iMessage 和 SMS。 |
ios_contacts.contacts | 检索 iOS 联系人数据。 |
ios_phone.calls | 检索 iOS 手机数据。 |
ios_calendar.events | 检索 iOS 日历数据。 |
ios_notes.notes | 检索 iOS Notes 数据。 |
ios_health.data | 检索 iOS 健康数据。 |
ios_safari.history | 检索 Safari 浏览器历史数据。 |
ios_safari.cookies | 检索 Safari cookie 数据。 |
whatsapp.messages | 检索 WhatsApp 消息。 |
whatsapp.calls | 检索 WhatsApp 通话记录。 |
whatsapp_business.messages |
Retrieves WhatsApp for Business messages. |
viber.messages | 检索 Viber 消息。 |
viber.calls | 检索 Viber 通话记录。 |
viber.conversations | 检索 Viber 对话。 |
viber.contacts | 检索 Viber 联系人。 |
kik.messages | 检索 Kik 消息。 |
kik.contacts | 检索 Kik 联系人。 |
hike.messages | 检索远足消息。 |
hike.posts | 检索远足帖子。 |
wechat.messages | 检索微信消息。 |
tinder.messages | 检索 Tinder 消息。 |
line.messages | 检索线路消息。 |
facebook.messages | 检索 Facebook 消息。 |
snapchat.messages | 检索 Snapchat 消息。 |
snapchat.stories | 检索 Snapchat 故事。 |
skype.messages | 检索 Skype 消息。 |
重新孵化中继聚合数据类型
| 标识符 | 描述 |
|---|---|
.photos | 扫描图像文件的备份。 |
.videos | 扫描视频文件的备份。 |
.recordings | 扫描备份以查找录制文件。 |
.voicemails | 扫描语音邮件文件的备份。 |
.app_usage | 扫描备份以获取应用使用信息。 |
.installed_apps | 扫描备份以获取已安装的应用程序信息。 |
.locations | 扫描备份的位置。 |
.linked_watches | 扫描备份以获取链接的 Apple Watch 信息。 |
iOS消息
留言内容
| 数据类型 ID | ios_messages.messages |
资料属性
扩展message数据类型。
样本数据
{
"id": "a1b2c3d4",
"data_type": "message",
"conversation_id": "w6x7y8z9",
"handle": "vodafone",
"type": "SMS",
"text": "Hi from Vodafone!",
"attachments": [],
"group_handles": [
"+441234567890",
"renate@reincubate.com"
],
"from_me": false,
"deleted": false,
"date": "2020-01-01T00:00:00.000000Z"
}
iOS通讯录
联络人
| 数据类型 ID | ios_contacts.contacts |
资料属性
扩展contact数据类型。
样本数据
{
"id": "2cf6a837304d6614",
"data_type": "contact",
"first_name": "John",
"middle_name": "'Gala'",
"last_name": "Appleseed",
"prefix": "Mr.",
"suffix": "Jr.",
"nickname": "John'o",
"records": [
{
"type": "Phone",
"name": "MAIN",
"value": "1-800-MY-APPLE"
},
{
"type": "Phone",
"name": "UK",
"value": "0800 039 1010"
},
{
"type": "URL",
"name": "HOMEPAGE",
"value": "http://www.apple.com"
},
{
"type": "URL",
"name": "HOMEPAGE",
"value": "http://www.apple.com/uk/"
},
{
"City": "Cupertino",
"State": "CA",
"ZIP": "95014",
"name": "WORK",
"CountryCode": "US",
"Country": "United States",
"Street": "1 Infinite Loop",
"type": "Address",
"SubLocality": null,
"Municipality": null
}
],
"organisation": "Apple Inc.",
"department": "Marketing",
"jobtitle": "VP Juicing",
"birthday": "1976-04-01 00:00:00.000000Z"
}
iOS手机
来电
| 数据类型 ID | ios_phone.calls |
资料属性
扩展call数据类型。
样本数据
{
"id": "24116c5b16b85217",
"data_type": "call",
"call_type": "Phone",
"address": "07123456789",
"duration": 5.131359,
"answered": false,
"from_me": true,
"date": "2015-07-20 10:23:27.538011"
}
iOS日历
大事记
| 数据类型 ID | ios_calendar.events |
资料属性
扩展event数据类型。
样本数据
{
"id": "3",
"unique_identifier": "f5fcf872-34f6-3f60-ba03-74d5a7a3bbbb",
"calendar": "Home",
"calendar_id": "477a2001537fe178d6b77cdceb8bac2e",
"calendar_store": "Default",
"summary": "Christmas Day",
"description": "Bank holiday in the UK",
"start_date": "2017-12-25T00:00:00.000000",
"end_date": "2017-12-25T23:59:59.000000",
"start_time_zone": None,
"end_time_zone": None,
"all_day": True,
"travel_time": None,
"recurrence": {
"interval": 1,
"repeat": "Yearly",
"repeat_end_date": None,
"specifier": ""
},
"location": None,
"start_location": None,
"attendees": ["John Appleseed"],
"attached_url": None,
"creation_date": None
}
iOS笔记
笔记
| 数据类型 ID | ios_notes.notes |
资料属性
扩展note数据类型。
iOS健康
与iOS Health应用程序和HealthKit框架关联的数据。
数据
| 数据类型 ID | ios_health.data |
ios_health.profile属性
| 名称 | 类型 | 描述 |
|---|---|---|
info_type | 字符串,总是ios_health.profile | 项目数据类型 ID。 |
gender | 可选字符串 | 其中之一: Female 、 Male 、 Other 。 |
date_of_birth | 可选日期 | 个人资料所有者的出生日期。 |
weight | 可选浮动 | 配置文件所有者的体重测量值,以千克为单位。 |
height | 可选浮动 | 个人资料所有者的身高测量值,以米为单位。 |
blood_type | 可选字符串 | 个人资料所有者的血型。 |
fitzpatrick_skin_type | 可选字符串 | 个人资料所有者的 Fitzpatrick 皮肤类型。一种: Type I Type II Type II Type IV Type V 。 |
ios_health.profile示例
{
"info_type": "ios_health.profile",
"gender": "Female",
"date_of_birth": "1988-08-22",
"weight": 75.2543977,
"height": 1.9812,
"blood_type": "O+",
"fitzpatrick_skin_type": "Type V"
}
ios_health.sample属性
| 名称 | 类型 | 描述 |
|---|---|---|
id | 细绳 | 项目 ID。 |
data_type | 细绳 | 项目数据类型 ID。 iOS 健康数据类型之一。 |
type | 细绳 | 样品类型。之一: quantity , binary , category 。 |
value | 字符串、浮点数、整数之一 | 样本值。该字段的类型取决于样本type属性。 |
unit | 可选字符串 | 设置是否为非默认样本单位。 |
was_user_entered | 布尔值 | 用户是否手动输入此测量值。 |
start_date | 约会时间 | 当采样周期开始时。 |
end_date | 约会时间 | 采样周期结束时。 |
iOS Health数据类型:
ios_health.body_mass_indexios_health.body_fat_percentageios_health.heightios_health.weightios_health.lean_body_massios_health.heart_rateios_health.stepsios_health.walking_running_distanceios_health.resting_energyios_health.active_energyios_health.flights_climbedios_health.oxygen_saturationios_health.blood_glucoseios_health.systolic_blood_pressureios_health.diastolic_blood_pressureios_health.blood_alcohol_contentios_health.peripheral_perfusion_indexios_health.total_fatios_health.polyunsaturated_fatios_health.monounsaturated_fatios_health.saturated_fatios_health.dietary_cholesterolios_health.sodiumios_health.carbohydratesios_health.fibreios_health.dietary_sugarios_health.dietary_energyios_health.proteinios_health.vitamin_aios_health.vitamin_b6ios_health.vitamin_b12ios_health.vitamin_cios_health.vitamin_dios_health.vitamin_eios_health.vitamin_kios_health.calciumios_health.ironios_health.thiamineios_health.riboflavinios_health.niacinios_health.folateios_health.biotinios_health.pantothenic_acidios_health.phosphorousios_health.iodineios_health.magnesiumios_health.zincios_health.seleniumios_health.copperios_health.manganeseios_health.chromiumios_health.molybdenumios_health.chlorideios_health.potassiumios_health.number_of_times_fallenios_health.electrodermal_activityios_health.inhaler_usageios_health.respiratory_rateios_health.body_temperatureios_health.sleep_analysisios_health.forced_vital_capacityios_health.forced_expiration_volume_1ios_health.peak_expiratory_flow_rateios_health.caffeineios_health.workoutios_health.blood_pressure_correlationios_health.cycling_distanceios_health.waterios_health.uv_indexios_health.basal_body_temperatureios_health.cervical_mucus_qualityios_health.ovulation_test_resultsios_health.menstruationios_health.spottingios_health.sexual_activity
样本数据
{
"id": "a1b2c3d41",
"data_type": "ios_health.walking_running_distance",
"type": "quantity",
"value": 6.08,
"was_user_entered": false,
"start_date": "2016-07-04T18:11:54.000000Z",
"end_date": "2016-07-04T18:12:09.000000Z"
}, {
"id": "a1b2c3d42",
"data_type": "ios_health.steps",
"type": "quantity",
"value": 8.0,
"was_user_entered": false,
"start_date": "2016-07-04T18:11:54.000000Z",
"end_date": "2016-07-04T18:12:09.000000Z"
}, {
"id": "a1b2c3d43",
"data_type": "ios_health.caffeine",
"type": "quantity",
"value": 800.0,
"unit": "mg",
"was_user_entered": true,
"start_date": "2016-07-04T18:11:54.000000Z",
"end_date": "2016-07-04T18:12:09.000000Z"
}
iOS Safari
历史
| 数据类型 ID | ios_safari.history |
资料属性
扩展visit数据类型。
样本数据
{
"data_type": "visit",
"url": "https://reincubate.com/",
"title": "Reincubate: the app data company",
"date_created": "2020-01-01T00:00:00.000000Z"
}
饼干
| 数据类型 ID | ios_safari.cookies |
资料属性
扩展cookie数据类型。
样本数据
{
"data_type": "cookie",
"name": "sample_cookies",
"value": "sample_value",
"domain": "reincubate.com",
"path": "/",
"flags": "",
"creation_date": "2020-01-01T00:00:00.000000Z",
"expiry_date": "2020-01-01T00:00:00.000000Z"
}
WhatsApp & WhatsApp for Business
WhatsApp Messages
| 数据类型 ID | whatsapp.messages |
属性
扩展message数据类型。
WhatsApp Calls
| 数据类型 ID | whatsapp.calls |
属性
扩展call数据类型。
WhatsApp for Business Messages
| Data type ID | whatsapp_business.messages |
属性
扩展message数据类型。
维伯
来电
viber.messages | 检索 Viber 消息。 |
viber.calls | 检索 Viber 通话记录。 |
viber.conversations | 检索 Viber 对话。 |
viber.contacts | 检索 Viber 联系人。 |
留言
| 数据类型 ID | viber.messages |
属性
扩展message数据类型。
来电
| 数据类型 ID | viber.calls |
属性
扩展call数据类型。
对话
| 数据类型 ID | viber.conversations |
属性
扩展conversation数据类型。
联系人
| 数据类型 ID | viber.contacts |
属性
扩展contact数据类型。
ik
留言内容
| 数据类型 ID | kik.messages |
属性
扩展message数据类型。
联络人
| 数据类型 ID | kik.contacts |
属性
扩展contact数据类型。
远足
hike.messages | 检索远足消息。 |
hike.posts | 检索远足帖子。 |
留言内容
| 数据类型 ID | hike.messages |
属性
扩展message数据类型。
帖子
| 数据类型 ID | hike.posts |
属性
扩展message数据类型。
微信
留言内容
| 数据类型 ID | wechat.messages |
属性
扩展message数据类型。
火种
留言内容
| 数据类型 ID | tinder.messages |
属性
扩展message数据类型。
线
留言内容
| 数据类型 ID | line.messages |
属性
扩展message数据类型。
Facebook Messenger
留言内容
| 数据类型 ID | facebook.messenger |
属性
扩展message数据类型。
Snapchat
留言内容
| 数据类型 ID | snapchat.messages |
属性
扩展message数据类型。
故事
| 数据类型 ID | snapchat.stories |
属性
扩展message数据类型。
Skype的
留言内容
| 数据类型 ID | skype.messages |
属性
扩展message数据类型。