@onesignal/node-onesignal 2.0.1-beta2 → 5.0.0-alpha-01
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DefaultApi.md +401 -778
- package/apis/DefaultApi.ts +682 -1216
- package/auth/auth.ts +14 -14
- package/configuration.ts +6 -6
- package/dist/apis/DefaultApi.d.ts +36 -63
- package/dist/apis/DefaultApi.js +653 -1174
- package/dist/apis/DefaultApi.js.map +1 -1
- package/dist/auth/auth.d.ts +6 -6
- package/dist/auth/auth.js +19 -19
- package/dist/auth/auth.js.map +1 -1
- package/dist/configuration.d.ts +2 -2
- package/dist/configuration.js +4 -4
- package/dist/configuration.js.map +1 -1
- package/dist/models/BasicNotification.d.ts +14 -12
- package/dist/models/BasicNotification.js +20 -20
- package/dist/models/BasicNotification.js.map +1 -1
- package/dist/models/BasicNotificationAllOf.d.ts +10 -8
- package/dist/models/BasicNotificationAllOf.js +17 -11
- package/dist/models/BasicNotificationAllOf.js.map +1 -1
- package/dist/models/CreateNotificationSuccessResponse.d.ts +1 -3
- package/dist/models/CreateNotificationSuccessResponse.js +1 -7
- package/dist/models/CreateNotificationSuccessResponse.js.map +1 -1
- package/dist/models/{ExportPlayersRequestBody.d.ts → ExportSubscriptionsRequestBody.d.ts} +1 -1
- package/dist/models/ExportSubscriptionsRequestBody.js +34 -0
- package/dist/models/ExportSubscriptionsRequestBody.js.map +1 -0
- package/dist/models/{ExportPlayersSuccessResponse.d.ts → ExportSubscriptionsSuccessResponse.d.ts} +1 -1
- package/dist/models/ExportSubscriptionsSuccessResponse.js +22 -0
- package/dist/models/ExportSubscriptionsSuccessResponse.js.map +1 -0
- package/dist/models/Filter.d.ts +6 -2
- package/dist/models/Filter.js +24 -0
- package/dist/models/Filter.js.map +1 -1
- package/dist/models/FilterExpression.d.ts +27 -0
- package/dist/models/FilterExpression.js +70 -0
- package/dist/models/FilterExpression.js.map +1 -0
- package/dist/models/GenericError.d.ts +3 -2
- package/dist/models/GenericError.js +13 -1
- package/dist/models/GenericError.js.map +1 -1
- package/dist/models/{DeletePlayerSuccessResponse.d.ts → GenericSuccessBoolResponse.d.ts} +1 -1
- package/dist/models/GenericSuccessBoolResponse.js +22 -0
- package/dist/models/GenericSuccessBoolResponse.js.map +1 -0
- package/dist/models/{GetNotificationRequestBody.d.ts → GetNotificationHistoryRequestBody.d.ts} +3 -3
- package/dist/models/GetNotificationHistoryRequestBody.js +34 -0
- package/dist/models/GetNotificationHistoryRequestBody.js.map +1 -0
- package/dist/models/{PlayerSlice.d.ts → GetSegmentsSuccessResponse.d.ts} +3 -3
- package/dist/models/GetSegmentsSuccessResponse.js +40 -0
- package/dist/models/GetSegmentsSuccessResponse.js.map +1 -0
- package/dist/models/InvalidIdentifierError.d.ts +1 -1
- package/dist/models/InvalidIdentifierError.js +2 -2
- package/dist/models/InvalidIdentifierError.js.map +1 -1
- package/dist/models/{StringMap.d.ts → LanguageStringMap.d.ts} +1 -1
- package/dist/models/{StringMap.js → LanguageStringMap.js} +10 -10
- package/dist/models/LanguageStringMap.js.map +1 -0
- package/dist/models/Notification.d.ts +14 -12
- package/dist/models/Notification.js +20 -20
- package/dist/models/Notification.js.map +1 -1
- package/dist/models/NotificationTarget.d.ts +4 -4
- package/dist/models/NotificationTarget.js +3 -9
- package/dist/models/NotificationTarget.js.map +1 -1
- package/dist/models/NotificationWithMeta.d.ts +14 -12
- package/dist/models/NotificationWithMeta.js +20 -20
- package/dist/models/NotificationWithMeta.js.map +1 -1
- package/dist/models/ObjectSerializer.d.ts +15 -32
- package/dist/models/ObjectSerializer.js +50 -102
- package/dist/models/ObjectSerializer.js.map +1 -1
- package/dist/models/{InlineResponse202.d.ts → PropertiesBody.d.ts} +1 -1
- package/dist/models/PropertiesBody.js +22 -0
- package/dist/models/PropertiesBody.js.map +1 -0
- package/dist/models/{DeleteSegmentNotFoundResponse.d.ts → RateLimitError.d.ts} +3 -2
- package/dist/models/RateLimitError.js +28 -0
- package/dist/models/RateLimitError.js.map +1 -0
- package/dist/models/Segment.d.ts +2 -2
- package/dist/models/Segment.js +1 -1
- package/dist/models/Segment.js.map +1 -1
- package/dist/models/{CreateSubscriptionRequestBody.d.ts → SegmentData.d.ts} +8 -4
- package/dist/models/SegmentData.js +58 -0
- package/dist/models/SegmentData.js.map +1 -0
- package/dist/models/{SubscriptionObject.d.ts → Subscription.d.ts} +3 -3
- package/dist/models/{SubscriptionObject.js → Subscription.js} +11 -11
- package/dist/models/Subscription.js.map +1 -0
- package/dist/models/{CreatePlayerSuccessResponse.d.ts → SubscriptionBody.d.ts} +3 -3
- package/dist/models/SubscriptionBody.js +22 -0
- package/dist/models/SubscriptionBody.js.map +1 -0
- package/dist/models/{PlayerNotificationTarget.d.ts → SubscriptionNotificationTarget.d.ts} +7 -7
- package/dist/models/{PlayerNotificationTarget.js → SubscriptionNotificationTarget.js} +14 -20
- package/dist/models/SubscriptionNotificationTarget.js.map +1 -0
- package/dist/models/TransferSubscriptionRequestBody.d.ts +1 -1
- package/dist/models/TransferSubscriptionRequestBody.js +1 -1
- package/dist/models/TransferSubscriptionRequestBody.js.map +1 -1
- package/dist/models/UpdateLiveActivityRequest.d.ts +8 -3
- package/dist/models/UpdateLiveActivityRequest.js +33 -3
- package/dist/models/UpdateLiveActivityRequest.js.map +1 -1
- package/dist/models/UpdateLiveActivitySuccessResponse.d.ts +1 -3
- package/dist/models/UpdateLiveActivitySuccessResponse.js +2 -8
- package/dist/models/UpdateLiveActivitySuccessResponse.js.map +1 -1
- package/dist/models/User.d.ts +3 -5
- package/dist/models/User.js +2 -8
- package/dist/models/User.js.map +1 -1
- package/dist/models/{InlineResponse200.d.ts → UserIdentityBody.d.ts} +2 -2
- package/dist/models/UserIdentityBody.js +22 -0
- package/dist/models/UserIdentityBody.js.map +1 -0
- package/dist/models/{BeginLiveActivityRequest.d.ts → WebButton.d.ts} +5 -3
- package/dist/models/WebButton.js +40 -0
- package/dist/models/WebButton.js.map +1 -0
- package/dist/models/all.d.ts +15 -32
- package/dist/models/all.js +15 -32
- package/dist/models/all.js.map +1 -1
- package/dist/servers.js +1 -1
- package/dist/servers.js.map +1 -1
- package/dist/types/ObjectParamAPI.d.ts +52 -102
- package/dist/types/ObjectParamAPI.js +26 -47
- package/dist/types/ObjectParamAPI.js.map +1 -1
- package/dist/types/ObservableAPI.d.ts +25 -45
- package/dist/types/ObservableAPI.js +82 -250
- package/dist/types/ObservableAPI.js.map +1 -1
- package/dist/types/PromiseAPI.d.ts +25 -45
- package/dist/types/PromiseAPI.js +32 -60
- package/dist/types/PromiseAPI.js.map +1 -1
- package/models/App.ts +1 -1
- package/models/BasicNotification.ts +49 -46
- package/models/BasicNotificationAllOf.ts +34 -23
- package/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +1 -1
- package/models/Button.ts +1 -1
- package/models/CreateNotificationSuccessResponse.ts +5 -13
- package/models/CreateSegmentConflictResponse.ts +1 -1
- package/models/CreateSegmentSuccessResponse.ts +1 -1
- package/models/CreateUserConflictResponse.ts +1 -1
- package/models/CreateUserConflictResponseErrorsInner.ts +1 -1
- package/models/CreateUserConflictResponseErrorsItemsMeta.ts +1 -1
- package/models/DeliveryData.ts +1 -1
- package/models/ExportEventsSuccessResponse.ts +1 -1
- package/models/{ExportPlayersRequestBody.ts → ExportSubscriptionsRequestBody.ts} +3 -3
- package/models/{ExportPlayersSuccessResponse.ts → ExportSubscriptionsSuccessResponse.ts} +3 -3
- package/models/Filter.ts +45 -5
- package/models/FilterExpression.ts +120 -0
- package/models/GenericError.ts +17 -4
- package/models/{DeletePlayerSuccessResponse.ts → GenericSuccessBoolResponse.ts} +3 -3
- package/models/{GetNotificationRequestBody.ts → GetNotificationHistoryRequestBody.ts} +6 -6
- package/models/{PlayerSlice.ts → GetSegmentsSuccessResponse.ts} +20 -8
- package/models/InvalidIdentifierError.ts +6 -6
- package/models/{StringMap.ts → LanguageStringMap.ts} +3 -3
- package/models/Notification.ts +49 -46
- package/models/NotificationAllOf.ts +1 -1
- package/models/NotificationHistorySuccessResponse.ts +1 -1
- package/models/NotificationSlice.ts +1 -1
- package/models/NotificationTarget.ts +17 -25
- package/models/NotificationWithMeta.ts +49 -46
- package/models/NotificationWithMetaAllOf.ts +1 -1
- package/models/ObjectSerializer.ts +57 -109
- package/models/Operator.ts +1 -1
- package/models/OutcomeData.ts +1 -1
- package/models/OutcomesData.ts +1 -1
- package/models/PlatformDeliveryData.ts +1 -1
- package/models/PlatformDeliveryDataEmailAllOf.ts +1 -1
- package/models/PlatformDeliveryDataSmsAllOf.ts +1 -1
- package/models/{InlineResponse202.ts → PropertiesBody.ts} +3 -3
- package/models/PropertiesDeltas.ts +1 -1
- package/models/PropertiesObject.ts +1 -1
- package/models/Purchase.ts +1 -1
- package/models/{CreatePlayerSuccessResponse.ts → RateLimitError.ts} +10 -10
- package/models/Segment.ts +4 -4
- package/models/SegmentData.ts +94 -0
- package/models/SegmentNotificationTarget.ts +1 -1
- package/models/{SubscriptionObject.ts → Subscription.ts} +6 -6
- package/models/{InlineResponse201.ts → SubscriptionBody.ts} +6 -6
- package/models/{PlayerNotificationTarget.ts → SubscriptionNotificationTarget.ts} +21 -29
- package/models/TransferSubscriptionRequestBody.ts +3 -3
- package/models/UpdateLiveActivityRequest.ts +56 -9
- package/models/UpdateLiveActivitySuccessResponse.ts +4 -12
- package/models/UpdateUserRequest.ts +1 -1
- package/models/User.ts +6 -14
- package/models/{InlineResponse200.ts → UserIdentityBody.ts} +5 -5
- package/models/{BeginLiveActivityRequest.ts → WebButton.ts} +23 -9
- package/models/all.ts +15 -32
- package/package.json +2 -2
- package/servers.ts +1 -1
- package/types/ObjectParamAPI.ts +161 -357
- package/types/ObservableAPI.ts +108 -301
- package/types/PromiseAPI.ts +89 -184
- package/dist/models/BeginLiveActivityRequest.js +0 -28
- package/dist/models/BeginLiveActivityRequest.js.map +0 -1
- package/dist/models/CancelNotificationSuccessResponse.d.ts +0 -17
- package/dist/models/CancelNotificationSuccessResponse.js +0 -22
- package/dist/models/CancelNotificationSuccessResponse.js.map +0 -1
- package/dist/models/CreatePlayerSuccessResponse.js +0 -28
- package/dist/models/CreatePlayerSuccessResponse.js.map +0 -1
- package/dist/models/CreateSubscriptionRequestBody.js +0 -28
- package/dist/models/CreateSubscriptionRequestBody.js.map +0 -1
- package/dist/models/DeletePlayerNotFoundResponse.d.ts +0 -17
- package/dist/models/DeletePlayerNotFoundResponse.js +0 -22
- package/dist/models/DeletePlayerNotFoundResponse.js.map +0 -1
- package/dist/models/DeletePlayerSuccessResponse.js +0 -22
- package/dist/models/DeletePlayerSuccessResponse.js.map +0 -1
- package/dist/models/DeleteSegmentNotFoundResponse.js +0 -22
- package/dist/models/DeleteSegmentNotFoundResponse.js.map +0 -1
- package/dist/models/DeleteSegmentSuccessResponse.d.ts +0 -17
- package/dist/models/DeleteSegmentSuccessResponse.js +0 -22
- package/dist/models/DeleteSegmentSuccessResponse.js.map +0 -1
- package/dist/models/ExportPlayersRequestBody.js +0 -34
- package/dist/models/ExportPlayersRequestBody.js.map +0 -1
- package/dist/models/ExportPlayersSuccessResponse.js +0 -22
- package/dist/models/ExportPlayersSuccessResponse.js.map +0 -1
- package/dist/models/FilterExpressions.d.ts +0 -23
- package/dist/models/FilterExpressions.js +0 -46
- package/dist/models/FilterExpressions.js.map +0 -1
- package/dist/models/GetNotificationRequestBody.js +0 -34
- package/dist/models/GetNotificationRequestBody.js.map +0 -1
- package/dist/models/InlineResponse200.js +0 -22
- package/dist/models/InlineResponse200.js.map +0 -1
- package/dist/models/InlineResponse2003.d.ts +0 -17
- package/dist/models/InlineResponse2003.js +0 -22
- package/dist/models/InlineResponse2003.js.map +0 -1
- package/dist/models/InlineResponse201.d.ts +0 -18
- package/dist/models/InlineResponse201.js +0 -22
- package/dist/models/InlineResponse201.js.map +0 -1
- package/dist/models/InlineResponse202.js +0 -22
- package/dist/models/InlineResponse202.js.map +0 -1
- package/dist/models/Notification200Errors.d.ts +0 -18
- package/dist/models/Notification200Errors.js +0 -28
- package/dist/models/Notification200Errors.js.map +0 -1
- package/dist/models/Player.d.ts +0 -43
- package/dist/models/Player.js +0 -178
- package/dist/models/Player.js.map +0 -1
- package/dist/models/PlayerNotificationTarget.js.map +0 -1
- package/dist/models/PlayerNotificationTargetIncludeAliases.d.ts +0 -17
- package/dist/models/PlayerNotificationTargetIncludeAliases.js +0 -22
- package/dist/models/PlayerNotificationTargetIncludeAliases.js.map +0 -1
- package/dist/models/PlayerSlice.js +0 -40
- package/dist/models/PlayerSlice.js.map +0 -1
- package/dist/models/StringMap.js.map +0 -1
- package/dist/models/SubscriptionObject.js.map +0 -1
- package/dist/models/UpdatePlayerSuccessResponse.d.ts +0 -17
- package/dist/models/UpdatePlayerSuccessResponse.js +0 -22
- package/dist/models/UpdatePlayerSuccessResponse.js.map +0 -1
- package/dist/models/UpdatePlayerTagsRequestBody.d.ts +0 -17
- package/dist/models/UpdatePlayerTagsRequestBody.js +0 -22
- package/dist/models/UpdatePlayerTagsRequestBody.js.map +0 -1
- package/dist/models/UpdatePlayerTagsSuccessResponse.d.ts +0 -17
- package/dist/models/UpdatePlayerTagsSuccessResponse.js +0 -22
- package/dist/models/UpdatePlayerTagsSuccessResponse.js.map +0 -1
- package/dist/models/UpdateSubscriptionRequestBody.d.ts +0 -18
- package/dist/models/UpdateSubscriptionRequestBody.js +0 -22
- package/dist/models/UpdateSubscriptionRequestBody.js.map +0 -1
- package/dist/models/UserIdentityRequestBody.d.ts +0 -19
- package/dist/models/UserIdentityRequestBody.js +0 -22
- package/dist/models/UserIdentityRequestBody.js.map +0 -1
- package/dist/models/UserIdentityResponse.d.ts +0 -19
- package/dist/models/UserIdentityResponse.js +0 -22
- package/dist/models/UserIdentityResponse.js.map +0 -1
- package/dist/models/UserSubscriptionOptions.d.ts +0 -17
- package/dist/models/UserSubscriptionOptions.js +0 -22
- package/dist/models/UserSubscriptionOptions.js.map +0 -1
- package/models/CancelNotificationSuccessResponse.ts +0 -31
- package/models/CreateSubscriptionRequestBody.ts +0 -39
- package/models/DeletePlayerNotFoundResponse.ts +0 -31
- package/models/DeleteSegmentNotFoundResponse.ts +0 -31
- package/models/DeleteSegmentSuccessResponse.ts +0 -31
- package/models/FilterExpressions.ts +0 -80
- package/models/InlineResponse2003.ts +0 -31
- package/models/Notification200Errors.ts +0 -45
- package/models/Player.ts +0 -291
- package/models/PlayerNotificationTargetIncludeAliases.ts +0 -31
- package/models/UpdatePlayerSuccessResponse.ts +0 -31
- package/models/UpdatePlayerTagsRequestBody.ts +0 -34
- package/models/UpdatePlayerTagsSuccessResponse.ts +0 -31
- package/models/UpdateSubscriptionRequestBody.ts +0 -32
- package/models/UserIdentityRequestBody.ts +0 -31
- package/models/UserIdentityResponse.ts +0 -31
- package/models/UserSubscriptionOptions.ts +0 -31
package/DefaultApi.md
CHANGED
|
@@ -1,52 +1,45 @@
|
|
|
1
1
|
# .DefaultApi
|
|
2
2
|
|
|
3
|
-
All URIs are relative to *https://onesignal.com
|
|
3
|
+
All URIs are relative to *https://api.onesignal.com*
|
|
4
4
|
|
|
5
5
|
Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
|
7
|
-
[**beginLiveActivity**](DefaultApi.md#beginLiveActivity) | **POST** /apps/{app_id}/live_activities/{activity_id}/token | Start Live Activity
|
|
8
7
|
[**cancelNotification**](DefaultApi.md#cancelNotification) | **DELETE** /notifications/{notification_id} | Stop a scheduled or currently outgoing notification
|
|
8
|
+
[**createAlias**](DefaultApi.md#createAlias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
|
|
9
|
+
[**createAliasBySubscription**](DefaultApi.md#createAliasBySubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
|
|
9
10
|
[**createApp**](DefaultApi.md#createApp) | **POST** /apps | Create an app
|
|
10
11
|
[**createNotification**](DefaultApi.md#createNotification) | **POST** /notifications | Create notification
|
|
11
|
-
[**
|
|
12
|
-
[**createSegments**](DefaultApi.md#createSegments) | **POST** /apps/{app_id}/segments | Create Segments
|
|
12
|
+
[**createSegment**](DefaultApi.md#createSegment) | **POST** /apps/{app_id}/segments | Create Segment
|
|
13
13
|
[**createSubscription**](DefaultApi.md#createSubscription) | **POST** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions |
|
|
14
14
|
[**createUser**](DefaultApi.md#createUser) | **POST** /apps/{app_id}/users |
|
|
15
15
|
[**deleteAlias**](DefaultApi.md#deleteAlias) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} |
|
|
16
|
-
[**
|
|
17
|
-
[**deleteSegments**](DefaultApi.md#deleteSegments) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segments
|
|
16
|
+
[**deleteSegment**](DefaultApi.md#deleteSegment) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segment
|
|
18
17
|
[**deleteSubscription**](DefaultApi.md#deleteSubscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} |
|
|
19
18
|
[**deleteUser**](DefaultApi.md#deleteUser) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
|
|
20
|
-
[**endLiveActivity**](DefaultApi.md#endLiveActivity) | **DELETE** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity
|
|
21
19
|
[**exportEvents**](DefaultApi.md#exportEvents) | **POST** /notifications/{notification_id}/export_events?app_id={app_id} | Export CSV of Events
|
|
22
|
-
[**
|
|
23
|
-
[**
|
|
24
|
-
[**
|
|
25
|
-
[**fetchUserIdentity**](DefaultApi.md#fetchUserIdentity) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
|
|
20
|
+
[**exportSubscriptions**](DefaultApi.md#exportSubscriptions) | **POST** /players/csv_export?app_id={app_id} | Export CSV of Subscriptions
|
|
21
|
+
[**getAliases**](DefaultApi.md#getAliases) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
|
|
22
|
+
[**getAliasesBySubscription**](DefaultApi.md#getAliasesBySubscription) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
|
|
26
23
|
[**getApp**](DefaultApi.md#getApp) | **GET** /apps/{app_id} | View an app
|
|
27
24
|
[**getApps**](DefaultApi.md#getApps) | **GET** /apps | View apps
|
|
28
|
-
[**getEligibleIams**](DefaultApi.md#getEligibleIams) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/iams |
|
|
29
25
|
[**getNotification**](DefaultApi.md#getNotification) | **GET** /notifications/{notification_id} | View notification
|
|
30
26
|
[**getNotificationHistory**](DefaultApi.md#getNotificationHistory) | **POST** /notifications/{notification_id}/history | Notification History
|
|
31
27
|
[**getNotifications**](DefaultApi.md#getNotifications) | **GET** /notifications | View notifications
|
|
32
28
|
[**getOutcomes**](DefaultApi.md#getOutcomes) | **GET** /apps/{app_id}/outcomes | View Outcomes
|
|
33
|
-
[**
|
|
34
|
-
[**
|
|
35
|
-
[**identifyUserByAlias**](DefaultApi.md#identifyUserByAlias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
|
|
36
|
-
[**identifyUserBySubscriptionId**](DefaultApi.md#identifyUserBySubscriptionId) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
|
|
29
|
+
[**getSegments**](DefaultApi.md#getSegments) | **GET** /apps/{app_id}/segments | Get Segments
|
|
30
|
+
[**getUser**](DefaultApi.md#getUser) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
|
|
37
31
|
[**transferSubscription**](DefaultApi.md#transferSubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner |
|
|
32
|
+
[**unsubscribeEmailWithToken**](DefaultApi.md#unsubscribeEmailWithToken) | **POST** /apps/{app_id}/notifications/{notification_id}/unsubscribe | Unsubscribe with token
|
|
38
33
|
[**updateApp**](DefaultApi.md#updateApp) | **PUT** /apps/{app_id} | Update an app
|
|
39
34
|
[**updateLiveActivity**](DefaultApi.md#updateLiveActivity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push
|
|
40
|
-
[**updatePlayer**](DefaultApi.md#updatePlayer) | **PUT** /players/{player_id} | Edit device
|
|
41
|
-
[**updatePlayerTags**](DefaultApi.md#updatePlayerTags) | **PUT** /apps/{app_id}/users/{external_user_id} | Edit tags with external user id
|
|
42
35
|
[**updateSubscription**](DefaultApi.md#updateSubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} |
|
|
43
36
|
[**updateUser**](DefaultApi.md#updateUser) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
|
|
44
37
|
|
|
45
38
|
|
|
46
|
-
# **
|
|
47
|
-
>
|
|
39
|
+
# **cancelNotification**
|
|
40
|
+
> GenericSuccessBoolResponse cancelNotification()
|
|
48
41
|
|
|
49
|
-
|
|
42
|
+
Used to stop a scheduled or currently outgoing notification
|
|
50
43
|
|
|
51
44
|
### Example
|
|
52
45
|
|
|
@@ -58,19 +51,14 @@ import * as fs from 'fs';
|
|
|
58
51
|
const configuration = .createConfiguration();
|
|
59
52
|
const apiInstance = new .DefaultApi(configuration);
|
|
60
53
|
|
|
61
|
-
let body:.
|
|
62
|
-
// string
|
|
54
|
+
let body:.DefaultApiCancelNotificationRequest = {
|
|
55
|
+
// string
|
|
63
56
|
appId: "app_id_example",
|
|
64
|
-
// string
|
|
65
|
-
|
|
66
|
-
// BeginLiveActivityRequest
|
|
67
|
-
beginLiveActivityRequest: {
|
|
68
|
-
push_token: "push_token_example",
|
|
69
|
-
subscription_id: "subscription_id_example",
|
|
70
|
-
},
|
|
57
|
+
// string
|
|
58
|
+
notificationId: "notification_id_example",
|
|
71
59
|
};
|
|
72
60
|
|
|
73
|
-
apiInstance.
|
|
61
|
+
apiInstance.cancelNotification(body).then((data:any) => {
|
|
74
62
|
console.log('API called successfully. Returned data: ' + data);
|
|
75
63
|
}).catch((error:any) => console.error(error));
|
|
76
64
|
```
|
|
@@ -80,38 +68,38 @@ apiInstance.beginLiveActivity(body).then((data:any) => {
|
|
|
80
68
|
|
|
81
69
|
Name | Type | Description | Notes
|
|
82
70
|
------------- | ------------- | ------------- | -------------
|
|
83
|
-
**
|
|
84
|
-
**
|
|
85
|
-
**activityId** | [**string**] | Live Activity record ID | defaults to undefined
|
|
71
|
+
**appId** | [**string**] | | defaults to undefined
|
|
72
|
+
**notificationId** | [**string**] | | defaults to undefined
|
|
86
73
|
|
|
87
74
|
|
|
88
75
|
### Return type
|
|
89
76
|
|
|
90
|
-
**
|
|
77
|
+
**GenericSuccessBoolResponse**
|
|
91
78
|
|
|
92
79
|
### Authorization
|
|
93
80
|
|
|
94
|
-
[
|
|
81
|
+
[rest_api_key](README.md#rest_api_key)
|
|
95
82
|
|
|
96
83
|
### HTTP request headers
|
|
97
84
|
|
|
98
|
-
- **Content-Type**:
|
|
85
|
+
- **Content-Type**: Not defined
|
|
99
86
|
- **Accept**: application/json
|
|
100
87
|
|
|
101
88
|
|
|
102
89
|
### HTTP response details
|
|
103
90
|
| Status code | Description | Response headers |
|
|
104
91
|
|-------------|-------------|------------------|
|
|
105
|
-
**
|
|
92
|
+
**200** | OK | - |
|
|
106
93
|
**400** | Bad Request | - |
|
|
94
|
+
**404** | Not Found | - |
|
|
107
95
|
**429** | Rate Limit Exceeded | - |
|
|
108
96
|
|
|
109
97
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
110
98
|
|
|
111
|
-
# **
|
|
112
|
-
>
|
|
99
|
+
# **createAlias**
|
|
100
|
+
> UserIdentityBody createAlias(userIdentityBody)
|
|
113
101
|
|
|
114
|
-
|
|
102
|
+
Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
|
|
115
103
|
|
|
116
104
|
### Example
|
|
117
105
|
|
|
@@ -123,14 +111,22 @@ import * as fs from 'fs';
|
|
|
123
111
|
const configuration = .createConfiguration();
|
|
124
112
|
const apiInstance = new .DefaultApi(configuration);
|
|
125
113
|
|
|
126
|
-
let body:.
|
|
114
|
+
let body:.DefaultApiCreateAliasRequest = {
|
|
127
115
|
// string
|
|
128
116
|
appId: "app_id_example",
|
|
129
117
|
// string
|
|
130
|
-
|
|
118
|
+
aliasLabel: "alias_label_example",
|
|
119
|
+
// string
|
|
120
|
+
aliasId: "alias_id_example",
|
|
121
|
+
// UserIdentityBody
|
|
122
|
+
userIdentityBody: {
|
|
123
|
+
identity: {
|
|
124
|
+
"key": "key_example",
|
|
125
|
+
},
|
|
126
|
+
},
|
|
131
127
|
};
|
|
132
128
|
|
|
133
|
-
apiInstance.
|
|
129
|
+
apiInstance.createAlias(body).then((data:any) => {
|
|
134
130
|
console.log('API called successfully. Returned data: ' + data);
|
|
135
131
|
}).catch((error:any) => console.error(error));
|
|
136
132
|
```
|
|
@@ -140,21 +136,23 @@ apiInstance.cancelNotification(body).then((data:any) => {
|
|
|
140
136
|
|
|
141
137
|
Name | Type | Description | Notes
|
|
142
138
|
------------- | ------------- | ------------- | -------------
|
|
139
|
+
**userIdentityBody** | **UserIdentityBody**| |
|
|
143
140
|
**appId** | [**string**] | | defaults to undefined
|
|
144
|
-
**
|
|
141
|
+
**aliasLabel** | [**string**] | | defaults to undefined
|
|
142
|
+
**aliasId** | [**string**] | | defaults to undefined
|
|
145
143
|
|
|
146
144
|
|
|
147
145
|
### Return type
|
|
148
146
|
|
|
149
|
-
**
|
|
147
|
+
**UserIdentityBody**
|
|
150
148
|
|
|
151
149
|
### Authorization
|
|
152
150
|
|
|
153
|
-
[
|
|
151
|
+
[rest_api_key](README.md#rest_api_key)
|
|
154
152
|
|
|
155
153
|
### HTTP request headers
|
|
156
154
|
|
|
157
|
-
- **Content-Type**:
|
|
155
|
+
- **Content-Type**: application/json
|
|
158
156
|
- **Accept**: application/json
|
|
159
157
|
|
|
160
158
|
|
|
@@ -163,14 +161,16 @@ Name | Type | Description | Notes
|
|
|
163
161
|
|-------------|-------------|------------------|
|
|
164
162
|
**200** | OK | - |
|
|
165
163
|
**400** | Bad Request | - |
|
|
164
|
+
**404** | Not Found | - |
|
|
165
|
+
**409** | Conflict | - |
|
|
166
166
|
**429** | Rate Limit Exceeded | - |
|
|
167
167
|
|
|
168
168
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
169
169
|
|
|
170
|
-
# **
|
|
171
|
-
>
|
|
170
|
+
# **createAliasBySubscription**
|
|
171
|
+
> UserIdentityBody createAliasBySubscription(userIdentityBody)
|
|
172
172
|
|
|
173
|
-
|
|
173
|
+
Upserts one or more Aliases for the User identified by :subscription_id.
|
|
174
174
|
|
|
175
175
|
### Example
|
|
176
176
|
|
|
@@ -182,34 +182,20 @@ import * as fs from 'fs';
|
|
|
182
182
|
const configuration = .createConfiguration();
|
|
183
183
|
const apiInstance = new .DefaultApi(configuration);
|
|
184
184
|
|
|
185
|
-
let body:.
|
|
186
|
-
//
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
apns_env: "sandbox",
|
|
196
|
-
apns_p12: "apns_p12_example",
|
|
197
|
-
apns_p12_password: "apns_p12_password_example",
|
|
198
|
-
safari_apns_p12: "safari_apns_p12_example",
|
|
199
|
-
safari_apns_p12_password: "safari_apns_p12_password_example",
|
|
200
|
-
apns_key_id: "apns_key_id_example",
|
|
201
|
-
apns_team_id: "apns_team_id_example",
|
|
202
|
-
apns_bundle_id: "apns_bundle_id_example",
|
|
203
|
-
apns_p8: "apns_p8_example",
|
|
204
|
-
safari_site_origin: "safari_site_origin_example",
|
|
205
|
-
safari_icon_256_256: "safari_icon_256_256_example",
|
|
206
|
-
site_name: "site_name_example",
|
|
207
|
-
organization_id: "organization_id_example",
|
|
208
|
-
additional_data_is_root_payload: true,
|
|
185
|
+
let body:.DefaultApiCreateAliasBySubscriptionRequest = {
|
|
186
|
+
// string
|
|
187
|
+
appId: "app_id_example",
|
|
188
|
+
// string
|
|
189
|
+
subscriptionId: "subscription_id_example",
|
|
190
|
+
// UserIdentityBody
|
|
191
|
+
userIdentityBody: {
|
|
192
|
+
identity: {
|
|
193
|
+
"key": "key_example",
|
|
194
|
+
},
|
|
209
195
|
},
|
|
210
196
|
};
|
|
211
197
|
|
|
212
|
-
apiInstance.
|
|
198
|
+
apiInstance.createAliasBySubscription(body).then((data:any) => {
|
|
213
199
|
console.log('API called successfully. Returned data: ' + data);
|
|
214
200
|
}).catch((error:any) => console.error(error));
|
|
215
201
|
```
|
|
@@ -219,16 +205,18 @@ apiInstance.createApp(body).then((data:any) => {
|
|
|
219
205
|
|
|
220
206
|
Name | Type | Description | Notes
|
|
221
207
|
------------- | ------------- | ------------- | -------------
|
|
222
|
-
**
|
|
208
|
+
**userIdentityBody** | **UserIdentityBody**| |
|
|
209
|
+
**appId** | [**string**] | | defaults to undefined
|
|
210
|
+
**subscriptionId** | [**string**] | | defaults to undefined
|
|
223
211
|
|
|
224
212
|
|
|
225
213
|
### Return type
|
|
226
214
|
|
|
227
|
-
**
|
|
215
|
+
**UserIdentityBody**
|
|
228
216
|
|
|
229
217
|
### Authorization
|
|
230
218
|
|
|
231
|
-
[
|
|
219
|
+
[rest_api_key](README.md#rest_api_key)
|
|
232
220
|
|
|
233
221
|
### HTTP request headers
|
|
234
222
|
|
|
@@ -241,14 +229,16 @@ Name | Type | Description | Notes
|
|
|
241
229
|
|-------------|-------------|------------------|
|
|
242
230
|
**200** | OK | - |
|
|
243
231
|
**400** | Bad Request | - |
|
|
232
|
+
**404** | Not Found | - |
|
|
233
|
+
**409** | Conflict | - |
|
|
244
234
|
**429** | Rate Limit Exceeded | - |
|
|
245
235
|
|
|
246
236
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
247
237
|
|
|
248
|
-
# **
|
|
249
|
-
>
|
|
238
|
+
# **createApp**
|
|
239
|
+
> App createApp(app)
|
|
250
240
|
|
|
251
|
-
|
|
241
|
+
Creates a new OneSignal app
|
|
252
242
|
|
|
253
243
|
### Example
|
|
254
244
|
|
|
@@ -260,12 +250,34 @@ import * as fs from 'fs';
|
|
|
260
250
|
const configuration = .createConfiguration();
|
|
261
251
|
const apiInstance = new .DefaultApi(configuration);
|
|
262
252
|
|
|
263
|
-
let body:.
|
|
264
|
-
//
|
|
265
|
-
|
|
253
|
+
let body:.DefaultApiCreateAppRequest = {
|
|
254
|
+
// App
|
|
255
|
+
app: {
|
|
256
|
+
name: "name_example",
|
|
257
|
+
android_gcm_sender_id: "android_gcm_sender_id_example",
|
|
258
|
+
gcm_key: "gcm_key_example",
|
|
259
|
+
chrome_web_origin: "chrome_web_origin_example",
|
|
260
|
+
chrome_key: "chrome_key_example",
|
|
261
|
+
chrome_web_default_notification_icon: "chrome_web_default_notification_icon_example",
|
|
262
|
+
chrome_web_sub_domain: "chrome_web_sub_domain_example",
|
|
263
|
+
apns_env: "sandbox",
|
|
264
|
+
apns_p12: "apns_p12_example",
|
|
265
|
+
apns_p12_password: "apns_p12_password_example",
|
|
266
|
+
safari_apns_p12: "safari_apns_p12_example",
|
|
267
|
+
safari_apns_p12_password: "safari_apns_p12_password_example",
|
|
268
|
+
apns_key_id: "apns_key_id_example",
|
|
269
|
+
apns_team_id: "apns_team_id_example",
|
|
270
|
+
apns_bundle_id: "apns_bundle_id_example",
|
|
271
|
+
apns_p8: "apns_p8_example",
|
|
272
|
+
safari_site_origin: "safari_site_origin_example",
|
|
273
|
+
safari_icon_256_256: "safari_icon_256_256_example",
|
|
274
|
+
site_name: "site_name_example",
|
|
275
|
+
organization_id: "organization_id_example",
|
|
276
|
+
additional_data_is_root_payload: true,
|
|
277
|
+
},
|
|
266
278
|
};
|
|
267
279
|
|
|
268
|
-
apiInstance.
|
|
280
|
+
apiInstance.createApp(body).then((data:any) => {
|
|
269
281
|
console.log('API called successfully. Returned data: ' + data);
|
|
270
282
|
}).catch((error:any) => console.error(error));
|
|
271
283
|
```
|
|
@@ -275,16 +287,16 @@ apiInstance.createNotification(body).then((data:any) => {
|
|
|
275
287
|
|
|
276
288
|
Name | Type | Description | Notes
|
|
277
289
|
------------- | ------------- | ------------- | -------------
|
|
278
|
-
**
|
|
290
|
+
**app** | **App**| |
|
|
279
291
|
|
|
280
292
|
|
|
281
293
|
### Return type
|
|
282
294
|
|
|
283
|
-
**
|
|
295
|
+
**App**
|
|
284
296
|
|
|
285
297
|
### Authorization
|
|
286
298
|
|
|
287
|
-
[
|
|
299
|
+
[user_auth_key](README.md#user_auth_key)
|
|
288
300
|
|
|
289
301
|
### HTTP request headers
|
|
290
302
|
|
|
@@ -295,16 +307,16 @@ Name | Type | Description | Notes
|
|
|
295
307
|
### HTTP response details
|
|
296
308
|
| Status code | Description | Response headers |
|
|
297
309
|
|-------------|-------------|------------------|
|
|
298
|
-
**200** | OK
|
|
310
|
+
**200** | OK | - |
|
|
299
311
|
**400** | Bad Request | - |
|
|
300
312
|
**429** | Rate Limit Exceeded | - |
|
|
301
313
|
|
|
302
314
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
303
315
|
|
|
304
|
-
# **
|
|
305
|
-
>
|
|
316
|
+
# **createNotification**
|
|
317
|
+
> CreateNotificationSuccessResponse createNotification(notification)
|
|
306
318
|
|
|
307
|
-
|
|
319
|
+
Sends notifications to your users
|
|
308
320
|
|
|
309
321
|
### Example
|
|
310
322
|
|
|
@@ -316,38 +328,12 @@ import * as fs from 'fs';
|
|
|
316
328
|
const configuration = .createConfiguration();
|
|
317
329
|
const apiInstance = new .DefaultApi(configuration);
|
|
318
330
|
|
|
319
|
-
let body:.
|
|
320
|
-
//
|
|
321
|
-
|
|
322
|
-
app_id: "app_id_example",
|
|
323
|
-
device_type: 1,
|
|
324
|
-
external_user_id: "external_user_id_example",
|
|
325
|
-
external_user_id_auth_hash: "external_user_id_auth_hash_example",
|
|
326
|
-
email_auth_hash: "email_auth_hash_example",
|
|
327
|
-
identifier: "identifier_example",
|
|
328
|
-
language: "language_example",
|
|
329
|
-
timezone: 1,
|
|
330
|
-
game_version: "game_version_example",
|
|
331
|
-
device_model: "device_model_example",
|
|
332
|
-
device_os: "device_os_example",
|
|
333
|
-
ad_id: "ad_id_example",
|
|
334
|
-
sdk: "sdk_example",
|
|
335
|
-
session_count: 1,
|
|
336
|
-
tags: {},
|
|
337
|
-
amount_spent: 3.14,
|
|
338
|
-
created_at: 1,
|
|
339
|
-
playtime: 1,
|
|
340
|
-
badge_count: 1,
|
|
341
|
-
last_active: 1,
|
|
342
|
-
notification_types: 1,
|
|
343
|
-
test_type: 1,
|
|
344
|
-
long: 3.14,
|
|
345
|
-
lat: 3.14,
|
|
346
|
-
country: "country_example",
|
|
347
|
-
},
|
|
331
|
+
let body:.DefaultApiCreateNotificationRequest = {
|
|
332
|
+
// Notification
|
|
333
|
+
notification: null,
|
|
348
334
|
};
|
|
349
335
|
|
|
350
|
-
apiInstance.
|
|
336
|
+
apiInstance.createNotification(body).then((data:any) => {
|
|
351
337
|
console.log('API called successfully. Returned data: ' + data);
|
|
352
338
|
}).catch((error:any) => console.error(error));
|
|
353
339
|
```
|
|
@@ -357,16 +343,16 @@ apiInstance.createPlayer(body).then((data:any) => {
|
|
|
357
343
|
|
|
358
344
|
Name | Type | Description | Notes
|
|
359
345
|
------------- | ------------- | ------------- | -------------
|
|
360
|
-
**
|
|
346
|
+
**notification** | **Notification**| |
|
|
361
347
|
|
|
362
348
|
|
|
363
349
|
### Return type
|
|
364
350
|
|
|
365
|
-
**
|
|
351
|
+
**CreateNotificationSuccessResponse**
|
|
366
352
|
|
|
367
353
|
### Authorization
|
|
368
354
|
|
|
369
|
-
[
|
|
355
|
+
[rest_api_key](README.md#rest_api_key)
|
|
370
356
|
|
|
371
357
|
### HTTP request headers
|
|
372
358
|
|
|
@@ -377,17 +363,16 @@ Name | Type | Description | Notes
|
|
|
377
363
|
### HTTP response details
|
|
378
364
|
| Status code | Description | Response headers |
|
|
379
365
|
|-------------|-------------|------------------|
|
|
380
|
-
**200** | OK | - |
|
|
366
|
+
**200** | OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response and an id for the notification. If the 200 response contains \"invalid_aliases\" this will mark devices that exist in the provided app_id but are no longer subscribed. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. | - |
|
|
381
367
|
**400** | Bad Request | - |
|
|
382
|
-
**409** | Conflict | - |
|
|
383
368
|
**429** | Rate Limit Exceeded | - |
|
|
384
369
|
|
|
385
370
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
386
371
|
|
|
387
|
-
# **
|
|
388
|
-
> CreateSegmentSuccessResponse
|
|
372
|
+
# **createSegment**
|
|
373
|
+
> CreateSegmentSuccessResponse createSegment()
|
|
389
374
|
|
|
390
|
-
Create
|
|
375
|
+
Create a segment visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator\'s. 🚧 Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segment endpoint and re-create it with this endpoint to edit.
|
|
391
376
|
|
|
392
377
|
### Example
|
|
393
378
|
|
|
@@ -399,7 +384,7 @@ import * as fs from 'fs';
|
|
|
399
384
|
const configuration = .createConfiguration();
|
|
400
385
|
const apiInstance = new .DefaultApi(configuration);
|
|
401
386
|
|
|
402
|
-
let body:.
|
|
387
|
+
let body:.DefaultApiCreateSegmentRequest = {
|
|
403
388
|
// string | The OneSignal App ID for your app. Available in Keys & IDs.
|
|
404
389
|
appId: "app_id_example",
|
|
405
390
|
// Segment (optional)
|
|
@@ -412,7 +397,7 @@ let body:.DefaultApiCreateSegmentsRequest = {
|
|
|
412
397
|
},
|
|
413
398
|
};
|
|
414
399
|
|
|
415
|
-
apiInstance.
|
|
400
|
+
apiInstance.createSegment(body).then((data:any) => {
|
|
416
401
|
console.log('API called successfully. Returned data: ' + data);
|
|
417
402
|
}).catch((error:any) => console.error(error));
|
|
418
403
|
```
|
|
@@ -432,7 +417,7 @@ Name | Type | Description | Notes
|
|
|
432
417
|
|
|
433
418
|
### Authorization
|
|
434
419
|
|
|
435
|
-
[
|
|
420
|
+
[rest_api_key](README.md#rest_api_key)
|
|
436
421
|
|
|
437
422
|
### HTTP request headers
|
|
438
423
|
|
|
@@ -451,7 +436,7 @@ Name | Type | Description | Notes
|
|
|
451
436
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
452
437
|
|
|
453
438
|
# **createSubscription**
|
|
454
|
-
>
|
|
439
|
+
> SubscriptionBody createSubscription(subscriptionBody)
|
|
455
440
|
|
|
456
441
|
Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User.
|
|
457
442
|
|
|
@@ -472,28 +457,27 @@ let body:.DefaultApiCreateSubscriptionRequest = {
|
|
|
472
457
|
aliasLabel: "alias_label_example",
|
|
473
458
|
// string
|
|
474
459
|
aliasId: "alias_id_example",
|
|
475
|
-
//
|
|
476
|
-
|
|
460
|
+
// SubscriptionBody
|
|
461
|
+
subscriptionBody: {
|
|
477
462
|
subscription: {
|
|
478
463
|
id: "id_example",
|
|
479
464
|
type: "iOSPush",
|
|
480
465
|
token: "token_example",
|
|
481
466
|
enabled: true,
|
|
482
|
-
notification_types:
|
|
483
|
-
session_time:
|
|
484
|
-
session_count:
|
|
467
|
+
notification_types: 1,
|
|
468
|
+
session_time: 1,
|
|
469
|
+
session_count: 1,
|
|
485
470
|
sdk: "sdk_example",
|
|
486
471
|
device_model: "device_model_example",
|
|
487
472
|
device_os: "device_os_example",
|
|
488
473
|
rooted: true,
|
|
489
|
-
test_type:
|
|
474
|
+
test_type: 1,
|
|
490
475
|
app_version: "app_version_example",
|
|
491
|
-
net_type:
|
|
476
|
+
net_type: 1,
|
|
492
477
|
carrier: "carrier_example",
|
|
493
478
|
web_auth: "web_auth_example",
|
|
494
479
|
web_p256: "web_p256_example",
|
|
495
480
|
},
|
|
496
|
-
retain_previous_owner: true,
|
|
497
481
|
},
|
|
498
482
|
};
|
|
499
483
|
|
|
@@ -507,7 +491,7 @@ apiInstance.createSubscription(body).then((data:any) => {
|
|
|
507
491
|
|
|
508
492
|
Name | Type | Description | Notes
|
|
509
493
|
------------- | ------------- | ------------- | -------------
|
|
510
|
-
**
|
|
494
|
+
**subscriptionBody** | **SubscriptionBody**| |
|
|
511
495
|
**appId** | [**string**] | | defaults to undefined
|
|
512
496
|
**aliasLabel** | [**string**] | | defaults to undefined
|
|
513
497
|
**aliasId** | [**string**] | | defaults to undefined
|
|
@@ -515,11 +499,11 @@ Name | Type | Description | Notes
|
|
|
515
499
|
|
|
516
500
|
### Return type
|
|
517
501
|
|
|
518
|
-
**
|
|
502
|
+
**SubscriptionBody**
|
|
519
503
|
|
|
520
504
|
### Authorization
|
|
521
505
|
|
|
522
|
-
[
|
|
506
|
+
[rest_api_key](README.md#rest_api_key)
|
|
523
507
|
|
|
524
508
|
### HTTP request headers
|
|
525
509
|
|
|
@@ -533,6 +517,7 @@ Name | Type | Description | Notes
|
|
|
533
517
|
**201** | CREATED | - |
|
|
534
518
|
**202** | ACCEPTED | - |
|
|
535
519
|
**400** | Bad Request | - |
|
|
520
|
+
**404** | Not Found | - |
|
|
536
521
|
**409** | Operation is not permitted due to user having the maximum number of subscriptions assigned | - |
|
|
537
522
|
**429** | Rate Limit Exceeded | - |
|
|
538
523
|
|
|
@@ -565,44 +550,43 @@ let body:.DefaultApiCreateUserRequest = {
|
|
|
565
550
|
lat: 3.14,
|
|
566
551
|
long: 3.14,
|
|
567
552
|
country: "country_example",
|
|
568
|
-
first_active:
|
|
569
|
-
last_active:
|
|
553
|
+
first_active: 1,
|
|
554
|
+
last_active: 1,
|
|
570
555
|
amount_spent: 3.14,
|
|
571
556
|
purchases: [
|
|
572
557
|
{
|
|
573
558
|
sku: "sku_example",
|
|
574
559
|
amount: "amount_example",
|
|
575
560
|
iso: "iso_example",
|
|
576
|
-
count:
|
|
561
|
+
count: 1,
|
|
577
562
|
},
|
|
578
563
|
],
|
|
579
564
|
ip: "ip_example",
|
|
580
565
|
},
|
|
581
|
-
identity: {
|
|
566
|
+
identity: {
|
|
567
|
+
"key": "key_example",
|
|
568
|
+
},
|
|
582
569
|
subscriptions: [
|
|
583
570
|
{
|
|
584
571
|
id: "id_example",
|
|
585
572
|
type: "iOSPush",
|
|
586
573
|
token: "token_example",
|
|
587
574
|
enabled: true,
|
|
588
|
-
notification_types:
|
|
589
|
-
session_time:
|
|
590
|
-
session_count:
|
|
575
|
+
notification_types: 1,
|
|
576
|
+
session_time: 1,
|
|
577
|
+
session_count: 1,
|
|
591
578
|
sdk: "sdk_example",
|
|
592
579
|
device_model: "device_model_example",
|
|
593
580
|
device_os: "device_os_example",
|
|
594
581
|
rooted: true,
|
|
595
|
-
test_type:
|
|
582
|
+
test_type: 1,
|
|
596
583
|
app_version: "app_version_example",
|
|
597
|
-
net_type:
|
|
584
|
+
net_type: 1,
|
|
598
585
|
carrier: "carrier_example",
|
|
599
586
|
web_auth: "web_auth_example",
|
|
600
587
|
web_p256: "web_p256_example",
|
|
601
588
|
},
|
|
602
589
|
],
|
|
603
|
-
subscription_options: {
|
|
604
|
-
retain_previous_owner: true,
|
|
605
|
-
},
|
|
606
590
|
},
|
|
607
591
|
};
|
|
608
592
|
|
|
@@ -626,7 +610,7 @@ Name | Type | Description | Notes
|
|
|
626
610
|
|
|
627
611
|
### Authorization
|
|
628
612
|
|
|
629
|
-
[
|
|
613
|
+
[rest_api_key](README.md#rest_api_key)
|
|
630
614
|
|
|
631
615
|
### HTTP request headers
|
|
632
616
|
|
|
@@ -647,7 +631,7 @@ Name | Type | Description | Notes
|
|
|
647
631
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
648
632
|
|
|
649
633
|
# **deleteAlias**
|
|
650
|
-
>
|
|
634
|
+
> UserIdentityBody deleteAlias()
|
|
651
635
|
|
|
652
636
|
Deletes an alias by alias label
|
|
653
637
|
|
|
@@ -690,71 +674,11 @@ Name | Type | Description | Notes
|
|
|
690
674
|
|
|
691
675
|
### Return type
|
|
692
676
|
|
|
693
|
-
**
|
|
694
|
-
|
|
695
|
-
### Authorization
|
|
696
|
-
|
|
697
|
-
[app_key](README.md#app_key)
|
|
698
|
-
|
|
699
|
-
### HTTP request headers
|
|
700
|
-
|
|
701
|
-
- **Content-Type**: Not defined
|
|
702
|
-
- **Accept**: application/json
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
### HTTP response details
|
|
706
|
-
| Status code | Description | Response headers |
|
|
707
|
-
|-------------|-------------|------------------|
|
|
708
|
-
**200** | OK | - |
|
|
709
|
-
**400** | Bad Request | - |
|
|
710
|
-
**409** | Conflict | - |
|
|
711
|
-
**429** | Rate Limit Exceeded | - |
|
|
712
|
-
|
|
713
|
-
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
714
|
-
|
|
715
|
-
# **deletePlayer**
|
|
716
|
-
> DeletePlayerSuccessResponse deletePlayer()
|
|
717
|
-
|
|
718
|
-
Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app.
|
|
719
|
-
|
|
720
|
-
### Example
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
```typescript
|
|
724
|
-
import { } from '';
|
|
725
|
-
import * as fs from 'fs';
|
|
726
|
-
|
|
727
|
-
const configuration = .createConfiguration();
|
|
728
|
-
const apiInstance = new .DefaultApi(configuration);
|
|
729
|
-
|
|
730
|
-
let body:.DefaultApiDeletePlayerRequest = {
|
|
731
|
-
// string | The OneSignal App ID for your app. Available in Keys & IDs.
|
|
732
|
-
appId: "app_id_example",
|
|
733
|
-
// string | The OneSignal player_id
|
|
734
|
-
playerId: "player_id_example",
|
|
735
|
-
};
|
|
736
|
-
|
|
737
|
-
apiInstance.deletePlayer(body).then((data:any) => {
|
|
738
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
739
|
-
}).catch((error:any) => console.error(error));
|
|
740
|
-
```
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
### Parameters
|
|
744
|
-
|
|
745
|
-
Name | Type | Description | Notes
|
|
746
|
-
------------- | ------------- | ------------- | -------------
|
|
747
|
-
**appId** | [**string**] | The OneSignal App ID for your app. Available in Keys & IDs. | defaults to undefined
|
|
748
|
-
**playerId** | [**string**] | The OneSignal player_id | defaults to undefined
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
### Return type
|
|
752
|
-
|
|
753
|
-
**DeletePlayerSuccessResponse**
|
|
677
|
+
**UserIdentityBody**
|
|
754
678
|
|
|
755
679
|
### Authorization
|
|
756
680
|
|
|
757
|
-
[
|
|
681
|
+
[rest_api_key](README.md#rest_api_key)
|
|
758
682
|
|
|
759
683
|
### HTTP request headers
|
|
760
684
|
|
|
@@ -768,14 +692,15 @@ Name | Type | Description | Notes
|
|
|
768
692
|
**200** | OK | - |
|
|
769
693
|
**400** | Bad Request | - |
|
|
770
694
|
**404** | Not Found | - |
|
|
695
|
+
**409** | Conflict | - |
|
|
771
696
|
**429** | Rate Limit Exceeded | - |
|
|
772
697
|
|
|
773
698
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
774
699
|
|
|
775
|
-
# **
|
|
776
|
-
>
|
|
700
|
+
# **deleteSegment**
|
|
701
|
+
> GenericSuccessBoolResponse deleteSegment()
|
|
777
702
|
|
|
778
|
-
Delete
|
|
703
|
+
Delete a segment (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard.
|
|
779
704
|
|
|
780
705
|
### Example
|
|
781
706
|
|
|
@@ -787,14 +712,14 @@ import * as fs from 'fs';
|
|
|
787
712
|
const configuration = .createConfiguration();
|
|
788
713
|
const apiInstance = new .DefaultApi(configuration);
|
|
789
714
|
|
|
790
|
-
let body:.
|
|
715
|
+
let body:.DefaultApiDeleteSegmentRequest = {
|
|
791
716
|
// string | The OneSignal App ID for your app. Available in Keys & IDs.
|
|
792
717
|
appId: "app_id_example",
|
|
793
718
|
// string | The segment_id can be found in the URL of the segment when viewing it in the dashboard.
|
|
794
719
|
segmentId: "segment_id_example",
|
|
795
720
|
};
|
|
796
721
|
|
|
797
|
-
apiInstance.
|
|
722
|
+
apiInstance.deleteSegment(body).then((data:any) => {
|
|
798
723
|
console.log('API called successfully. Returned data: ' + data);
|
|
799
724
|
}).catch((error:any) => console.error(error));
|
|
800
725
|
```
|
|
@@ -810,11 +735,11 @@ Name | Type | Description | Notes
|
|
|
810
735
|
|
|
811
736
|
### Return type
|
|
812
737
|
|
|
813
|
-
**
|
|
738
|
+
**GenericSuccessBoolResponse**
|
|
814
739
|
|
|
815
740
|
### Authorization
|
|
816
741
|
|
|
817
|
-
[
|
|
742
|
+
[rest_api_key](README.md#rest_api_key)
|
|
818
743
|
|
|
819
744
|
### HTTP request headers
|
|
820
745
|
|
|
@@ -874,7 +799,7 @@ Name | Type | Description | Notes
|
|
|
874
799
|
|
|
875
800
|
### Authorization
|
|
876
801
|
|
|
877
|
-
[
|
|
802
|
+
[rest_api_key](README.md#rest_api_key)
|
|
878
803
|
|
|
879
804
|
### HTTP request headers
|
|
880
805
|
|
|
@@ -887,6 +812,7 @@ Name | Type | Description | Notes
|
|
|
887
812
|
|-------------|-------------|------------------|
|
|
888
813
|
**202** | ACCEPTED | - |
|
|
889
814
|
**400** | Bad Request | - |
|
|
815
|
+
**404** | Not Found | - |
|
|
890
816
|
**409** | Conflict | - |
|
|
891
817
|
**429** | Rate Limit Exceeded | - |
|
|
892
818
|
|
|
@@ -955,10 +881,10 @@ No authorization required
|
|
|
955
881
|
|
|
956
882
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
957
883
|
|
|
958
|
-
# **
|
|
959
|
-
>
|
|
884
|
+
# **exportEvents**
|
|
885
|
+
> ExportEventsSuccessResponse exportEvents()
|
|
960
886
|
|
|
961
|
-
|
|
887
|
+
Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time.
|
|
962
888
|
|
|
963
889
|
### Example
|
|
964
890
|
|
|
@@ -970,16 +896,14 @@ import * as fs from 'fs';
|
|
|
970
896
|
const configuration = .createConfiguration();
|
|
971
897
|
const apiInstance = new .DefaultApi(configuration);
|
|
972
898
|
|
|
973
|
-
let body:.
|
|
974
|
-
// string | The
|
|
899
|
+
let body:.DefaultApiExportEventsRequest = {
|
|
900
|
+
// string | The ID of the notification to export events from.
|
|
901
|
+
notificationId: "notification_id_example",
|
|
902
|
+
// string | The ID of the app that the notification belongs to.
|
|
975
903
|
appId: "app_id_example",
|
|
976
|
-
// string | Live Activity record ID
|
|
977
|
-
activityId: "activity_id_example",
|
|
978
|
-
// string | Subscription ID
|
|
979
|
-
subscriptionId: "subscription_id_example",
|
|
980
904
|
};
|
|
981
905
|
|
|
982
|
-
apiInstance.
|
|
906
|
+
apiInstance.exportEvents(body).then((data:any) => {
|
|
983
907
|
console.log('API called successfully. Returned data: ' + data);
|
|
984
908
|
}).catch((error:any) => console.error(error));
|
|
985
909
|
```
|
|
@@ -989,18 +913,17 @@ apiInstance.endLiveActivity(body).then((data:any) => {
|
|
|
989
913
|
|
|
990
914
|
Name | Type | Description | Notes
|
|
991
915
|
------------- | ------------- | ------------- | -------------
|
|
992
|
-
**
|
|
993
|
-
**
|
|
994
|
-
**subscriptionId** | [**string**] | Subscription ID | defaults to undefined
|
|
916
|
+
**notificationId** | [**string**] | The ID of the notification to export events from. | defaults to undefined
|
|
917
|
+
**appId** | [**string**] | The ID of the app that the notification belongs to. | defaults to undefined
|
|
995
918
|
|
|
996
919
|
|
|
997
920
|
### Return type
|
|
998
921
|
|
|
999
|
-
**
|
|
922
|
+
**ExportEventsSuccessResponse**
|
|
1000
923
|
|
|
1001
924
|
### Authorization
|
|
1002
925
|
|
|
1003
|
-
[
|
|
926
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1004
927
|
|
|
1005
928
|
### HTTP request headers
|
|
1006
929
|
|
|
@@ -1011,16 +934,17 @@ Name | Type | Description | Notes
|
|
|
1011
934
|
### HTTP response details
|
|
1012
935
|
| Status code | Description | Response headers |
|
|
1013
936
|
|-------------|-------------|------------------|
|
|
1014
|
-
**
|
|
937
|
+
**200** | OK | - |
|
|
1015
938
|
**400** | Bad Request | - |
|
|
939
|
+
**404** | Not Found | - |
|
|
1016
940
|
**429** | Rate Limit Exceeded | - |
|
|
1017
941
|
|
|
1018
942
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
1019
943
|
|
|
1020
|
-
# **
|
|
1021
|
-
>
|
|
944
|
+
# **exportSubscriptions**
|
|
945
|
+
> ExportSubscriptionsSuccessResponse exportSubscriptions()
|
|
1022
946
|
|
|
1023
|
-
Generate a compressed CSV
|
|
947
|
+
Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. 🚧 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. 🚧 Requires Authentication Key Requires your OneSignal App\'s REST API Key, available in Keys & IDs. 🚧 Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | --- | --- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | --- | --- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. |
|
|
1024
948
|
|
|
1025
949
|
### Example
|
|
1026
950
|
|
|
@@ -1032,14 +956,20 @@ import * as fs from 'fs';
|
|
|
1032
956
|
const configuration = .createConfiguration();
|
|
1033
957
|
const apiInstance = new .DefaultApi(configuration);
|
|
1034
958
|
|
|
1035
|
-
let body:.
|
|
1036
|
-
// string | The ID
|
|
1037
|
-
notificationId: "notification_id_example",
|
|
1038
|
-
// string | The ID of the app that the notification belongs to.
|
|
959
|
+
let body:.DefaultApiExportSubscriptionsRequest = {
|
|
960
|
+
// string | The app ID that you want to export devices from
|
|
1039
961
|
appId: "app_id_example",
|
|
962
|
+
// ExportSubscriptionsRequestBody (optional)
|
|
963
|
+
exportSubscriptionsRequestBody: {
|
|
964
|
+
extra_fields: [
|
|
965
|
+
"extra_fields_example",
|
|
966
|
+
],
|
|
967
|
+
last_active_since: "last_active_since_example",
|
|
968
|
+
segment_name: "segment_name_example",
|
|
969
|
+
},
|
|
1040
970
|
};
|
|
1041
971
|
|
|
1042
|
-
apiInstance.
|
|
972
|
+
apiInstance.exportSubscriptions(body).then((data:any) => {
|
|
1043
973
|
console.log('API called successfully. Returned data: ' + data);
|
|
1044
974
|
}).catch((error:any) => console.error(error));
|
|
1045
975
|
```
|
|
@@ -1049,21 +979,21 @@ apiInstance.exportEvents(body).then((data:any) => {
|
|
|
1049
979
|
|
|
1050
980
|
Name | Type | Description | Notes
|
|
1051
981
|
------------- | ------------- | ------------- | -------------
|
|
1052
|
-
**
|
|
1053
|
-
**appId** | [**string**] | The ID
|
|
982
|
+
**exportSubscriptionsRequestBody** | **ExportSubscriptionsRequestBody**| |
|
|
983
|
+
**appId** | [**string**] | The app ID that you want to export devices from | defaults to undefined
|
|
1054
984
|
|
|
1055
985
|
|
|
1056
986
|
### Return type
|
|
1057
987
|
|
|
1058
|
-
**
|
|
988
|
+
**ExportSubscriptionsSuccessResponse**
|
|
1059
989
|
|
|
1060
990
|
### Authorization
|
|
1061
991
|
|
|
1062
|
-
[
|
|
992
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1063
993
|
|
|
1064
994
|
### HTTP request headers
|
|
1065
995
|
|
|
1066
|
-
- **Content-Type**:
|
|
996
|
+
- **Content-Type**: application/json
|
|
1067
997
|
- **Accept**: application/json
|
|
1068
998
|
|
|
1069
999
|
|
|
@@ -1072,15 +1002,14 @@ Name | Type | Description | Notes
|
|
|
1072
1002
|
|-------------|-------------|------------------|
|
|
1073
1003
|
**200** | OK | - |
|
|
1074
1004
|
**400** | Bad Request | - |
|
|
1075
|
-
**404** | Not Found | - |
|
|
1076
1005
|
**429** | Rate Limit Exceeded | - |
|
|
1077
1006
|
|
|
1078
1007
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
1079
1008
|
|
|
1080
|
-
# **
|
|
1081
|
-
>
|
|
1009
|
+
# **getAliases**
|
|
1010
|
+
> UserIdentityBody getAliases()
|
|
1082
1011
|
|
|
1083
|
-
|
|
1012
|
+
Lists all Aliases for the User identified by (:alias_label, :alias_id).
|
|
1084
1013
|
|
|
1085
1014
|
### Example
|
|
1086
1015
|
|
|
@@ -1092,20 +1021,16 @@ import * as fs from 'fs';
|
|
|
1092
1021
|
const configuration = .createConfiguration();
|
|
1093
1022
|
const apiInstance = new .DefaultApi(configuration);
|
|
1094
1023
|
|
|
1095
|
-
let body:.
|
|
1096
|
-
// string
|
|
1024
|
+
let body:.DefaultApiGetAliasesRequest = {
|
|
1025
|
+
// string
|
|
1097
1026
|
appId: "app_id_example",
|
|
1098
|
-
//
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
],
|
|
1103
|
-
last_active_since: "last_active_since_example",
|
|
1104
|
-
segment_name: "segment_name_example",
|
|
1105
|
-
},
|
|
1027
|
+
// string
|
|
1028
|
+
aliasLabel: "alias_label_example",
|
|
1029
|
+
// string
|
|
1030
|
+
aliasId: "alias_id_example",
|
|
1106
1031
|
};
|
|
1107
1032
|
|
|
1108
|
-
apiInstance.
|
|
1033
|
+
apiInstance.getAliases(body).then((data:any) => {
|
|
1109
1034
|
console.log('API called successfully. Returned data: ' + data);
|
|
1110
1035
|
}).catch((error:any) => console.error(error));
|
|
1111
1036
|
```
|
|
@@ -1115,21 +1040,22 @@ apiInstance.exportPlayers(body).then((data:any) => {
|
|
|
1115
1040
|
|
|
1116
1041
|
Name | Type | Description | Notes
|
|
1117
1042
|
------------- | ------------- | ------------- | -------------
|
|
1118
|
-
**
|
|
1119
|
-
**
|
|
1043
|
+
**appId** | [**string**] | | defaults to undefined
|
|
1044
|
+
**aliasLabel** | [**string**] | | defaults to undefined
|
|
1045
|
+
**aliasId** | [**string**] | | defaults to undefined
|
|
1120
1046
|
|
|
1121
1047
|
|
|
1122
1048
|
### Return type
|
|
1123
1049
|
|
|
1124
|
-
**
|
|
1050
|
+
**UserIdentityBody**
|
|
1125
1051
|
|
|
1126
1052
|
### Authorization
|
|
1127
1053
|
|
|
1128
|
-
[
|
|
1054
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1129
1055
|
|
|
1130
1056
|
### HTTP request headers
|
|
1131
1057
|
|
|
1132
|
-
- **Content-Type**:
|
|
1058
|
+
- **Content-Type**: Not defined
|
|
1133
1059
|
- **Accept**: application/json
|
|
1134
1060
|
|
|
1135
1061
|
|
|
@@ -1138,12 +1064,13 @@ Name | Type | Description | Notes
|
|
|
1138
1064
|
|-------------|-------------|------------------|
|
|
1139
1065
|
**200** | OK | - |
|
|
1140
1066
|
**400** | Bad Request | - |
|
|
1067
|
+
**404** | Not Found | - |
|
|
1141
1068
|
**429** | Rate Limit Exceeded | - |
|
|
1142
1069
|
|
|
1143
1070
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
1144
1071
|
|
|
1145
|
-
# **
|
|
1146
|
-
>
|
|
1072
|
+
# **getAliasesBySubscription**
|
|
1073
|
+
> UserIdentityBody getAliasesBySubscription()
|
|
1147
1074
|
|
|
1148
1075
|
Lists all Aliases for the User identified by :subscription_id.
|
|
1149
1076
|
|
|
@@ -1157,14 +1084,14 @@ import * as fs from 'fs';
|
|
|
1157
1084
|
const configuration = .createConfiguration();
|
|
1158
1085
|
const apiInstance = new .DefaultApi(configuration);
|
|
1159
1086
|
|
|
1160
|
-
let body:.
|
|
1087
|
+
let body:.DefaultApiGetAliasesBySubscriptionRequest = {
|
|
1161
1088
|
// string
|
|
1162
1089
|
appId: "app_id_example",
|
|
1163
1090
|
// string
|
|
1164
1091
|
subscriptionId: "subscription_id_example",
|
|
1165
1092
|
};
|
|
1166
1093
|
|
|
1167
|
-
apiInstance.
|
|
1094
|
+
apiInstance.getAliasesBySubscription(body).then((data:any) => {
|
|
1168
1095
|
console.log('API called successfully. Returned data: ' + data);
|
|
1169
1096
|
}).catch((error:any) => console.error(error));
|
|
1170
1097
|
```
|
|
@@ -1180,11 +1107,11 @@ Name | Type | Description | Notes
|
|
|
1180
1107
|
|
|
1181
1108
|
### Return type
|
|
1182
1109
|
|
|
1183
|
-
**
|
|
1110
|
+
**UserIdentityBody**
|
|
1184
1111
|
|
|
1185
1112
|
### Authorization
|
|
1186
1113
|
|
|
1187
|
-
[
|
|
1114
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1188
1115
|
|
|
1189
1116
|
### HTTP request headers
|
|
1190
1117
|
|
|
@@ -1197,137 +1124,14 @@ Name | Type | Description | Notes
|
|
|
1197
1124
|
|-------------|-------------|------------------|
|
|
1198
1125
|
**200** | OK | - |
|
|
1199
1126
|
**400** | Bad Request | - |
|
|
1127
|
+
**404** | Not Found | - |
|
|
1200
1128
|
|
|
1201
1129
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
1202
1130
|
|
|
1203
|
-
# **
|
|
1204
|
-
>
|
|
1131
|
+
# **getApp**
|
|
1132
|
+
> App getApp()
|
|
1205
1133
|
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
### Example
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
```typescript
|
|
1212
|
-
import { } from '';
|
|
1213
|
-
import * as fs from 'fs';
|
|
1214
|
-
|
|
1215
|
-
const configuration = .createConfiguration();
|
|
1216
|
-
const apiInstance = new .DefaultApi(configuration);
|
|
1217
|
-
|
|
1218
|
-
let body:.DefaultApiFetchUserRequest = {
|
|
1219
|
-
// string
|
|
1220
|
-
appId: "app_id_example",
|
|
1221
|
-
// string
|
|
1222
|
-
aliasLabel: "alias_label_example",
|
|
1223
|
-
// string
|
|
1224
|
-
aliasId: "alias_id_example",
|
|
1225
|
-
};
|
|
1226
|
-
|
|
1227
|
-
apiInstance.fetchUser(body).then((data:any) => {
|
|
1228
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
1229
|
-
}).catch((error:any) => console.error(error));
|
|
1230
|
-
```
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
### Parameters
|
|
1234
|
-
|
|
1235
|
-
Name | Type | Description | Notes
|
|
1236
|
-
------------- | ------------- | ------------- | -------------
|
|
1237
|
-
**appId** | [**string**] | | defaults to undefined
|
|
1238
|
-
**aliasLabel** | [**string**] | | defaults to undefined
|
|
1239
|
-
**aliasId** | [**string**] | | defaults to undefined
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
### Return type
|
|
1243
|
-
|
|
1244
|
-
**User**
|
|
1245
|
-
|
|
1246
|
-
### Authorization
|
|
1247
|
-
|
|
1248
|
-
[app_key](README.md#app_key)
|
|
1249
|
-
|
|
1250
|
-
### HTTP request headers
|
|
1251
|
-
|
|
1252
|
-
- **Content-Type**: Not defined
|
|
1253
|
-
- **Accept**: application/json
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
### HTTP response details
|
|
1257
|
-
| Status code | Description | Response headers |
|
|
1258
|
-
|-------------|-------------|------------------|
|
|
1259
|
-
**200** | OK | - |
|
|
1260
|
-
**400** | Bad Request | - |
|
|
1261
|
-
**429** | Rate Limit Exceeded | - |
|
|
1262
|
-
|
|
1263
|
-
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
1264
|
-
|
|
1265
|
-
# **fetchUserIdentity**
|
|
1266
|
-
> InlineResponse200 fetchUserIdentity()
|
|
1267
|
-
|
|
1268
|
-
Lists all Aliases for the User identified by (:alias_label, :alias_id).
|
|
1269
|
-
|
|
1270
|
-
### Example
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
```typescript
|
|
1274
|
-
import { } from '';
|
|
1275
|
-
import * as fs from 'fs';
|
|
1276
|
-
|
|
1277
|
-
const configuration = .createConfiguration();
|
|
1278
|
-
const apiInstance = new .DefaultApi(configuration);
|
|
1279
|
-
|
|
1280
|
-
let body:.DefaultApiFetchUserIdentityRequest = {
|
|
1281
|
-
// string
|
|
1282
|
-
appId: "app_id_example",
|
|
1283
|
-
// string
|
|
1284
|
-
aliasLabel: "alias_label_example",
|
|
1285
|
-
// string
|
|
1286
|
-
aliasId: "alias_id_example",
|
|
1287
|
-
};
|
|
1288
|
-
|
|
1289
|
-
apiInstance.fetchUserIdentity(body).then((data:any) => {
|
|
1290
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
1291
|
-
}).catch((error:any) => console.error(error));
|
|
1292
|
-
```
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
### Parameters
|
|
1296
|
-
|
|
1297
|
-
Name | Type | Description | Notes
|
|
1298
|
-
------------- | ------------- | ------------- | -------------
|
|
1299
|
-
**appId** | [**string**] | | defaults to undefined
|
|
1300
|
-
**aliasLabel** | [**string**] | | defaults to undefined
|
|
1301
|
-
**aliasId** | [**string**] | | defaults to undefined
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
### Return type
|
|
1305
|
-
|
|
1306
|
-
**InlineResponse200**
|
|
1307
|
-
|
|
1308
|
-
### Authorization
|
|
1309
|
-
|
|
1310
|
-
[app_key](README.md#app_key)
|
|
1311
|
-
|
|
1312
|
-
### HTTP request headers
|
|
1313
|
-
|
|
1314
|
-
- **Content-Type**: Not defined
|
|
1315
|
-
- **Accept**: application/json
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
### HTTP response details
|
|
1319
|
-
| Status code | Description | Response headers |
|
|
1320
|
-
|-------------|-------------|------------------|
|
|
1321
|
-
**200** | OK | - |
|
|
1322
|
-
**400** | Bad Request | - |
|
|
1323
|
-
**429** | Rate Limit Exceeded | - |
|
|
1324
|
-
|
|
1325
|
-
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
1326
|
-
|
|
1327
|
-
# **getApp**
|
|
1328
|
-
> App getApp()
|
|
1329
|
-
|
|
1330
|
-
View the details of a single OneSignal app
|
|
1134
|
+
View the details of a single OneSignal app
|
|
1331
1135
|
|
|
1332
1136
|
### Example
|
|
1333
1137
|
|
|
@@ -1363,7 +1167,7 @@ Name | Type | Description | Notes
|
|
|
1363
1167
|
|
|
1364
1168
|
### Authorization
|
|
1365
1169
|
|
|
1366
|
-
[
|
|
1170
|
+
[user_auth_key](README.md#user_auth_key)
|
|
1367
1171
|
|
|
1368
1172
|
### HTTP request headers
|
|
1369
1173
|
|
|
@@ -1413,66 +1217,7 @@ This endpoint does not need any parameter.
|
|
|
1413
1217
|
|
|
1414
1218
|
### Authorization
|
|
1415
1219
|
|
|
1416
|
-
[
|
|
1417
|
-
|
|
1418
|
-
### HTTP request headers
|
|
1419
|
-
|
|
1420
|
-
- **Content-Type**: Not defined
|
|
1421
|
-
- **Accept**: application/json
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
### HTTP response details
|
|
1425
|
-
| Status code | Description | Response headers |
|
|
1426
|
-
|-------------|-------------|------------------|
|
|
1427
|
-
**200** | OK | - |
|
|
1428
|
-
**400** | Bad Request | - |
|
|
1429
|
-
**429** | Rate Limit Exceeded | - |
|
|
1430
|
-
|
|
1431
|
-
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
1432
|
-
|
|
1433
|
-
# **getEligibleIams**
|
|
1434
|
-
> InlineResponse2003 getEligibleIams()
|
|
1435
|
-
|
|
1436
|
-
Manifest of In-App Messages the Subscription is eligible to display by the SDK.
|
|
1437
|
-
|
|
1438
|
-
### Example
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
```typescript
|
|
1442
|
-
import { } from '';
|
|
1443
|
-
import * as fs from 'fs';
|
|
1444
|
-
|
|
1445
|
-
const configuration = .createConfiguration();
|
|
1446
|
-
const apiInstance = new .DefaultApi(configuration);
|
|
1447
|
-
|
|
1448
|
-
let body:.DefaultApiGetEligibleIamsRequest = {
|
|
1449
|
-
// string
|
|
1450
|
-
appId: "app_id_example",
|
|
1451
|
-
// string
|
|
1452
|
-
subscriptionId: "subscription_id_example",
|
|
1453
|
-
};
|
|
1454
|
-
|
|
1455
|
-
apiInstance.getEligibleIams(body).then((data:any) => {
|
|
1456
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
1457
|
-
}).catch((error:any) => console.error(error));
|
|
1458
|
-
```
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
### Parameters
|
|
1462
|
-
|
|
1463
|
-
Name | Type | Description | Notes
|
|
1464
|
-
------------- | ------------- | ------------- | -------------
|
|
1465
|
-
**appId** | [**string**] | | defaults to undefined
|
|
1466
|
-
**subscriptionId** | [**string**] | | defaults to undefined
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
### Return type
|
|
1470
|
-
|
|
1471
|
-
**InlineResponse2003**
|
|
1472
|
-
|
|
1473
|
-
### Authorization
|
|
1474
|
-
|
|
1475
|
-
[app_key](README.md#app_key)
|
|
1220
|
+
[user_auth_key](README.md#user_auth_key)
|
|
1476
1221
|
|
|
1477
1222
|
### HTTP request headers
|
|
1478
1223
|
|
|
@@ -1531,7 +1276,7 @@ Name | Type | Description | Notes
|
|
|
1531
1276
|
|
|
1532
1277
|
### Authorization
|
|
1533
1278
|
|
|
1534
|
-
[
|
|
1279
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1535
1280
|
|
|
1536
1281
|
### HTTP request headers
|
|
1537
1282
|
|
|
@@ -1544,12 +1289,13 @@ Name | Type | Description | Notes
|
|
|
1544
1289
|
|-------------|-------------|------------------|
|
|
1545
1290
|
**200** | OK | - |
|
|
1546
1291
|
**400** | Bad Request | - |
|
|
1292
|
+
**404** | Not Found | - |
|
|
1547
1293
|
**429** | Rate Limit Exceeded | - |
|
|
1548
1294
|
|
|
1549
1295
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
1550
1296
|
|
|
1551
1297
|
# **getNotificationHistory**
|
|
1552
|
-
> NotificationHistorySuccessResponse getNotificationHistory(
|
|
1298
|
+
> NotificationHistorySuccessResponse getNotificationHistory(getNotificationHistoryRequestBody)
|
|
1553
1299
|
|
|
1554
1300
|
-> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. 🚧 Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App\'s REST API Key, available in Keys & IDs.
|
|
1555
1301
|
|
|
@@ -1566,8 +1312,8 @@ const apiInstance = new .DefaultApi(configuration);
|
|
|
1566
1312
|
let body:.DefaultApiGetNotificationHistoryRequest = {
|
|
1567
1313
|
// string | The \"id\" of the message found in the Notification object
|
|
1568
1314
|
notificationId: "notification_id_example",
|
|
1569
|
-
//
|
|
1570
|
-
|
|
1315
|
+
// GetNotificationHistoryRequestBody
|
|
1316
|
+
getNotificationHistoryRequestBody: {
|
|
1571
1317
|
events: "sent",
|
|
1572
1318
|
email: "email_example",
|
|
1573
1319
|
app_id: "app_id_example",
|
|
@@ -1584,7 +1330,7 @@ apiInstance.getNotificationHistory(body).then((data:any) => {
|
|
|
1584
1330
|
|
|
1585
1331
|
Name | Type | Description | Notes
|
|
1586
1332
|
------------- | ------------- | ------------- | -------------
|
|
1587
|
-
**
|
|
1333
|
+
**getNotificationHistoryRequestBody** | **GetNotificationHistoryRequestBody**| |
|
|
1588
1334
|
**notificationId** | [**string**] | The \"id\" of the message found in the Notification object | defaults to undefined
|
|
1589
1335
|
|
|
1590
1336
|
|
|
@@ -1594,7 +1340,7 @@ Name | Type | Description | Notes
|
|
|
1594
1340
|
|
|
1595
1341
|
### Authorization
|
|
1596
1342
|
|
|
1597
|
-
[
|
|
1343
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1598
1344
|
|
|
1599
1345
|
### HTTP request headers
|
|
1600
1346
|
|
|
@@ -1607,6 +1353,7 @@ Name | Type | Description | Notes
|
|
|
1607
1353
|
|-------------|-------------|------------------|
|
|
1608
1354
|
**200** | OK | - |
|
|
1609
1355
|
**400** | Bad Request | - |
|
|
1356
|
+
**404** | Not Found | - |
|
|
1610
1357
|
**429** | Rate Limit Exceeded | - |
|
|
1611
1358
|
|
|
1612
1359
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
@@ -1659,7 +1406,7 @@ Name | Type | Description | Notes
|
|
|
1659
1406
|
|
|
1660
1407
|
### Authorization
|
|
1661
1408
|
|
|
1662
|
-
[
|
|
1409
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1663
1410
|
|
|
1664
1411
|
### HTTP request headers
|
|
1665
1412
|
|
|
@@ -1730,7 +1477,7 @@ Name | Type | Description | Notes
|
|
|
1730
1477
|
|
|
1731
1478
|
### Authorization
|
|
1732
1479
|
|
|
1733
|
-
[
|
|
1480
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1734
1481
|
|
|
1735
1482
|
### HTTP request headers
|
|
1736
1483
|
|
|
@@ -1747,10 +1494,10 @@ Name | Type | Description | Notes
|
|
|
1747
1494
|
|
|
1748
1495
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
1749
1496
|
|
|
1750
|
-
# **
|
|
1751
|
-
>
|
|
1497
|
+
# **getSegments**
|
|
1498
|
+
> GetSegmentsSuccessResponse getSegments()
|
|
1752
1499
|
|
|
1753
|
-
|
|
1500
|
+
Returns an array of segments from an app.
|
|
1754
1501
|
|
|
1755
1502
|
### Example
|
|
1756
1503
|
|
|
@@ -1762,78 +1509,16 @@ import * as fs from 'fs';
|
|
|
1762
1509
|
const configuration = .createConfiguration();
|
|
1763
1510
|
const apiInstance = new .DefaultApi(configuration);
|
|
1764
1511
|
|
|
1765
|
-
let body:.
|
|
1766
|
-
// string |
|
|
1767
|
-
appId: "app_id_example",
|
|
1768
|
-
// string | Player\'s OneSignal ID
|
|
1769
|
-
playerId: "player_id_example",
|
|
1770
|
-
// string | Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional)
|
|
1771
|
-
emailAuthHash: "email_auth_hash_example",
|
|
1772
|
-
};
|
|
1773
|
-
|
|
1774
|
-
apiInstance.getPlayer(body).then((data:any) => {
|
|
1775
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
1776
|
-
}).catch((error:any) => console.error(error));
|
|
1777
|
-
```
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
### Parameters
|
|
1781
|
-
|
|
1782
|
-
Name | Type | Description | Notes
|
|
1783
|
-
------------- | ------------- | ------------- | -------------
|
|
1784
|
-
**appId** | [**string**] | Your app_id for this device | defaults to undefined
|
|
1785
|
-
**playerId** | [**string**] | Player\'s OneSignal ID | defaults to undefined
|
|
1786
|
-
**emailAuthHash** | [**string**] | Email - Only required if you have enabled Identity Verification and device_type is email (11). | (optional) defaults to undefined
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
### Return type
|
|
1790
|
-
|
|
1791
|
-
**Player**
|
|
1792
|
-
|
|
1793
|
-
### Authorization
|
|
1794
|
-
|
|
1795
|
-
[app_key](README.md#app_key)
|
|
1796
|
-
|
|
1797
|
-
### HTTP request headers
|
|
1798
|
-
|
|
1799
|
-
- **Content-Type**: Not defined
|
|
1800
|
-
- **Accept**: application/json
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
### HTTP response details
|
|
1804
|
-
| Status code | Description | Response headers |
|
|
1805
|
-
|-------------|-------------|------------------|
|
|
1806
|
-
**200** | OK | - |
|
|
1807
|
-
**400** | Bad Request | - |
|
|
1808
|
-
**429** | Rate Limit Exceeded | - |
|
|
1809
|
-
|
|
1810
|
-
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
1811
|
-
|
|
1812
|
-
# **getPlayers**
|
|
1813
|
-
> PlayerSlice getPlayers()
|
|
1814
|
-
|
|
1815
|
-
View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant.
|
|
1816
|
-
|
|
1817
|
-
### Example
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
```typescript
|
|
1821
|
-
import { } from '';
|
|
1822
|
-
import * as fs from 'fs';
|
|
1823
|
-
|
|
1824
|
-
const configuration = .createConfiguration();
|
|
1825
|
-
const apiInstance = new .DefaultApi(configuration);
|
|
1826
|
-
|
|
1827
|
-
let body:.DefaultApiGetPlayersRequest = {
|
|
1828
|
-
// string | The app ID that you want to view players from
|
|
1512
|
+
let body:.DefaultApiGetSegmentsRequest = {
|
|
1513
|
+
// string | The OneSignal App ID for your app. Available in Keys & IDs.
|
|
1829
1514
|
appId: "app_id_example",
|
|
1830
|
-
// number |
|
|
1831
|
-
limit: 1,
|
|
1832
|
-
// number | Result offset. Default is 0. Results are sorted by id; (optional)
|
|
1515
|
+
// number | Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments. (optional)
|
|
1833
1516
|
offset: 1,
|
|
1517
|
+
// number | The amount of Segments in the response. Maximum 300. (optional)
|
|
1518
|
+
limit: 1,
|
|
1834
1519
|
};
|
|
1835
1520
|
|
|
1836
|
-
apiInstance.
|
|
1521
|
+
apiInstance.getSegments(body).then((data:any) => {
|
|
1837
1522
|
console.log('API called successfully. Returned data: ' + data);
|
|
1838
1523
|
}).catch((error:any) => console.error(error));
|
|
1839
1524
|
```
|
|
@@ -1843,18 +1528,18 @@ apiInstance.getPlayers(body).then((data:any) => {
|
|
|
1843
1528
|
|
|
1844
1529
|
Name | Type | Description | Notes
|
|
1845
1530
|
------------- | ------------- | ------------- | -------------
|
|
1846
|
-
**appId** | [**string**] | The
|
|
1847
|
-
**
|
|
1848
|
-
**
|
|
1531
|
+
**appId** | [**string**] | The OneSignal App ID for your app. Available in Keys & IDs. | defaults to undefined
|
|
1532
|
+
**offset** | [**number**] | Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments. | (optional) defaults to undefined
|
|
1533
|
+
**limit** | [**number**] | The amount of Segments in the response. Maximum 300. | (optional) defaults to undefined
|
|
1849
1534
|
|
|
1850
1535
|
|
|
1851
1536
|
### Return type
|
|
1852
1537
|
|
|
1853
|
-
**
|
|
1538
|
+
**GetSegmentsSuccessResponse**
|
|
1854
1539
|
|
|
1855
1540
|
### Authorization
|
|
1856
1541
|
|
|
1857
|
-
[
|
|
1542
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1858
1543
|
|
|
1859
1544
|
### HTTP request headers
|
|
1860
1545
|
|
|
@@ -1865,16 +1550,16 @@ Name | Type | Description | Notes
|
|
|
1865
1550
|
### HTTP response details
|
|
1866
1551
|
| Status code | Description | Response headers |
|
|
1867
1552
|
|-------------|-------------|------------------|
|
|
1868
|
-
**
|
|
1553
|
+
**201** | OK | - |
|
|
1869
1554
|
**400** | Bad Request | - |
|
|
1870
1555
|
**429** | Rate Limit Exceeded | - |
|
|
1871
1556
|
|
|
1872
1557
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
1873
1558
|
|
|
1874
|
-
# **
|
|
1875
|
-
>
|
|
1559
|
+
# **getUser**
|
|
1560
|
+
> User getUser()
|
|
1876
1561
|
|
|
1877
|
-
|
|
1562
|
+
Returns the User’s properties, Aliases, and Subscriptions.
|
|
1878
1563
|
|
|
1879
1564
|
### Example
|
|
1880
1565
|
|
|
@@ -1886,20 +1571,16 @@ import * as fs from 'fs';
|
|
|
1886
1571
|
const configuration = .createConfiguration();
|
|
1887
1572
|
const apiInstance = new .DefaultApi(configuration);
|
|
1888
1573
|
|
|
1889
|
-
let body:.
|
|
1574
|
+
let body:.DefaultApiGetUserRequest = {
|
|
1890
1575
|
// string
|
|
1891
1576
|
appId: "app_id_example",
|
|
1892
1577
|
// string
|
|
1893
1578
|
aliasLabel: "alias_label_example",
|
|
1894
1579
|
// string
|
|
1895
1580
|
aliasId: "alias_id_example",
|
|
1896
|
-
// UserIdentityRequestBody
|
|
1897
|
-
userIdentityRequestBody: {
|
|
1898
|
-
identity: {},
|
|
1899
|
-
},
|
|
1900
1581
|
};
|
|
1901
1582
|
|
|
1902
|
-
apiInstance.
|
|
1583
|
+
apiInstance.getUser(body).then((data:any) => {
|
|
1903
1584
|
console.log('API called successfully. Returned data: ' + data);
|
|
1904
1585
|
}).catch((error:any) => console.error(error));
|
|
1905
1586
|
```
|
|
@@ -1909,7 +1590,6 @@ apiInstance.identifyUserByAlias(body).then((data:any) => {
|
|
|
1909
1590
|
|
|
1910
1591
|
Name | Type | Description | Notes
|
|
1911
1592
|
------------- | ------------- | ------------- | -------------
|
|
1912
|
-
**userIdentityRequestBody** | **UserIdentityRequestBody**| |
|
|
1913
1593
|
**appId** | [**string**] | | defaults to undefined
|
|
1914
1594
|
**aliasLabel** | [**string**] | | defaults to undefined
|
|
1915
1595
|
**aliasId** | [**string**] | | defaults to undefined
|
|
@@ -1917,15 +1597,15 @@ Name | Type | Description | Notes
|
|
|
1917
1597
|
|
|
1918
1598
|
### Return type
|
|
1919
1599
|
|
|
1920
|
-
**
|
|
1600
|
+
**User**
|
|
1921
1601
|
|
|
1922
1602
|
### Authorization
|
|
1923
1603
|
|
|
1924
|
-
[
|
|
1604
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1925
1605
|
|
|
1926
1606
|
### HTTP request headers
|
|
1927
1607
|
|
|
1928
|
-
- **Content-Type**:
|
|
1608
|
+
- **Content-Type**: Not defined
|
|
1929
1609
|
- **Accept**: application/json
|
|
1930
1610
|
|
|
1931
1611
|
|
|
@@ -1934,15 +1614,15 @@ Name | Type | Description | Notes
|
|
|
1934
1614
|
|-------------|-------------|------------------|
|
|
1935
1615
|
**200** | OK | - |
|
|
1936
1616
|
**400** | Bad Request | - |
|
|
1937
|
-
**
|
|
1617
|
+
**404** | Not Found | - |
|
|
1938
1618
|
**429** | Rate Limit Exceeded | - |
|
|
1939
1619
|
|
|
1940
1620
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
1941
1621
|
|
|
1942
|
-
# **
|
|
1943
|
-
>
|
|
1622
|
+
# **transferSubscription**
|
|
1623
|
+
> UserIdentityBody transferSubscription(transferSubscriptionRequestBody)
|
|
1944
1624
|
|
|
1945
|
-
|
|
1625
|
+
Transfers this Subscription to the User identified by the identity in the payload.
|
|
1946
1626
|
|
|
1947
1627
|
### Example
|
|
1948
1628
|
|
|
@@ -1954,18 +1634,20 @@ import * as fs from 'fs';
|
|
|
1954
1634
|
const configuration = .createConfiguration();
|
|
1955
1635
|
const apiInstance = new .DefaultApi(configuration);
|
|
1956
1636
|
|
|
1957
|
-
let body:.
|
|
1637
|
+
let body:.DefaultApiTransferSubscriptionRequest = {
|
|
1958
1638
|
// string
|
|
1959
1639
|
appId: "app_id_example",
|
|
1960
1640
|
// string
|
|
1961
1641
|
subscriptionId: "subscription_id_example",
|
|
1962
|
-
//
|
|
1963
|
-
|
|
1964
|
-
identity: {
|
|
1642
|
+
// TransferSubscriptionRequestBody
|
|
1643
|
+
transferSubscriptionRequestBody: {
|
|
1644
|
+
identity: {
|
|
1645
|
+
"key": "key_example",
|
|
1646
|
+
},
|
|
1965
1647
|
},
|
|
1966
1648
|
};
|
|
1967
1649
|
|
|
1968
|
-
apiInstance.
|
|
1650
|
+
apiInstance.transferSubscription(body).then((data:any) => {
|
|
1969
1651
|
console.log('API called successfully. Returned data: ' + data);
|
|
1970
1652
|
}).catch((error:any) => console.error(error));
|
|
1971
1653
|
```
|
|
@@ -1975,18 +1657,18 @@ apiInstance.identifyUserBySubscriptionId(body).then((data:any) => {
|
|
|
1975
1657
|
|
|
1976
1658
|
Name | Type | Description | Notes
|
|
1977
1659
|
------------- | ------------- | ------------- | -------------
|
|
1978
|
-
**
|
|
1660
|
+
**transferSubscriptionRequestBody** | **TransferSubscriptionRequestBody**| |
|
|
1979
1661
|
**appId** | [**string**] | | defaults to undefined
|
|
1980
1662
|
**subscriptionId** | [**string**] | | defaults to undefined
|
|
1981
1663
|
|
|
1982
1664
|
|
|
1983
1665
|
### Return type
|
|
1984
1666
|
|
|
1985
|
-
**
|
|
1667
|
+
**UserIdentityBody**
|
|
1986
1668
|
|
|
1987
1669
|
### Authorization
|
|
1988
1670
|
|
|
1989
|
-
[
|
|
1671
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1990
1672
|
|
|
1991
1673
|
### HTTP request headers
|
|
1992
1674
|
|
|
@@ -1999,15 +1681,16 @@ Name | Type | Description | Notes
|
|
|
1999
1681
|
|-------------|-------------|------------------|
|
|
2000
1682
|
**200** | OK | - |
|
|
2001
1683
|
**400** | Bad Request | - |
|
|
1684
|
+
**404** | Not Found | - |
|
|
2002
1685
|
**409** | Conflict | - |
|
|
2003
1686
|
**429** | Rate Limit Exceeded | - |
|
|
2004
1687
|
|
|
2005
1688
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
2006
1689
|
|
|
2007
|
-
# **
|
|
2008
|
-
>
|
|
1690
|
+
# **unsubscribeEmailWithToken**
|
|
1691
|
+
> GenericSuccessBoolResponse unsubscribeEmailWithToken()
|
|
2009
1692
|
|
|
2010
|
-
|
|
1693
|
+
Unsubscribe an email with a token when using your own custom email unsubscribe landing page
|
|
2011
1694
|
|
|
2012
1695
|
### Example
|
|
2013
1696
|
|
|
@@ -2019,18 +1702,16 @@ import * as fs from 'fs';
|
|
|
2019
1702
|
const configuration = .createConfiguration();
|
|
2020
1703
|
const apiInstance = new .DefaultApi(configuration);
|
|
2021
1704
|
|
|
2022
|
-
let body:.
|
|
2023
|
-
// string
|
|
1705
|
+
let body:.DefaultApiUnsubscribeEmailWithTokenRequest = {
|
|
1706
|
+
// string | The OneSignal App ID for your app. Available in Keys & IDs.
|
|
2024
1707
|
appId: "app_id_example",
|
|
2025
|
-
// string
|
|
2026
|
-
|
|
2027
|
-
//
|
|
2028
|
-
|
|
2029
|
-
identity: {},
|
|
2030
|
-
},
|
|
1708
|
+
// string | The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report.
|
|
1709
|
+
notificationId: "notification_id_example",
|
|
1710
|
+
// string | The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email.
|
|
1711
|
+
token: "token_example",
|
|
2031
1712
|
};
|
|
2032
1713
|
|
|
2033
|
-
apiInstance.
|
|
1714
|
+
apiInstance.unsubscribeEmailWithToken(body).then((data:any) => {
|
|
2034
1715
|
console.log('API called successfully. Returned data: ' + data);
|
|
2035
1716
|
}).catch((error:any) => console.error(error));
|
|
2036
1717
|
```
|
|
@@ -2040,31 +1721,30 @@ apiInstance.transferSubscription(body).then((data:any) => {
|
|
|
2040
1721
|
|
|
2041
1722
|
Name | Type | Description | Notes
|
|
2042
1723
|
------------- | ------------- | ------------- | -------------
|
|
2043
|
-
**
|
|
2044
|
-
**
|
|
2045
|
-
**
|
|
1724
|
+
**appId** | [**string**] | The OneSignal App ID for your app. Available in Keys & IDs. | defaults to undefined
|
|
1725
|
+
**notificationId** | [**string**] | The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report. | defaults to undefined
|
|
1726
|
+
**token** | [**string**] | The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email. | defaults to undefined
|
|
2046
1727
|
|
|
2047
1728
|
|
|
2048
1729
|
### Return type
|
|
2049
1730
|
|
|
2050
|
-
**
|
|
1731
|
+
**GenericSuccessBoolResponse**
|
|
2051
1732
|
|
|
2052
1733
|
### Authorization
|
|
2053
1734
|
|
|
2054
|
-
[
|
|
1735
|
+
[rest_api_key](README.md#rest_api_key)
|
|
2055
1736
|
|
|
2056
1737
|
### HTTP request headers
|
|
2057
1738
|
|
|
2058
|
-
- **Content-Type**:
|
|
1739
|
+
- **Content-Type**: Not defined
|
|
2059
1740
|
- **Accept**: application/json
|
|
2060
1741
|
|
|
2061
1742
|
|
|
2062
1743
|
### HTTP response details
|
|
2063
1744
|
| Status code | Description | Response headers |
|
|
2064
1745
|
|-------------|-------------|------------------|
|
|
2065
|
-
**
|
|
1746
|
+
**202** | OK | - |
|
|
2066
1747
|
**400** | Bad Request | - |
|
|
2067
|
-
**409** | Conflict | - |
|
|
2068
1748
|
**429** | Rate Limit Exceeded | - |
|
|
2069
1749
|
|
|
2070
1750
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
@@ -2133,7 +1813,7 @@ Name | Type | Description | Notes
|
|
|
2133
1813
|
|
|
2134
1814
|
### Authorization
|
|
2135
1815
|
|
|
2136
|
-
[
|
|
1816
|
+
[user_auth_key](README.md#user_auth_key)
|
|
2137
1817
|
|
|
2138
1818
|
### HTTP request headers
|
|
2139
1819
|
|
|
@@ -2172,10 +1852,103 @@ let body:.DefaultApiUpdateLiveActivityRequest = {
|
|
|
2172
1852
|
activityId: "activity_id_example",
|
|
2173
1853
|
// UpdateLiveActivityRequest
|
|
2174
1854
|
updateLiveActivityRequest: {
|
|
2175
|
-
name: "
|
|
1855
|
+
name: "name_example",
|
|
2176
1856
|
event: "update",
|
|
2177
1857
|
event_updates: {},
|
|
2178
|
-
|
|
1858
|
+
contents: {
|
|
1859
|
+
en: "en_example",
|
|
1860
|
+
ar: "ar_example",
|
|
1861
|
+
bs: "bs_example",
|
|
1862
|
+
bg: "bg_example",
|
|
1863
|
+
ca: "ca_example",
|
|
1864
|
+
zh_hans: "zh_hans_example",
|
|
1865
|
+
zh_hant: "zh_hant_example",
|
|
1866
|
+
zh: "zh_example",
|
|
1867
|
+
hr: "hr_example",
|
|
1868
|
+
cs: "cs_example",
|
|
1869
|
+
da: "da_example",
|
|
1870
|
+
nl: "nl_example",
|
|
1871
|
+
et: "et_example",
|
|
1872
|
+
fi: "fi_example",
|
|
1873
|
+
fr: "fr_example",
|
|
1874
|
+
ka: "ka_example",
|
|
1875
|
+
de: "de_example",
|
|
1876
|
+
el: "el_example",
|
|
1877
|
+
hi: "hi_example",
|
|
1878
|
+
he: "he_example",
|
|
1879
|
+
hu: "hu_example",
|
|
1880
|
+
id: "id_example",
|
|
1881
|
+
it: "it_example",
|
|
1882
|
+
ja: "ja_example",
|
|
1883
|
+
ko: "ko_example",
|
|
1884
|
+
lv: "lv_example",
|
|
1885
|
+
lt: "lt_example",
|
|
1886
|
+
ms: "ms_example",
|
|
1887
|
+
nb: "nb_example",
|
|
1888
|
+
pl: "pl_example",
|
|
1889
|
+
fa: "fa_example",
|
|
1890
|
+
pt: "pt_example",
|
|
1891
|
+
pa: "pa_example",
|
|
1892
|
+
ro: "ro_example",
|
|
1893
|
+
ru: "ru_example",
|
|
1894
|
+
sr: "sr_example",
|
|
1895
|
+
sk: "sk_example",
|
|
1896
|
+
es: "es_example",
|
|
1897
|
+
sv: "sv_example",
|
|
1898
|
+
th: "th_example",
|
|
1899
|
+
tr: "tr_example",
|
|
1900
|
+
uk: "uk_example",
|
|
1901
|
+
vi: "vi_example",
|
|
1902
|
+
},
|
|
1903
|
+
headings: {
|
|
1904
|
+
en: "en_example",
|
|
1905
|
+
ar: "ar_example",
|
|
1906
|
+
bs: "bs_example",
|
|
1907
|
+
bg: "bg_example",
|
|
1908
|
+
ca: "ca_example",
|
|
1909
|
+
zh_hans: "zh_hans_example",
|
|
1910
|
+
zh_hant: "zh_hant_example",
|
|
1911
|
+
zh: "zh_example",
|
|
1912
|
+
hr: "hr_example",
|
|
1913
|
+
cs: "cs_example",
|
|
1914
|
+
da: "da_example",
|
|
1915
|
+
nl: "nl_example",
|
|
1916
|
+
et: "et_example",
|
|
1917
|
+
fi: "fi_example",
|
|
1918
|
+
fr: "fr_example",
|
|
1919
|
+
ka: "ka_example",
|
|
1920
|
+
de: "de_example",
|
|
1921
|
+
el: "el_example",
|
|
1922
|
+
hi: "hi_example",
|
|
1923
|
+
he: "he_example",
|
|
1924
|
+
hu: "hu_example",
|
|
1925
|
+
id: "id_example",
|
|
1926
|
+
it: "it_example",
|
|
1927
|
+
ja: "ja_example",
|
|
1928
|
+
ko: "ko_example",
|
|
1929
|
+
lv: "lv_example",
|
|
1930
|
+
lt: "lt_example",
|
|
1931
|
+
ms: "ms_example",
|
|
1932
|
+
nb: "nb_example",
|
|
1933
|
+
pl: "pl_example",
|
|
1934
|
+
fa: "fa_example",
|
|
1935
|
+
pt: "pt_example",
|
|
1936
|
+
pa: "pa_example",
|
|
1937
|
+
ro: "ro_example",
|
|
1938
|
+
ru: "ru_example",
|
|
1939
|
+
sr: "sr_example",
|
|
1940
|
+
sk: "sk_example",
|
|
1941
|
+
es: "es_example",
|
|
1942
|
+
sv: "sv_example",
|
|
1943
|
+
th: "th_example",
|
|
1944
|
+
tr: "tr_example",
|
|
1945
|
+
uk: "uk_example",
|
|
1946
|
+
vi: "vi_example",
|
|
1947
|
+
},
|
|
1948
|
+
sound: "sound_example",
|
|
1949
|
+
stale_date: 1,
|
|
1950
|
+
dismissal_date: 1,
|
|
1951
|
+
priority: 1,
|
|
2179
1952
|
},
|
|
2180
1953
|
};
|
|
2181
1954
|
|
|
@@ -2200,92 +1973,7 @@ Name | Type | Description | Notes
|
|
|
2200
1973
|
|
|
2201
1974
|
### Authorization
|
|
2202
1975
|
|
|
2203
|
-
[
|
|
2204
|
-
|
|
2205
|
-
### HTTP request headers
|
|
2206
|
-
|
|
2207
|
-
- **Content-Type**: application/json
|
|
2208
|
-
- **Accept**: application/json
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
### HTTP response details
|
|
2212
|
-
| Status code | Description | Response headers |
|
|
2213
|
-
|-------------|-------------|------------------|
|
|
2214
|
-
**200** | OK | - |
|
|
2215
|
-
**400** | Bad Request | - |
|
|
2216
|
-
**429** | Rate Limit Exceeded | - |
|
|
2217
|
-
|
|
2218
|
-
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
2219
|
-
|
|
2220
|
-
# **updatePlayer**
|
|
2221
|
-
> UpdatePlayerSuccessResponse updatePlayer(player)
|
|
2222
|
-
|
|
2223
|
-
Update an existing device in one of your OneSignal apps
|
|
2224
|
-
|
|
2225
|
-
### Example
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
```typescript
|
|
2229
|
-
import { } from '';
|
|
2230
|
-
import * as fs from 'fs';
|
|
2231
|
-
|
|
2232
|
-
const configuration = .createConfiguration();
|
|
2233
|
-
const apiInstance = new .DefaultApi(configuration);
|
|
2234
|
-
|
|
2235
|
-
let body:.DefaultApiUpdatePlayerRequest = {
|
|
2236
|
-
// string | Player\'s OneSignal ID
|
|
2237
|
-
playerId: "player_id_example",
|
|
2238
|
-
// Player
|
|
2239
|
-
player: {
|
|
2240
|
-
app_id: "app_id_example",
|
|
2241
|
-
device_type: 1,
|
|
2242
|
-
external_user_id: "external_user_id_example",
|
|
2243
|
-
external_user_id_auth_hash: "external_user_id_auth_hash_example",
|
|
2244
|
-
email_auth_hash: "email_auth_hash_example",
|
|
2245
|
-
identifier: "identifier_example",
|
|
2246
|
-
language: "language_example",
|
|
2247
|
-
timezone: 1,
|
|
2248
|
-
game_version: "game_version_example",
|
|
2249
|
-
device_model: "device_model_example",
|
|
2250
|
-
device_os: "device_os_example",
|
|
2251
|
-
ad_id: "ad_id_example",
|
|
2252
|
-
sdk: "sdk_example",
|
|
2253
|
-
session_count: 1,
|
|
2254
|
-
tags: {},
|
|
2255
|
-
amount_spent: 3.14,
|
|
2256
|
-
created_at: 1,
|
|
2257
|
-
playtime: 1,
|
|
2258
|
-
badge_count: 1,
|
|
2259
|
-
last_active: 1,
|
|
2260
|
-
notification_types: 1,
|
|
2261
|
-
test_type: 1,
|
|
2262
|
-
long: 3.14,
|
|
2263
|
-
lat: 3.14,
|
|
2264
|
-
country: "country_example",
|
|
2265
|
-
},
|
|
2266
|
-
};
|
|
2267
|
-
|
|
2268
|
-
apiInstance.updatePlayer(body).then((data:any) => {
|
|
2269
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
2270
|
-
}).catch((error:any) => console.error(error));
|
|
2271
|
-
```
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
### Parameters
|
|
2275
|
-
|
|
2276
|
-
Name | Type | Description | Notes
|
|
2277
|
-
------------- | ------------- | ------------- | -------------
|
|
2278
|
-
**player** | **Player**| |
|
|
2279
|
-
**playerId** | [**string**] | Player\'s OneSignal ID | defaults to undefined
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
### Return type
|
|
2283
|
-
|
|
2284
|
-
**UpdatePlayerSuccessResponse**
|
|
2285
|
-
|
|
2286
|
-
### Authorization
|
|
2287
|
-
|
|
2288
|
-
[app_key](README.md#app_key)
|
|
1976
|
+
[rest_api_key](README.md#rest_api_key)
|
|
2289
1977
|
|
|
2290
1978
|
### HTTP request headers
|
|
2291
1979
|
|
|
@@ -2298,78 +1986,12 @@ Name | Type | Description | Notes
|
|
|
2298
1986
|
|-------------|-------------|------------------|
|
|
2299
1987
|
**200** | OK | - |
|
|
2300
1988
|
**400** | Bad Request | - |
|
|
2301
|
-
**409** | Conflict | - |
|
|
2302
|
-
**429** | Rate Limit Exceeded | - |
|
|
2303
|
-
|
|
2304
|
-
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
2305
|
-
|
|
2306
|
-
# **updatePlayerTags**
|
|
2307
|
-
> UpdatePlayerTagsSuccessResponse updatePlayerTags()
|
|
2308
|
-
|
|
2309
|
-
Update an existing device\'s tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device\'s tags. This is only applicable on the Android Mobile App SDKs. 📘 Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" }
|
|
2310
|
-
|
|
2311
|
-
### Example
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
```typescript
|
|
2315
|
-
import { } from '';
|
|
2316
|
-
import * as fs from 'fs';
|
|
2317
|
-
|
|
2318
|
-
const configuration = .createConfiguration();
|
|
2319
|
-
const apiInstance = new .DefaultApi(configuration);
|
|
2320
|
-
|
|
2321
|
-
let body:.DefaultApiUpdatePlayerTagsRequest = {
|
|
2322
|
-
// string | The OneSignal App ID the user record is found under.
|
|
2323
|
-
appId: "app_id_example",
|
|
2324
|
-
// string | The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated.
|
|
2325
|
-
externalUserId: "external_user_id_example",
|
|
2326
|
-
// UpdatePlayerTagsRequestBody (optional)
|
|
2327
|
-
updatePlayerTagsRequestBody: {
|
|
2328
|
-
tags: {},
|
|
2329
|
-
},
|
|
2330
|
-
};
|
|
2331
|
-
|
|
2332
|
-
apiInstance.updatePlayerTags(body).then((data:any) => {
|
|
2333
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
2334
|
-
}).catch((error:any) => console.error(error));
|
|
2335
|
-
```
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
### Parameters
|
|
2339
|
-
|
|
2340
|
-
Name | Type | Description | Notes
|
|
2341
|
-
------------- | ------------- | ------------- | -------------
|
|
2342
|
-
**updatePlayerTagsRequestBody** | **UpdatePlayerTagsRequestBody**| |
|
|
2343
|
-
**appId** | [**string**] | The OneSignal App ID the user record is found under. | defaults to undefined
|
|
2344
|
-
**externalUserId** | [**string**] | The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. | defaults to undefined
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
### Return type
|
|
2348
|
-
|
|
2349
|
-
**UpdatePlayerTagsSuccessResponse**
|
|
2350
|
-
|
|
2351
|
-
### Authorization
|
|
2352
|
-
|
|
2353
|
-
[app_key](README.md#app_key)
|
|
2354
|
-
|
|
2355
|
-
### HTTP request headers
|
|
2356
|
-
|
|
2357
|
-
- **Content-Type**: application/json
|
|
2358
|
-
- **Accept**: application/json
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
### HTTP response details
|
|
2362
|
-
| Status code | Description | Response headers |
|
|
2363
|
-
|-------------|-------------|------------------|
|
|
2364
|
-
**200** | OK | - |
|
|
2365
|
-
**400** | Bad Request | - |
|
|
2366
|
-
**409** | Conflict | - |
|
|
2367
1989
|
**429** | Rate Limit Exceeded | - |
|
|
2368
1990
|
|
|
2369
1991
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
2370
1992
|
|
|
2371
1993
|
# **updateSubscription**
|
|
2372
|
-
> void updateSubscription(
|
|
1994
|
+
> void updateSubscription(subscriptionBody)
|
|
2373
1995
|
|
|
2374
1996
|
Updates an existing Subscription’s properties.
|
|
2375
1997
|
|
|
@@ -2388,23 +2010,23 @@ let body:.DefaultApiUpdateSubscriptionRequest = {
|
|
|
2388
2010
|
appId: "app_id_example",
|
|
2389
2011
|
// string
|
|
2390
2012
|
subscriptionId: "subscription_id_example",
|
|
2391
|
-
//
|
|
2392
|
-
|
|
2013
|
+
// SubscriptionBody
|
|
2014
|
+
subscriptionBody: {
|
|
2393
2015
|
subscription: {
|
|
2394
2016
|
id: "id_example",
|
|
2395
2017
|
type: "iOSPush",
|
|
2396
2018
|
token: "token_example",
|
|
2397
2019
|
enabled: true,
|
|
2398
|
-
notification_types:
|
|
2399
|
-
session_time:
|
|
2400
|
-
session_count:
|
|
2020
|
+
notification_types: 1,
|
|
2021
|
+
session_time: 1,
|
|
2022
|
+
session_count: 1,
|
|
2401
2023
|
sdk: "sdk_example",
|
|
2402
2024
|
device_model: "device_model_example",
|
|
2403
2025
|
device_os: "device_os_example",
|
|
2404
2026
|
rooted: true,
|
|
2405
|
-
test_type:
|
|
2027
|
+
test_type: 1,
|
|
2406
2028
|
app_version: "app_version_example",
|
|
2407
|
-
net_type:
|
|
2029
|
+
net_type: 1,
|
|
2408
2030
|
carrier: "carrier_example",
|
|
2409
2031
|
web_auth: "web_auth_example",
|
|
2410
2032
|
web_p256: "web_p256_example",
|
|
@@ -2422,7 +2044,7 @@ apiInstance.updateSubscription(body).then((data:any) => {
|
|
|
2422
2044
|
|
|
2423
2045
|
Name | Type | Description | Notes
|
|
2424
2046
|
------------- | ------------- | ------------- | -------------
|
|
2425
|
-
**
|
|
2047
|
+
**subscriptionBody** | **SubscriptionBody**| |
|
|
2426
2048
|
**appId** | [**string**] | | defaults to undefined
|
|
2427
2049
|
**subscriptionId** | [**string**] | | defaults to undefined
|
|
2428
2050
|
|
|
@@ -2433,7 +2055,7 @@ Name | Type | Description | Notes
|
|
|
2433
2055
|
|
|
2434
2056
|
### Authorization
|
|
2435
2057
|
|
|
2436
|
-
[
|
|
2058
|
+
[rest_api_key](README.md#rest_api_key)
|
|
2437
2059
|
|
|
2438
2060
|
### HTTP request headers
|
|
2439
2061
|
|
|
@@ -2444,15 +2066,16 @@ Name | Type | Description | Notes
|
|
|
2444
2066
|
### HTTP response details
|
|
2445
2067
|
| Status code | Description | Response headers |
|
|
2446
2068
|
|-------------|-------------|------------------|
|
|
2447
|
-
**
|
|
2069
|
+
**200** | OK | - |
|
|
2448
2070
|
**400** | Bad Request | - |
|
|
2071
|
+
**404** | Not Found | - |
|
|
2449
2072
|
**409** | Conflict | - |
|
|
2450
2073
|
**429** | Rate Limit Exceeded | - |
|
|
2451
2074
|
|
|
2452
2075
|
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
|
|
2453
2076
|
|
|
2454
2077
|
# **updateUser**
|
|
2455
|
-
>
|
|
2078
|
+
> PropertiesBody updateUser(updateUserRequest)
|
|
2456
2079
|
|
|
2457
2080
|
Updates an existing User’s properties.
|
|
2458
2081
|
|
|
@@ -2482,29 +2105,29 @@ let body:.DefaultApiUpdateUserRequest = {
|
|
|
2482
2105
|
lat: 3.14,
|
|
2483
2106
|
long: 3.14,
|
|
2484
2107
|
country: "country_example",
|
|
2485
|
-
first_active:
|
|
2486
|
-
last_active:
|
|
2108
|
+
first_active: 1,
|
|
2109
|
+
last_active: 1,
|
|
2487
2110
|
amount_spent: 3.14,
|
|
2488
2111
|
purchases: [
|
|
2489
2112
|
{
|
|
2490
2113
|
sku: "sku_example",
|
|
2491
2114
|
amount: "amount_example",
|
|
2492
2115
|
iso: "iso_example",
|
|
2493
|
-
count:
|
|
2116
|
+
count: 1,
|
|
2494
2117
|
},
|
|
2495
2118
|
],
|
|
2496
2119
|
ip: "ip_example",
|
|
2497
2120
|
},
|
|
2498
2121
|
refresh_device_metadata: false,
|
|
2499
2122
|
deltas: {
|
|
2500
|
-
session_time:
|
|
2501
|
-
session_count:
|
|
2123
|
+
session_time: 1,
|
|
2124
|
+
session_count: 1,
|
|
2502
2125
|
purchases: [
|
|
2503
2126
|
{
|
|
2504
2127
|
sku: "sku_example",
|
|
2505
2128
|
amount: "amount_example",
|
|
2506
2129
|
iso: "iso_example",
|
|
2507
|
-
count:
|
|
2130
|
+
count: 1,
|
|
2508
2131
|
},
|
|
2509
2132
|
],
|
|
2510
2133
|
},
|
|
@@ -2529,11 +2152,11 @@ Name | Type | Description | Notes
|
|
|
2529
2152
|
|
|
2530
2153
|
### Return type
|
|
2531
2154
|
|
|
2532
|
-
**
|
|
2155
|
+
**PropertiesBody**
|
|
2533
2156
|
|
|
2534
2157
|
### Authorization
|
|
2535
2158
|
|
|
2536
|
-
[
|
|
2159
|
+
[rest_api_key](README.md#rest_api_key)
|
|
2537
2160
|
|
|
2538
2161
|
### HTTP request headers
|
|
2539
2162
|
|