@onesignal/node-onesignal 2.0.1-beta1 → 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 +452 -707
- package/apis/DefaultApi.ts +998 -1004
- package/auth/auth.ts +14 -14
- package/configuration.ts +6 -6
- package/dist/apis/DefaultApi.d.ts +39 -63
- package/dist/apis/DefaultApi.js +1149 -1022
- 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/{ExportPlayersSuccessResponse.d.ts → ExportEventsSuccessResponse.d.ts} +1 -1
- package/dist/models/ExportEventsSuccessResponse.js +22 -0
- package/dist/models/ExportEventsSuccessResponse.js.map +1 -0
- 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/{DeletePlayerNotFoundResponse.d.ts → ExportSubscriptionsSuccessResponse.d.ts} +2 -2
- 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/{CancelNotificationSuccessResponse.d.ts → GenericError.d.ts} +3 -1
- package/dist/models/GenericError.js +34 -0
- package/dist/models/GenericError.js.map +1 -0
- package/dist/models/{IdentifyUserConflictResponseErrorsInner.d.ts → GenericErrorErrorsInner.d.ts} +1 -1
- package/dist/models/GenericErrorErrorsInner.js +28 -0
- package/dist/models/GenericErrorErrorsInner.js.map +1 -0
- 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 +17 -33
- package/dist/models/ObjectSerializer.js +56 -105
- 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/{BadRequestError.d.ts → RateLimitError.d.ts} +2 -1
- package/dist/models/RateLimitError.js +28 -0
- package/dist/models/RateLimitError.js.map +1 -0
- package/dist/models/RateLimiterError.d.ts +18 -0
- package/dist/models/RateLimiterError.js +22 -0
- package/dist/models/RateLimiterError.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/{CreatePlayerSuccessResponse.d.ts → SegmentData.d.ts} +7 -2
- 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/{BeginLiveActivityRequest.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/{CreateNotificationBadRequestResponse.d.ts → WebButton.d.ts} +5 -2
- package/dist/models/WebButton.js +40 -0
- package/dist/models/WebButton.js.map +1 -0
- package/dist/models/all.d.ts +17 -33
- package/dist/models/all.js +17 -33
- 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 +56 -100
- package/dist/types/ObjectParamAPI.js +28 -46
- package/dist/types/ObjectParamAPI.js.map +1 -1
- package/dist/types/ObservableAPI.d.ts +27 -45
- package/dist/types/ObservableAPI.js +82 -226
- package/dist/types/ObservableAPI.js.map +1 -1
- package/dist/types/PromiseAPI.d.ts +27 -45
- package/dist/types/PromiseAPI.js +34 -58
- 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/{ExportPlayersSuccessResponse.ts → ExportEventsSuccessResponse.ts} +3 -3
- package/models/{ExportPlayersRequestBody.ts → ExportSubscriptionsRequestBody.ts} +3 -3
- package/models/{CancelNotificationSuccessResponse.ts → ExportSubscriptionsSuccessResponse.ts} +7 -7
- package/models/Filter.ts +45 -5
- package/models/FilterExpression.ts +120 -0
- package/models/{CreateSegmentBadRequestResponse.ts → GenericError.ts} +14 -7
- package/models/{IdentifyUserConflictResponseErrorsInner.ts → GenericErrorErrorsInner.ts} +3 -3
- package/models/{DeletePlayerNotFoundResponse.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 +63 -112
- 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/{NotificationHistoryBadRequestResponse.ts → RateLimitError.ts} +10 -10
- package/models/{BadRequestError.ts → RateLimiterError.ts} +6 -5
- 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/{CreatePlayerSuccessResponse.ts → WebButton.ts} +24 -10
- package/models/all.ts +17 -33
- package/package.json +2 -2
- package/servers.ts +1 -1
- package/types/ObjectParamAPI.ts +174 -345
- package/types/ObservableAPI.ts +117 -284
- package/types/PromiseAPI.ts +97 -180
- package/dist/models/BadRequestError.js +0 -22
- package/dist/models/BadRequestError.js.map +0 -1
- package/dist/models/BeginLiveActivityRequest.js +0 -28
- package/dist/models/BeginLiveActivityRequest.js.map +0 -1
- package/dist/models/CancelNotificationSuccessResponse.js +0 -22
- package/dist/models/CancelNotificationSuccessResponse.js.map +0 -1
- package/dist/models/CreateNotificationBadRequestResponse.js +0 -22
- package/dist/models/CreateNotificationBadRequestResponse.js.map +0 -1
- package/dist/models/CreatePlayerSuccessResponse.js +0 -28
- package/dist/models/CreatePlayerSuccessResponse.js.map +0 -1
- package/dist/models/CreateSegmentBadRequestResponse.d.ts +0 -18
- package/dist/models/CreateSegmentBadRequestResponse.js +0 -28
- package/dist/models/CreateSegmentBadRequestResponse.js.map +0 -1
- package/dist/models/CreateSubscriptionRequestBody.d.ts +0 -19
- package/dist/models/CreateSubscriptionRequestBody.js +0 -28
- package/dist/models/CreateSubscriptionRequestBody.js.map +0 -1
- package/dist/models/DeletePlayerBadRequestResponse.d.ts +0 -17
- package/dist/models/DeletePlayerBadRequestResponse.js +0 -22
- package/dist/models/DeletePlayerBadRequestResponse.js.map +0 -1
- 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/DeleteSegmentBadRequestResponse.d.ts +0 -17
- package/dist/models/DeleteSegmentBadRequestResponse.js +0 -22
- package/dist/models/DeleteSegmentBadRequestResponse.js.map +0 -1
- package/dist/models/DeleteSegmentNotFoundResponse.d.ts +0 -17
- 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/FilterNotificationTarget.d.ts +0 -28
- package/dist/models/FilterNotificationTarget.js +0 -88
- package/dist/models/FilterNotificationTarget.js.map +0 -1
- package/dist/models/GetNotificationRequestBody.js +0 -34
- package/dist/models/GetNotificationRequestBody.js.map +0 -1
- package/dist/models/IdentifyUserConflictResponse.d.ts +0 -18
- package/dist/models/IdentifyUserConflictResponse.js +0 -22
- package/dist/models/IdentifyUserConflictResponse.js.map +0 -1
- package/dist/models/IdentifyUserConflictResponseErrorsInner.js +0 -28
- package/dist/models/IdentifyUserConflictResponseErrorsInner.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/NotificationHistoryBadRequestResponse.d.ts +0 -18
- package/dist/models/NotificationHistoryBadRequestResponse.js +0 -28
- package/dist/models/NotificationHistoryBadRequestResponse.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/BeginLiveActivityRequest.ts +0 -38
- package/models/CreateNotificationBadRequestResponse.ts +0 -31
- package/models/CreateSubscriptionRequestBody.ts +0 -39
- package/models/DeletePlayerBadRequestResponse.ts +0 -31
- package/models/DeletePlayerSuccessResponse.ts +0 -31
- package/models/DeleteSegmentBadRequestResponse.ts +0 -31
- package/models/DeleteSegmentNotFoundResponse.ts +0 -31
- package/models/DeleteSegmentSuccessResponse.ts +0 -31
- package/models/FilterExpressions.ts +0 -80
- package/models/FilterNotificationTarget.ts +0 -144
- package/models/IdentifyUserConflictResponse.ts +0 -32
- 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,51 +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
|
-
[**
|
|
21
|
-
[**
|
|
22
|
-
[**
|
|
23
|
-
[**
|
|
24
|
-
[**fetchUserIdentity**](DefaultApi.md#fetchUserIdentity) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
|
|
19
|
+
[**exportEvents**](DefaultApi.md#exportEvents) | **POST** /notifications/{notification_id}/export_events?app_id={app_id} | Export CSV of Events
|
|
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 |
|
|
25
23
|
[**getApp**](DefaultApi.md#getApp) | **GET** /apps/{app_id} | View an app
|
|
26
24
|
[**getApps**](DefaultApi.md#getApps) | **GET** /apps | View apps
|
|
27
|
-
[**getEligibleIams**](DefaultApi.md#getEligibleIams) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/iams |
|
|
28
25
|
[**getNotification**](DefaultApi.md#getNotification) | **GET** /notifications/{notification_id} | View notification
|
|
29
26
|
[**getNotificationHistory**](DefaultApi.md#getNotificationHistory) | **POST** /notifications/{notification_id}/history | Notification History
|
|
30
27
|
[**getNotifications**](DefaultApi.md#getNotifications) | **GET** /notifications | View notifications
|
|
31
28
|
[**getOutcomes**](DefaultApi.md#getOutcomes) | **GET** /apps/{app_id}/outcomes | View Outcomes
|
|
32
|
-
[**
|
|
33
|
-
[**
|
|
34
|
-
[**identifyUserByAlias**](DefaultApi.md#identifyUserByAlias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
|
|
35
|
-
[**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} |
|
|
36
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
|
|
37
33
|
[**updateApp**](DefaultApi.md#updateApp) | **PUT** /apps/{app_id} | Update an app
|
|
38
34
|
[**updateLiveActivity**](DefaultApi.md#updateLiveActivity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push
|
|
39
|
-
[**updatePlayer**](DefaultApi.md#updatePlayer) | **PUT** /players/{player_id} | Edit device
|
|
40
|
-
[**updatePlayerTags**](DefaultApi.md#updatePlayerTags) | **PUT** /apps/{app_id}/users/{external_user_id} | Edit tags with external user id
|
|
41
35
|
[**updateSubscription**](DefaultApi.md#updateSubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} |
|
|
42
36
|
[**updateUser**](DefaultApi.md#updateUser) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
|
|
43
37
|
|
|
44
38
|
|
|
45
|
-
# **
|
|
46
|
-
>
|
|
39
|
+
# **cancelNotification**
|
|
40
|
+
> GenericSuccessBoolResponse cancelNotification()
|
|
47
41
|
|
|
48
|
-
|
|
42
|
+
Used to stop a scheduled or currently outgoing notification
|
|
49
43
|
|
|
50
44
|
### Example
|
|
51
45
|
|
|
@@ -57,19 +51,14 @@ import * as fs from 'fs';
|
|
|
57
51
|
const configuration = .createConfiguration();
|
|
58
52
|
const apiInstance = new .DefaultApi(configuration);
|
|
59
53
|
|
|
60
|
-
let body:.
|
|
61
|
-
// string
|
|
54
|
+
let body:.DefaultApiCancelNotificationRequest = {
|
|
55
|
+
// string
|
|
62
56
|
appId: "app_id_example",
|
|
63
|
-
// string
|
|
64
|
-
|
|
65
|
-
// BeginLiveActivityRequest
|
|
66
|
-
beginLiveActivityRequest: {
|
|
67
|
-
push_token: "push_token_example",
|
|
68
|
-
subscription_id: "subscription_id_example",
|
|
69
|
-
},
|
|
57
|
+
// string
|
|
58
|
+
notificationId: "notification_id_example",
|
|
70
59
|
};
|
|
71
60
|
|
|
72
|
-
apiInstance.
|
|
61
|
+
apiInstance.cancelNotification(body).then((data:any) => {
|
|
73
62
|
console.log('API called successfully. Returned data: ' + data);
|
|
74
63
|
}).catch((error:any) => console.error(error));
|
|
75
64
|
```
|
|
@@ -79,37 +68,38 @@ apiInstance.beginLiveActivity(body).then((data:any) => {
|
|
|
79
68
|
|
|
80
69
|
Name | Type | Description | Notes
|
|
81
70
|
------------- | ------------- | ------------- | -------------
|
|
82
|
-
**
|
|
83
|
-
**
|
|
84
|
-
**activityId** | [**string**] | Live Activity record ID | defaults to undefined
|
|
71
|
+
**appId** | [**string**] | | defaults to undefined
|
|
72
|
+
**notificationId** | [**string**] | | defaults to undefined
|
|
85
73
|
|
|
86
74
|
|
|
87
75
|
### Return type
|
|
88
76
|
|
|
89
|
-
**
|
|
77
|
+
**GenericSuccessBoolResponse**
|
|
90
78
|
|
|
91
79
|
### Authorization
|
|
92
80
|
|
|
93
|
-
[
|
|
81
|
+
[rest_api_key](README.md#rest_api_key)
|
|
94
82
|
|
|
95
83
|
### HTTP request headers
|
|
96
84
|
|
|
97
|
-
- **Content-Type**:
|
|
85
|
+
- **Content-Type**: Not defined
|
|
98
86
|
- **Accept**: application/json
|
|
99
87
|
|
|
100
88
|
|
|
101
89
|
### HTTP response details
|
|
102
90
|
| Status code | Description | Response headers |
|
|
103
91
|
|-------------|-------------|------------------|
|
|
104
|
-
**
|
|
92
|
+
**200** | OK | - |
|
|
105
93
|
**400** | Bad Request | - |
|
|
94
|
+
**404** | Not Found | - |
|
|
95
|
+
**429** | Rate Limit Exceeded | - |
|
|
106
96
|
|
|
107
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)
|
|
108
98
|
|
|
109
|
-
# **
|
|
110
|
-
>
|
|
99
|
+
# **createAlias**
|
|
100
|
+
> UserIdentityBody createAlias(userIdentityBody)
|
|
111
101
|
|
|
112
|
-
|
|
102
|
+
Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
|
|
113
103
|
|
|
114
104
|
### Example
|
|
115
105
|
|
|
@@ -121,14 +111,22 @@ import * as fs from 'fs';
|
|
|
121
111
|
const configuration = .createConfiguration();
|
|
122
112
|
const apiInstance = new .DefaultApi(configuration);
|
|
123
113
|
|
|
124
|
-
let body:.
|
|
114
|
+
let body:.DefaultApiCreateAliasRequest = {
|
|
125
115
|
// string
|
|
126
116
|
appId: "app_id_example",
|
|
127
117
|
// string
|
|
128
|
-
|
|
118
|
+
aliasLabel: "alias_label_example",
|
|
119
|
+
// string
|
|
120
|
+
aliasId: "alias_id_example",
|
|
121
|
+
// UserIdentityBody
|
|
122
|
+
userIdentityBody: {
|
|
123
|
+
identity: {
|
|
124
|
+
"key": "key_example",
|
|
125
|
+
},
|
|
126
|
+
},
|
|
129
127
|
};
|
|
130
128
|
|
|
131
|
-
apiInstance.
|
|
129
|
+
apiInstance.createAlias(body).then((data:any) => {
|
|
132
130
|
console.log('API called successfully. Returned data: ' + data);
|
|
133
131
|
}).catch((error:any) => console.error(error));
|
|
134
132
|
```
|
|
@@ -138,21 +136,23 @@ apiInstance.cancelNotification(body).then((data:any) => {
|
|
|
138
136
|
|
|
139
137
|
Name | Type | Description | Notes
|
|
140
138
|
------------- | ------------- | ------------- | -------------
|
|
139
|
+
**userIdentityBody** | **UserIdentityBody**| |
|
|
141
140
|
**appId** | [**string**] | | defaults to undefined
|
|
142
|
-
**
|
|
141
|
+
**aliasLabel** | [**string**] | | defaults to undefined
|
|
142
|
+
**aliasId** | [**string**] | | defaults to undefined
|
|
143
143
|
|
|
144
144
|
|
|
145
145
|
### Return type
|
|
146
146
|
|
|
147
|
-
**
|
|
147
|
+
**UserIdentityBody**
|
|
148
148
|
|
|
149
149
|
### Authorization
|
|
150
150
|
|
|
151
|
-
[
|
|
151
|
+
[rest_api_key](README.md#rest_api_key)
|
|
152
152
|
|
|
153
153
|
### HTTP request headers
|
|
154
154
|
|
|
155
|
-
- **Content-Type**:
|
|
155
|
+
- **Content-Type**: application/json
|
|
156
156
|
- **Accept**: application/json
|
|
157
157
|
|
|
158
158
|
|
|
@@ -161,13 +161,16 @@ Name | Type | Description | Notes
|
|
|
161
161
|
|-------------|-------------|------------------|
|
|
162
162
|
**200** | OK | - |
|
|
163
163
|
**400** | Bad Request | - |
|
|
164
|
+
**404** | Not Found | - |
|
|
165
|
+
**409** | Conflict | - |
|
|
166
|
+
**429** | Rate Limit Exceeded | - |
|
|
164
167
|
|
|
165
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)
|
|
166
169
|
|
|
167
|
-
# **
|
|
168
|
-
>
|
|
170
|
+
# **createAliasBySubscription**
|
|
171
|
+
> UserIdentityBody createAliasBySubscription(userIdentityBody)
|
|
169
172
|
|
|
170
|
-
|
|
173
|
+
Upserts one or more Aliases for the User identified by :subscription_id.
|
|
171
174
|
|
|
172
175
|
### Example
|
|
173
176
|
|
|
@@ -179,34 +182,20 @@ import * as fs from 'fs';
|
|
|
179
182
|
const configuration = .createConfiguration();
|
|
180
183
|
const apiInstance = new .DefaultApi(configuration);
|
|
181
184
|
|
|
182
|
-
let body:.
|
|
183
|
-
//
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
apns_env: "sandbox",
|
|
193
|
-
apns_p12: "apns_p12_example",
|
|
194
|
-
apns_p12_password: "apns_p12_password_example",
|
|
195
|
-
safari_apns_p12: "safari_apns_p12_example",
|
|
196
|
-
safari_apns_p12_password: "safari_apns_p12_password_example",
|
|
197
|
-
apns_key_id: "apns_key_id_example",
|
|
198
|
-
apns_team_id: "apns_team_id_example",
|
|
199
|
-
apns_bundle_id: "apns_bundle_id_example",
|
|
200
|
-
apns_p8: "apns_p8_example",
|
|
201
|
-
safari_site_origin: "safari_site_origin_example",
|
|
202
|
-
safari_icon_256_256: "safari_icon_256_256_example",
|
|
203
|
-
site_name: "site_name_example",
|
|
204
|
-
organization_id: "organization_id_example",
|
|
205
|
-
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
|
+
},
|
|
206
195
|
},
|
|
207
196
|
};
|
|
208
197
|
|
|
209
|
-
apiInstance.
|
|
198
|
+
apiInstance.createAliasBySubscription(body).then((data:any) => {
|
|
210
199
|
console.log('API called successfully. Returned data: ' + data);
|
|
211
200
|
}).catch((error:any) => console.error(error));
|
|
212
201
|
```
|
|
@@ -216,16 +205,18 @@ apiInstance.createApp(body).then((data:any) => {
|
|
|
216
205
|
|
|
217
206
|
Name | Type | Description | Notes
|
|
218
207
|
------------- | ------------- | ------------- | -------------
|
|
219
|
-
**
|
|
208
|
+
**userIdentityBody** | **UserIdentityBody**| |
|
|
209
|
+
**appId** | [**string**] | | defaults to undefined
|
|
210
|
+
**subscriptionId** | [**string**] | | defaults to undefined
|
|
220
211
|
|
|
221
212
|
|
|
222
213
|
### Return type
|
|
223
214
|
|
|
224
|
-
**
|
|
215
|
+
**UserIdentityBody**
|
|
225
216
|
|
|
226
217
|
### Authorization
|
|
227
218
|
|
|
228
|
-
[
|
|
219
|
+
[rest_api_key](README.md#rest_api_key)
|
|
229
220
|
|
|
230
221
|
### HTTP request headers
|
|
231
222
|
|
|
@@ -238,13 +229,16 @@ Name | Type | Description | Notes
|
|
|
238
229
|
|-------------|-------------|------------------|
|
|
239
230
|
**200** | OK | - |
|
|
240
231
|
**400** | Bad Request | - |
|
|
232
|
+
**404** | Not Found | - |
|
|
233
|
+
**409** | Conflict | - |
|
|
234
|
+
**429** | Rate Limit Exceeded | - |
|
|
241
235
|
|
|
242
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)
|
|
243
237
|
|
|
244
|
-
# **
|
|
245
|
-
>
|
|
238
|
+
# **createApp**
|
|
239
|
+
> App createApp(app)
|
|
246
240
|
|
|
247
|
-
|
|
241
|
+
Creates a new OneSignal app
|
|
248
242
|
|
|
249
243
|
### Example
|
|
250
244
|
|
|
@@ -256,12 +250,34 @@ import * as fs from 'fs';
|
|
|
256
250
|
const configuration = .createConfiguration();
|
|
257
251
|
const apiInstance = new .DefaultApi(configuration);
|
|
258
252
|
|
|
259
|
-
let body:.
|
|
260
|
-
//
|
|
261
|
-
|
|
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
|
+
},
|
|
262
278
|
};
|
|
263
279
|
|
|
264
|
-
apiInstance.
|
|
280
|
+
apiInstance.createApp(body).then((data:any) => {
|
|
265
281
|
console.log('API called successfully. Returned data: ' + data);
|
|
266
282
|
}).catch((error:any) => console.error(error));
|
|
267
283
|
```
|
|
@@ -271,16 +287,16 @@ apiInstance.createNotification(body).then((data:any) => {
|
|
|
271
287
|
|
|
272
288
|
Name | Type | Description | Notes
|
|
273
289
|
------------- | ------------- | ------------- | -------------
|
|
274
|
-
**
|
|
290
|
+
**app** | **App**| |
|
|
275
291
|
|
|
276
292
|
|
|
277
293
|
### Return type
|
|
278
294
|
|
|
279
|
-
**
|
|
295
|
+
**App**
|
|
280
296
|
|
|
281
297
|
### Authorization
|
|
282
298
|
|
|
283
|
-
[
|
|
299
|
+
[user_auth_key](README.md#user_auth_key)
|
|
284
300
|
|
|
285
301
|
### HTTP request headers
|
|
286
302
|
|
|
@@ -291,15 +307,16 @@ Name | Type | Description | Notes
|
|
|
291
307
|
### HTTP response details
|
|
292
308
|
| Status code | Description | Response headers |
|
|
293
309
|
|-------------|-------------|------------------|
|
|
294
|
-
**200** | OK
|
|
310
|
+
**200** | OK | - |
|
|
295
311
|
**400** | Bad Request | - |
|
|
312
|
+
**429** | Rate Limit Exceeded | - |
|
|
296
313
|
|
|
297
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)
|
|
298
315
|
|
|
299
|
-
# **
|
|
300
|
-
>
|
|
316
|
+
# **createNotification**
|
|
317
|
+
> CreateNotificationSuccessResponse createNotification(notification)
|
|
301
318
|
|
|
302
|
-
|
|
319
|
+
Sends notifications to your users
|
|
303
320
|
|
|
304
321
|
### Example
|
|
305
322
|
|
|
@@ -311,38 +328,12 @@ import * as fs from 'fs';
|
|
|
311
328
|
const configuration = .createConfiguration();
|
|
312
329
|
const apiInstance = new .DefaultApi(configuration);
|
|
313
330
|
|
|
314
|
-
let body:.
|
|
315
|
-
//
|
|
316
|
-
|
|
317
|
-
app_id: "app_id_example",
|
|
318
|
-
device_type: 1,
|
|
319
|
-
external_user_id: "external_user_id_example",
|
|
320
|
-
external_user_id_auth_hash: "external_user_id_auth_hash_example",
|
|
321
|
-
email_auth_hash: "email_auth_hash_example",
|
|
322
|
-
identifier: "identifier_example",
|
|
323
|
-
language: "language_example",
|
|
324
|
-
timezone: 1,
|
|
325
|
-
game_version: "game_version_example",
|
|
326
|
-
device_model: "device_model_example",
|
|
327
|
-
device_os: "device_os_example",
|
|
328
|
-
ad_id: "ad_id_example",
|
|
329
|
-
sdk: "sdk_example",
|
|
330
|
-
session_count: 1,
|
|
331
|
-
tags: {},
|
|
332
|
-
amount_spent: 3.14,
|
|
333
|
-
created_at: 1,
|
|
334
|
-
playtime: 1,
|
|
335
|
-
badge_count: 1,
|
|
336
|
-
last_active: 1,
|
|
337
|
-
notification_types: 1,
|
|
338
|
-
test_type: 1,
|
|
339
|
-
long: 3.14,
|
|
340
|
-
lat: 3.14,
|
|
341
|
-
country: "country_example",
|
|
342
|
-
},
|
|
331
|
+
let body:.DefaultApiCreateNotificationRequest = {
|
|
332
|
+
// Notification
|
|
333
|
+
notification: null,
|
|
343
334
|
};
|
|
344
335
|
|
|
345
|
-
apiInstance.
|
|
336
|
+
apiInstance.createNotification(body).then((data:any) => {
|
|
346
337
|
console.log('API called successfully. Returned data: ' + data);
|
|
347
338
|
}).catch((error:any) => console.error(error));
|
|
348
339
|
```
|
|
@@ -352,16 +343,16 @@ apiInstance.createPlayer(body).then((data:any) => {
|
|
|
352
343
|
|
|
353
344
|
Name | Type | Description | Notes
|
|
354
345
|
------------- | ------------- | ------------- | -------------
|
|
355
|
-
**
|
|
346
|
+
**notification** | **Notification**| |
|
|
356
347
|
|
|
357
348
|
|
|
358
349
|
### Return type
|
|
359
350
|
|
|
360
|
-
**
|
|
351
|
+
**CreateNotificationSuccessResponse**
|
|
361
352
|
|
|
362
353
|
### Authorization
|
|
363
354
|
|
|
364
|
-
[
|
|
355
|
+
[rest_api_key](README.md#rest_api_key)
|
|
365
356
|
|
|
366
357
|
### HTTP request headers
|
|
367
358
|
|
|
@@ -372,15 +363,16 @@ Name | Type | Description | Notes
|
|
|
372
363
|
### HTTP response details
|
|
373
364
|
| Status code | Description | Response headers |
|
|
374
365
|
|-------------|-------------|------------------|
|
|
375
|
-
**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. | - |
|
|
376
367
|
**400** | Bad Request | - |
|
|
368
|
+
**429** | Rate Limit Exceeded | - |
|
|
377
369
|
|
|
378
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)
|
|
379
371
|
|
|
380
|
-
# **
|
|
381
|
-
> CreateSegmentSuccessResponse
|
|
372
|
+
# **createSegment**
|
|
373
|
+
> CreateSegmentSuccessResponse createSegment()
|
|
382
374
|
|
|
383
|
-
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.
|
|
384
376
|
|
|
385
377
|
### Example
|
|
386
378
|
|
|
@@ -392,7 +384,7 @@ import * as fs from 'fs';
|
|
|
392
384
|
const configuration = .createConfiguration();
|
|
393
385
|
const apiInstance = new .DefaultApi(configuration);
|
|
394
386
|
|
|
395
|
-
let body:.
|
|
387
|
+
let body:.DefaultApiCreateSegmentRequest = {
|
|
396
388
|
// string | The OneSignal App ID for your app. Available in Keys & IDs.
|
|
397
389
|
appId: "app_id_example",
|
|
398
390
|
// Segment (optional)
|
|
@@ -405,7 +397,7 @@ let body:.DefaultApiCreateSegmentsRequest = {
|
|
|
405
397
|
},
|
|
406
398
|
};
|
|
407
399
|
|
|
408
|
-
apiInstance.
|
|
400
|
+
apiInstance.createSegment(body).then((data:any) => {
|
|
409
401
|
console.log('API called successfully. Returned data: ' + data);
|
|
410
402
|
}).catch((error:any) => console.error(error));
|
|
411
403
|
```
|
|
@@ -425,7 +417,7 @@ Name | Type | Description | Notes
|
|
|
425
417
|
|
|
426
418
|
### Authorization
|
|
427
419
|
|
|
428
|
-
[
|
|
420
|
+
[rest_api_key](README.md#rest_api_key)
|
|
429
421
|
|
|
430
422
|
### HTTP request headers
|
|
431
423
|
|
|
@@ -439,11 +431,12 @@ Name | Type | Description | Notes
|
|
|
439
431
|
**201** | Created | - |
|
|
440
432
|
**400** | Bad Request | - |
|
|
441
433
|
**409** | Conflict | - |
|
|
434
|
+
**429** | Rate Limit Exceeded | - |
|
|
442
435
|
|
|
443
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)
|
|
444
437
|
|
|
445
438
|
# **createSubscription**
|
|
446
|
-
>
|
|
439
|
+
> SubscriptionBody createSubscription(subscriptionBody)
|
|
447
440
|
|
|
448
441
|
Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User.
|
|
449
442
|
|
|
@@ -464,28 +457,27 @@ let body:.DefaultApiCreateSubscriptionRequest = {
|
|
|
464
457
|
aliasLabel: "alias_label_example",
|
|
465
458
|
// string
|
|
466
459
|
aliasId: "alias_id_example",
|
|
467
|
-
//
|
|
468
|
-
|
|
460
|
+
// SubscriptionBody
|
|
461
|
+
subscriptionBody: {
|
|
469
462
|
subscription: {
|
|
470
463
|
id: "id_example",
|
|
471
464
|
type: "iOSPush",
|
|
472
465
|
token: "token_example",
|
|
473
466
|
enabled: true,
|
|
474
|
-
notification_types:
|
|
475
|
-
session_time:
|
|
476
|
-
session_count:
|
|
467
|
+
notification_types: 1,
|
|
468
|
+
session_time: 1,
|
|
469
|
+
session_count: 1,
|
|
477
470
|
sdk: "sdk_example",
|
|
478
471
|
device_model: "device_model_example",
|
|
479
472
|
device_os: "device_os_example",
|
|
480
473
|
rooted: true,
|
|
481
|
-
test_type:
|
|
474
|
+
test_type: 1,
|
|
482
475
|
app_version: "app_version_example",
|
|
483
|
-
net_type:
|
|
476
|
+
net_type: 1,
|
|
484
477
|
carrier: "carrier_example",
|
|
485
478
|
web_auth: "web_auth_example",
|
|
486
479
|
web_p256: "web_p256_example",
|
|
487
480
|
},
|
|
488
|
-
retain_previous_owner: true,
|
|
489
481
|
},
|
|
490
482
|
};
|
|
491
483
|
|
|
@@ -499,7 +491,7 @@ apiInstance.createSubscription(body).then((data:any) => {
|
|
|
499
491
|
|
|
500
492
|
Name | Type | Description | Notes
|
|
501
493
|
------------- | ------------- | ------------- | -------------
|
|
502
|
-
**
|
|
494
|
+
**subscriptionBody** | **SubscriptionBody**| |
|
|
503
495
|
**appId** | [**string**] | | defaults to undefined
|
|
504
496
|
**aliasLabel** | [**string**] | | defaults to undefined
|
|
505
497
|
**aliasId** | [**string**] | | defaults to undefined
|
|
@@ -507,11 +499,11 @@ Name | Type | Description | Notes
|
|
|
507
499
|
|
|
508
500
|
### Return type
|
|
509
501
|
|
|
510
|
-
**
|
|
502
|
+
**SubscriptionBody**
|
|
511
503
|
|
|
512
504
|
### Authorization
|
|
513
505
|
|
|
514
|
-
[
|
|
506
|
+
[rest_api_key](README.md#rest_api_key)
|
|
515
507
|
|
|
516
508
|
### HTTP request headers
|
|
517
509
|
|
|
@@ -524,6 +516,10 @@ Name | Type | Description | Notes
|
|
|
524
516
|
|-------------|-------------|------------------|
|
|
525
517
|
**201** | CREATED | - |
|
|
526
518
|
**202** | ACCEPTED | - |
|
|
519
|
+
**400** | Bad Request | - |
|
|
520
|
+
**404** | Not Found | - |
|
|
521
|
+
**409** | Operation is not permitted due to user having the maximum number of subscriptions assigned | - |
|
|
522
|
+
**429** | Rate Limit Exceeded | - |
|
|
527
523
|
|
|
528
524
|
[[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)
|
|
529
525
|
|
|
@@ -554,44 +550,43 @@ let body:.DefaultApiCreateUserRequest = {
|
|
|
554
550
|
lat: 3.14,
|
|
555
551
|
long: 3.14,
|
|
556
552
|
country: "country_example",
|
|
557
|
-
first_active:
|
|
558
|
-
last_active:
|
|
553
|
+
first_active: 1,
|
|
554
|
+
last_active: 1,
|
|
559
555
|
amount_spent: 3.14,
|
|
560
556
|
purchases: [
|
|
561
557
|
{
|
|
562
558
|
sku: "sku_example",
|
|
563
559
|
amount: "amount_example",
|
|
564
560
|
iso: "iso_example",
|
|
565
|
-
count:
|
|
561
|
+
count: 1,
|
|
566
562
|
},
|
|
567
563
|
],
|
|
568
564
|
ip: "ip_example",
|
|
569
565
|
},
|
|
570
|
-
identity: {
|
|
566
|
+
identity: {
|
|
567
|
+
"key": "key_example",
|
|
568
|
+
},
|
|
571
569
|
subscriptions: [
|
|
572
570
|
{
|
|
573
571
|
id: "id_example",
|
|
574
572
|
type: "iOSPush",
|
|
575
573
|
token: "token_example",
|
|
576
574
|
enabled: true,
|
|
577
|
-
notification_types:
|
|
578
|
-
session_time:
|
|
579
|
-
session_count:
|
|
575
|
+
notification_types: 1,
|
|
576
|
+
session_time: 1,
|
|
577
|
+
session_count: 1,
|
|
580
578
|
sdk: "sdk_example",
|
|
581
579
|
device_model: "device_model_example",
|
|
582
580
|
device_os: "device_os_example",
|
|
583
581
|
rooted: true,
|
|
584
|
-
test_type:
|
|
582
|
+
test_type: 1,
|
|
585
583
|
app_version: "app_version_example",
|
|
586
|
-
net_type:
|
|
584
|
+
net_type: 1,
|
|
587
585
|
carrier: "carrier_example",
|
|
588
586
|
web_auth: "web_auth_example",
|
|
589
587
|
web_p256: "web_p256_example",
|
|
590
588
|
},
|
|
591
589
|
],
|
|
592
|
-
subscription_options: {
|
|
593
|
-
retain_previous_owner: true,
|
|
594
|
-
},
|
|
595
590
|
},
|
|
596
591
|
};
|
|
597
592
|
|
|
@@ -615,7 +610,7 @@ Name | Type | Description | Notes
|
|
|
615
610
|
|
|
616
611
|
### Authorization
|
|
617
612
|
|
|
618
|
-
[
|
|
613
|
+
[rest_api_key](README.md#rest_api_key)
|
|
619
614
|
|
|
620
615
|
### HTTP request headers
|
|
621
616
|
|
|
@@ -626,14 +621,17 @@ Name | Type | Description | Notes
|
|
|
626
621
|
### HTTP response details
|
|
627
622
|
| Status code | Description | Response headers |
|
|
628
623
|
|-------------|-------------|------------------|
|
|
624
|
+
**200** | CREATED | - |
|
|
629
625
|
**201** | CREATED | - |
|
|
630
626
|
**202** | ACCEPTED | - |
|
|
627
|
+
**400** | Bad Request | - |
|
|
631
628
|
**409** | Multiple User Identity Conflict | - |
|
|
629
|
+
**429** | Rate Limit Exceeded | - |
|
|
632
630
|
|
|
633
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)
|
|
634
632
|
|
|
635
633
|
# **deleteAlias**
|
|
636
|
-
>
|
|
634
|
+
> UserIdentityBody deleteAlias()
|
|
637
635
|
|
|
638
636
|
Deletes an alias by alias label
|
|
639
637
|
|
|
@@ -676,68 +674,11 @@ Name | Type | Description | Notes
|
|
|
676
674
|
|
|
677
675
|
### Return type
|
|
678
676
|
|
|
679
|
-
**
|
|
680
|
-
|
|
681
|
-
### Authorization
|
|
682
|
-
|
|
683
|
-
[app_key](README.md#app_key)
|
|
684
|
-
|
|
685
|
-
### HTTP request headers
|
|
686
|
-
|
|
687
|
-
- **Content-Type**: Not defined
|
|
688
|
-
- **Accept**: application/json
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
### HTTP response details
|
|
692
|
-
| Status code | Description | Response headers |
|
|
693
|
-
|-------------|-------------|------------------|
|
|
694
|
-
**200** | OK | - |
|
|
695
|
-
|
|
696
|
-
[[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)
|
|
697
|
-
|
|
698
|
-
# **deletePlayer**
|
|
699
|
-
> DeletePlayerSuccessResponse deletePlayer()
|
|
700
|
-
|
|
701
|
-
Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app.
|
|
702
|
-
|
|
703
|
-
### Example
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
```typescript
|
|
707
|
-
import { } from '';
|
|
708
|
-
import * as fs from 'fs';
|
|
709
|
-
|
|
710
|
-
const configuration = .createConfiguration();
|
|
711
|
-
const apiInstance = new .DefaultApi(configuration);
|
|
712
|
-
|
|
713
|
-
let body:.DefaultApiDeletePlayerRequest = {
|
|
714
|
-
// string | The OneSignal App ID for your app. Available in Keys & IDs.
|
|
715
|
-
appId: "app_id_example",
|
|
716
|
-
// string | The OneSignal player_id
|
|
717
|
-
playerId: "player_id_example",
|
|
718
|
-
};
|
|
719
|
-
|
|
720
|
-
apiInstance.deletePlayer(body).then((data:any) => {
|
|
721
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
722
|
-
}).catch((error:any) => console.error(error));
|
|
723
|
-
```
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
### Parameters
|
|
727
|
-
|
|
728
|
-
Name | Type | Description | Notes
|
|
729
|
-
------------- | ------------- | ------------- | -------------
|
|
730
|
-
**appId** | [**string**] | The OneSignal App ID for your app. Available in Keys & IDs. | defaults to undefined
|
|
731
|
-
**playerId** | [**string**] | The OneSignal player_id | defaults to undefined
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
### Return type
|
|
735
|
-
|
|
736
|
-
**DeletePlayerSuccessResponse**
|
|
677
|
+
**UserIdentityBody**
|
|
737
678
|
|
|
738
679
|
### Authorization
|
|
739
680
|
|
|
740
|
-
[
|
|
681
|
+
[rest_api_key](README.md#rest_api_key)
|
|
741
682
|
|
|
742
683
|
### HTTP request headers
|
|
743
684
|
|
|
@@ -751,13 +692,15 @@ Name | Type | Description | Notes
|
|
|
751
692
|
**200** | OK | - |
|
|
752
693
|
**400** | Bad Request | - |
|
|
753
694
|
**404** | Not Found | - |
|
|
695
|
+
**409** | Conflict | - |
|
|
696
|
+
**429** | Rate Limit Exceeded | - |
|
|
754
697
|
|
|
755
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)
|
|
756
699
|
|
|
757
|
-
# **
|
|
758
|
-
>
|
|
700
|
+
# **deleteSegment**
|
|
701
|
+
> GenericSuccessBoolResponse deleteSegment()
|
|
759
702
|
|
|
760
|
-
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.
|
|
761
704
|
|
|
762
705
|
### Example
|
|
763
706
|
|
|
@@ -769,14 +712,14 @@ import * as fs from 'fs';
|
|
|
769
712
|
const configuration = .createConfiguration();
|
|
770
713
|
const apiInstance = new .DefaultApi(configuration);
|
|
771
714
|
|
|
772
|
-
let body:.
|
|
715
|
+
let body:.DefaultApiDeleteSegmentRequest = {
|
|
773
716
|
// string | The OneSignal App ID for your app. Available in Keys & IDs.
|
|
774
717
|
appId: "app_id_example",
|
|
775
718
|
// string | The segment_id can be found in the URL of the segment when viewing it in the dashboard.
|
|
776
719
|
segmentId: "segment_id_example",
|
|
777
720
|
};
|
|
778
721
|
|
|
779
|
-
apiInstance.
|
|
722
|
+
apiInstance.deleteSegment(body).then((data:any) => {
|
|
780
723
|
console.log('API called successfully. Returned data: ' + data);
|
|
781
724
|
}).catch((error:any) => console.error(error));
|
|
782
725
|
```
|
|
@@ -792,11 +735,11 @@ Name | Type | Description | Notes
|
|
|
792
735
|
|
|
793
736
|
### Return type
|
|
794
737
|
|
|
795
|
-
**
|
|
738
|
+
**GenericSuccessBoolResponse**
|
|
796
739
|
|
|
797
740
|
### Authorization
|
|
798
741
|
|
|
799
|
-
[
|
|
742
|
+
[rest_api_key](README.md#rest_api_key)
|
|
800
743
|
|
|
801
744
|
### HTTP request headers
|
|
802
745
|
|
|
@@ -810,6 +753,7 @@ Name | Type | Description | Notes
|
|
|
810
753
|
**200** | OK | - |
|
|
811
754
|
**400** | Bad Request | - |
|
|
812
755
|
**404** | Not Found | - |
|
|
756
|
+
**429** | Rate Limit Exceeded | - |
|
|
813
757
|
|
|
814
758
|
[[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)
|
|
815
759
|
|
|
@@ -855,18 +799,22 @@ Name | Type | Description | Notes
|
|
|
855
799
|
|
|
856
800
|
### Authorization
|
|
857
801
|
|
|
858
|
-
[
|
|
802
|
+
[rest_api_key](README.md#rest_api_key)
|
|
859
803
|
|
|
860
804
|
### HTTP request headers
|
|
861
805
|
|
|
862
806
|
- **Content-Type**: Not defined
|
|
863
|
-
- **Accept**:
|
|
807
|
+
- **Accept**: application/json
|
|
864
808
|
|
|
865
809
|
|
|
866
810
|
### HTTP response details
|
|
867
811
|
| Status code | Description | Response headers |
|
|
868
812
|
|-------------|-------------|------------------|
|
|
869
813
|
**202** | ACCEPTED | - |
|
|
814
|
+
**400** | Bad Request | - |
|
|
815
|
+
**404** | Not Found | - |
|
|
816
|
+
**409** | Conflict | - |
|
|
817
|
+
**429** | Rate Limit Exceeded | - |
|
|
870
818
|
|
|
871
819
|
[[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)
|
|
872
820
|
|
|
@@ -920,20 +868,23 @@ No authorization required
|
|
|
920
868
|
### HTTP request headers
|
|
921
869
|
|
|
922
870
|
- **Content-Type**: Not defined
|
|
923
|
-
- **Accept**:
|
|
871
|
+
- **Accept**: application/json
|
|
924
872
|
|
|
925
873
|
|
|
926
874
|
### HTTP response details
|
|
927
875
|
| Status code | Description | Response headers |
|
|
928
876
|
|-------------|-------------|------------------|
|
|
929
877
|
**200** | OK | - |
|
|
878
|
+
**400** | Bad Request | - |
|
|
879
|
+
**409** | Conflict | - |
|
|
880
|
+
**429** | Rate Limit Exceeded | - |
|
|
930
881
|
|
|
931
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)
|
|
932
883
|
|
|
933
|
-
# **
|
|
934
|
-
>
|
|
884
|
+
# **exportEvents**
|
|
885
|
+
> ExportEventsSuccessResponse exportEvents()
|
|
935
886
|
|
|
936
|
-
|
|
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.
|
|
937
888
|
|
|
938
889
|
### Example
|
|
939
890
|
|
|
@@ -945,16 +896,14 @@ import * as fs from 'fs';
|
|
|
945
896
|
const configuration = .createConfiguration();
|
|
946
897
|
const apiInstance = new .DefaultApi(configuration);
|
|
947
898
|
|
|
948
|
-
let body:.
|
|
949
|
-
// 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.
|
|
950
903
|
appId: "app_id_example",
|
|
951
|
-
// string | Live Activity record ID
|
|
952
|
-
activityId: "activity_id_example",
|
|
953
|
-
// string | Subscription ID
|
|
954
|
-
subscriptionId: "subscription_id_example",
|
|
955
904
|
};
|
|
956
905
|
|
|
957
|
-
apiInstance.
|
|
906
|
+
apiInstance.exportEvents(body).then((data:any) => {
|
|
958
907
|
console.log('API called successfully. Returned data: ' + data);
|
|
959
908
|
}).catch((error:any) => console.error(error));
|
|
960
909
|
```
|
|
@@ -964,18 +913,17 @@ apiInstance.endLiveActivity(body).then((data:any) => {
|
|
|
964
913
|
|
|
965
914
|
Name | Type | Description | Notes
|
|
966
915
|
------------- | ------------- | ------------- | -------------
|
|
967
|
-
**
|
|
968
|
-
**
|
|
969
|
-
**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
|
|
970
918
|
|
|
971
919
|
|
|
972
920
|
### Return type
|
|
973
921
|
|
|
974
|
-
**
|
|
922
|
+
**ExportEventsSuccessResponse**
|
|
975
923
|
|
|
976
924
|
### Authorization
|
|
977
925
|
|
|
978
|
-
[
|
|
926
|
+
[rest_api_key](README.md#rest_api_key)
|
|
979
927
|
|
|
980
928
|
### HTTP request headers
|
|
981
929
|
|
|
@@ -986,13 +934,15 @@ Name | Type | Description | Notes
|
|
|
986
934
|
### HTTP response details
|
|
987
935
|
| Status code | Description | Response headers |
|
|
988
936
|
|-------------|-------------|------------------|
|
|
989
|
-
**
|
|
937
|
+
**200** | OK | - |
|
|
990
938
|
**400** | Bad Request | - |
|
|
939
|
+
**404** | Not Found | - |
|
|
940
|
+
**429** | Rate Limit Exceeded | - |
|
|
991
941
|
|
|
992
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)
|
|
993
943
|
|
|
994
|
-
# **
|
|
995
|
-
>
|
|
944
|
+
# **exportSubscriptions**
|
|
945
|
+
> ExportSubscriptionsSuccessResponse exportSubscriptions()
|
|
996
946
|
|
|
997
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. |
|
|
998
948
|
|
|
@@ -1006,11 +956,11 @@ import * as fs from 'fs';
|
|
|
1006
956
|
const configuration = .createConfiguration();
|
|
1007
957
|
const apiInstance = new .DefaultApi(configuration);
|
|
1008
958
|
|
|
1009
|
-
let body:.
|
|
959
|
+
let body:.DefaultApiExportSubscriptionsRequest = {
|
|
1010
960
|
// string | The app ID that you want to export devices from
|
|
1011
961
|
appId: "app_id_example",
|
|
1012
|
-
//
|
|
1013
|
-
|
|
962
|
+
// ExportSubscriptionsRequestBody (optional)
|
|
963
|
+
exportSubscriptionsRequestBody: {
|
|
1014
964
|
extra_fields: [
|
|
1015
965
|
"extra_fields_example",
|
|
1016
966
|
],
|
|
@@ -1019,7 +969,7 @@ let body:.DefaultApiExportPlayersRequest = {
|
|
|
1019
969
|
},
|
|
1020
970
|
};
|
|
1021
971
|
|
|
1022
|
-
apiInstance.
|
|
972
|
+
apiInstance.exportSubscriptions(body).then((data:any) => {
|
|
1023
973
|
console.log('API called successfully. Returned data: ' + data);
|
|
1024
974
|
}).catch((error:any) => console.error(error));
|
|
1025
975
|
```
|
|
@@ -1029,17 +979,17 @@ apiInstance.exportPlayers(body).then((data:any) => {
|
|
|
1029
979
|
|
|
1030
980
|
Name | Type | Description | Notes
|
|
1031
981
|
------------- | ------------- | ------------- | -------------
|
|
1032
|
-
**
|
|
982
|
+
**exportSubscriptionsRequestBody** | **ExportSubscriptionsRequestBody**| |
|
|
1033
983
|
**appId** | [**string**] | The app ID that you want to export devices from | defaults to undefined
|
|
1034
984
|
|
|
1035
985
|
|
|
1036
986
|
### Return type
|
|
1037
987
|
|
|
1038
|
-
**
|
|
988
|
+
**ExportSubscriptionsSuccessResponse**
|
|
1039
989
|
|
|
1040
990
|
### Authorization
|
|
1041
991
|
|
|
1042
|
-
[
|
|
992
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1043
993
|
|
|
1044
994
|
### HTTP request headers
|
|
1045
995
|
|
|
@@ -1052,13 +1002,14 @@ Name | Type | Description | Notes
|
|
|
1052
1002
|
|-------------|-------------|------------------|
|
|
1053
1003
|
**200** | OK | - |
|
|
1054
1004
|
**400** | Bad Request | - |
|
|
1005
|
+
**429** | Rate Limit Exceeded | - |
|
|
1055
1006
|
|
|
1056
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)
|
|
1057
1008
|
|
|
1058
|
-
# **
|
|
1059
|
-
>
|
|
1009
|
+
# **getAliases**
|
|
1010
|
+
> UserIdentityBody getAliases()
|
|
1060
1011
|
|
|
1061
|
-
Lists all Aliases for the User identified by :
|
|
1012
|
+
Lists all Aliases for the User identified by (:alias_label, :alias_id).
|
|
1062
1013
|
|
|
1063
1014
|
### Example
|
|
1064
1015
|
|
|
@@ -1070,14 +1021,16 @@ import * as fs from 'fs';
|
|
|
1070
1021
|
const configuration = .createConfiguration();
|
|
1071
1022
|
const apiInstance = new .DefaultApi(configuration);
|
|
1072
1023
|
|
|
1073
|
-
let body:.
|
|
1024
|
+
let body:.DefaultApiGetAliasesRequest = {
|
|
1074
1025
|
// string
|
|
1075
1026
|
appId: "app_id_example",
|
|
1076
1027
|
// string
|
|
1077
|
-
|
|
1028
|
+
aliasLabel: "alias_label_example",
|
|
1029
|
+
// string
|
|
1030
|
+
aliasId: "alias_id_example",
|
|
1078
1031
|
};
|
|
1079
1032
|
|
|
1080
|
-
apiInstance.
|
|
1033
|
+
apiInstance.getAliases(body).then((data:any) => {
|
|
1081
1034
|
console.log('API called successfully. Returned data: ' + data);
|
|
1082
1035
|
}).catch((error:any) => console.error(error));
|
|
1083
1036
|
```
|
|
@@ -1088,16 +1041,17 @@ apiInstance.fetchAliases(body).then((data:any) => {
|
|
|
1088
1041
|
Name | Type | Description | Notes
|
|
1089
1042
|
------------- | ------------- | ------------- | -------------
|
|
1090
1043
|
**appId** | [**string**] | | defaults to undefined
|
|
1091
|
-
**
|
|
1044
|
+
**aliasLabel** | [**string**] | | defaults to undefined
|
|
1045
|
+
**aliasId** | [**string**] | | defaults to undefined
|
|
1092
1046
|
|
|
1093
1047
|
|
|
1094
1048
|
### Return type
|
|
1095
1049
|
|
|
1096
|
-
**
|
|
1050
|
+
**UserIdentityBody**
|
|
1097
1051
|
|
|
1098
1052
|
### Authorization
|
|
1099
1053
|
|
|
1100
|
-
[
|
|
1054
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1101
1055
|
|
|
1102
1056
|
### HTTP request headers
|
|
1103
1057
|
|
|
@@ -1109,13 +1063,16 @@ Name | Type | Description | Notes
|
|
|
1109
1063
|
| Status code | Description | Response headers |
|
|
1110
1064
|
|-------------|-------------|------------------|
|
|
1111
1065
|
**200** | OK | - |
|
|
1066
|
+
**400** | Bad Request | - |
|
|
1067
|
+
**404** | Not Found | - |
|
|
1068
|
+
**429** | Rate Limit Exceeded | - |
|
|
1112
1069
|
|
|
1113
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)
|
|
1114
1071
|
|
|
1115
|
-
# **
|
|
1116
|
-
>
|
|
1072
|
+
# **getAliasesBySubscription**
|
|
1073
|
+
> UserIdentityBody getAliasesBySubscription()
|
|
1117
1074
|
|
|
1118
|
-
|
|
1075
|
+
Lists all Aliases for the User identified by :subscription_id.
|
|
1119
1076
|
|
|
1120
1077
|
### Example
|
|
1121
1078
|
|
|
@@ -1127,16 +1084,14 @@ import * as fs from 'fs';
|
|
|
1127
1084
|
const configuration = .createConfiguration();
|
|
1128
1085
|
const apiInstance = new .DefaultApi(configuration);
|
|
1129
1086
|
|
|
1130
|
-
let body:.
|
|
1087
|
+
let body:.DefaultApiGetAliasesBySubscriptionRequest = {
|
|
1131
1088
|
// string
|
|
1132
1089
|
appId: "app_id_example",
|
|
1133
1090
|
// string
|
|
1134
|
-
|
|
1135
|
-
// string
|
|
1136
|
-
aliasId: "alias_id_example",
|
|
1091
|
+
subscriptionId: "subscription_id_example",
|
|
1137
1092
|
};
|
|
1138
1093
|
|
|
1139
|
-
apiInstance.
|
|
1094
|
+
apiInstance.getAliasesBySubscription(body).then((data:any) => {
|
|
1140
1095
|
console.log('API called successfully. Returned data: ' + data);
|
|
1141
1096
|
}).catch((error:any) => console.error(error));
|
|
1142
1097
|
```
|
|
@@ -1147,17 +1102,16 @@ apiInstance.fetchUser(body).then((data:any) => {
|
|
|
1147
1102
|
Name | Type | Description | Notes
|
|
1148
1103
|
------------- | ------------- | ------------- | -------------
|
|
1149
1104
|
**appId** | [**string**] | | defaults to undefined
|
|
1150
|
-
**
|
|
1151
|
-
**aliasId** | [**string**] | | defaults to undefined
|
|
1105
|
+
**subscriptionId** | [**string**] | | defaults to undefined
|
|
1152
1106
|
|
|
1153
1107
|
|
|
1154
1108
|
### Return type
|
|
1155
1109
|
|
|
1156
|
-
**
|
|
1110
|
+
**UserIdentityBody**
|
|
1157
1111
|
|
|
1158
1112
|
### Authorization
|
|
1159
1113
|
|
|
1160
|
-
[
|
|
1114
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1161
1115
|
|
|
1162
1116
|
### HTTP request headers
|
|
1163
1117
|
|
|
@@ -1169,13 +1123,15 @@ Name | Type | Description | Notes
|
|
|
1169
1123
|
| Status code | Description | Response headers |
|
|
1170
1124
|
|-------------|-------------|------------------|
|
|
1171
1125
|
**200** | OK | - |
|
|
1126
|
+
**400** | Bad Request | - |
|
|
1127
|
+
**404** | Not Found | - |
|
|
1172
1128
|
|
|
1173
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)
|
|
1174
1130
|
|
|
1175
|
-
# **
|
|
1176
|
-
>
|
|
1131
|
+
# **getApp**
|
|
1132
|
+
> App getApp()
|
|
1177
1133
|
|
|
1178
|
-
|
|
1134
|
+
View the details of a single OneSignal app
|
|
1179
1135
|
|
|
1180
1136
|
### Example
|
|
1181
1137
|
|
|
@@ -1187,16 +1143,12 @@ import * as fs from 'fs';
|
|
|
1187
1143
|
const configuration = .createConfiguration();
|
|
1188
1144
|
const apiInstance = new .DefaultApi(configuration);
|
|
1189
1145
|
|
|
1190
|
-
let body:.
|
|
1191
|
-
// string
|
|
1146
|
+
let body:.DefaultApiGetAppRequest = {
|
|
1147
|
+
// string | An app id
|
|
1192
1148
|
appId: "app_id_example",
|
|
1193
|
-
// string
|
|
1194
|
-
aliasLabel: "alias_label_example",
|
|
1195
|
-
// string
|
|
1196
|
-
aliasId: "alias_id_example",
|
|
1197
1149
|
};
|
|
1198
1150
|
|
|
1199
|
-
apiInstance.
|
|
1151
|
+
apiInstance.getApp(body).then((data:any) => {
|
|
1200
1152
|
console.log('API called successfully. Returned data: ' + data);
|
|
1201
1153
|
}).catch((error:any) => console.error(error));
|
|
1202
1154
|
```
|
|
@@ -1206,18 +1158,16 @@ apiInstance.fetchUserIdentity(body).then((data:any) => {
|
|
|
1206
1158
|
|
|
1207
1159
|
Name | Type | Description | Notes
|
|
1208
1160
|
------------- | ------------- | ------------- | -------------
|
|
1209
|
-
**appId** | [**string**] |
|
|
1210
|
-
**aliasLabel** | [**string**] | | defaults to undefined
|
|
1211
|
-
**aliasId** | [**string**] | | defaults to undefined
|
|
1161
|
+
**appId** | [**string**] | An app id | defaults to undefined
|
|
1212
1162
|
|
|
1213
1163
|
|
|
1214
1164
|
### Return type
|
|
1215
1165
|
|
|
1216
|
-
**
|
|
1166
|
+
**App**
|
|
1217
1167
|
|
|
1218
1168
|
### Authorization
|
|
1219
1169
|
|
|
1220
|
-
[
|
|
1170
|
+
[user_auth_key](README.md#user_auth_key)
|
|
1221
1171
|
|
|
1222
1172
|
### HTTP request headers
|
|
1223
1173
|
|
|
@@ -1229,13 +1179,15 @@ Name | Type | Description | Notes
|
|
|
1229
1179
|
| Status code | Description | Response headers |
|
|
1230
1180
|
|-------------|-------------|------------------|
|
|
1231
1181
|
**200** | OK | - |
|
|
1182
|
+
**400** | Bad Request | - |
|
|
1183
|
+
**429** | Rate Limit Exceeded | - |
|
|
1232
1184
|
|
|
1233
1185
|
[[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)
|
|
1234
1186
|
|
|
1235
|
-
# **
|
|
1236
|
-
> App
|
|
1187
|
+
# **getApps**
|
|
1188
|
+
> Array<App> getApps()
|
|
1237
1189
|
|
|
1238
|
-
View the details of
|
|
1190
|
+
View the details of all of your current OneSignal apps
|
|
1239
1191
|
|
|
1240
1192
|
### Example
|
|
1241
1193
|
|
|
@@ -1247,71 +1199,16 @@ import * as fs from 'fs';
|
|
|
1247
1199
|
const configuration = .createConfiguration();
|
|
1248
1200
|
const apiInstance = new .DefaultApi(configuration);
|
|
1249
1201
|
|
|
1250
|
-
let body
|
|
1251
|
-
// string | An app id
|
|
1252
|
-
appId: "app_id_example",
|
|
1253
|
-
};
|
|
1202
|
+
let body:any = {};
|
|
1254
1203
|
|
|
1255
|
-
apiInstance.
|
|
1204
|
+
apiInstance.getApps(body).then((data:any) => {
|
|
1256
1205
|
console.log('API called successfully. Returned data: ' + data);
|
|
1257
1206
|
}).catch((error:any) => console.error(error));
|
|
1258
1207
|
```
|
|
1259
1208
|
|
|
1260
1209
|
|
|
1261
1210
|
### Parameters
|
|
1262
|
-
|
|
1263
|
-
Name | Type | Description | Notes
|
|
1264
|
-
------------- | ------------- | ------------- | -------------
|
|
1265
|
-
**appId** | [**string**] | An app id | defaults to undefined
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
### Return type
|
|
1269
|
-
|
|
1270
|
-
**App**
|
|
1271
|
-
|
|
1272
|
-
### Authorization
|
|
1273
|
-
|
|
1274
|
-
[user_key](README.md#user_key)
|
|
1275
|
-
|
|
1276
|
-
### HTTP request headers
|
|
1277
|
-
|
|
1278
|
-
- **Content-Type**: Not defined
|
|
1279
|
-
- **Accept**: application/json
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
### HTTP response details
|
|
1283
|
-
| Status code | Description | Response headers |
|
|
1284
|
-
|-------------|-------------|------------------|
|
|
1285
|
-
**200** | OK | - |
|
|
1286
|
-
**400** | Bad Request | - |
|
|
1287
|
-
|
|
1288
|
-
[[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)
|
|
1289
|
-
|
|
1290
|
-
# **getApps**
|
|
1291
|
-
> Array<App> getApps()
|
|
1292
|
-
|
|
1293
|
-
View the details of all of your current OneSignal apps
|
|
1294
|
-
|
|
1295
|
-
### Example
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
```typescript
|
|
1299
|
-
import { } from '';
|
|
1300
|
-
import * as fs from 'fs';
|
|
1301
|
-
|
|
1302
|
-
const configuration = .createConfiguration();
|
|
1303
|
-
const apiInstance = new .DefaultApi(configuration);
|
|
1304
|
-
|
|
1305
|
-
let body:any = {};
|
|
1306
|
-
|
|
1307
|
-
apiInstance.getApps(body).then((data:any) => {
|
|
1308
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
1309
|
-
}).catch((error:any) => console.error(error));
|
|
1310
|
-
```
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
### Parameters
|
|
1314
|
-
This endpoint does not need any parameter.
|
|
1211
|
+
This endpoint does not need any parameter.
|
|
1315
1212
|
|
|
1316
1213
|
|
|
1317
1214
|
### Return type
|
|
@@ -1320,7 +1217,7 @@ This endpoint does not need any parameter.
|
|
|
1320
1217
|
|
|
1321
1218
|
### Authorization
|
|
1322
1219
|
|
|
1323
|
-
[
|
|
1220
|
+
[user_auth_key](README.md#user_auth_key)
|
|
1324
1221
|
|
|
1325
1222
|
### HTTP request headers
|
|
1326
1223
|
|
|
@@ -1333,63 +1230,7 @@ This endpoint does not need any parameter.
|
|
|
1333
1230
|
|-------------|-------------|------------------|
|
|
1334
1231
|
**200** | OK | - |
|
|
1335
1232
|
**400** | Bad Request | - |
|
|
1336
|
-
|
|
1337
|
-
[[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)
|
|
1338
|
-
|
|
1339
|
-
# **getEligibleIams**
|
|
1340
|
-
> InlineResponse2003 getEligibleIams()
|
|
1341
|
-
|
|
1342
|
-
Manifest of In-App Messages the Subscription is eligible to display by the SDK.
|
|
1343
|
-
|
|
1344
|
-
### Example
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
```typescript
|
|
1348
|
-
import { } from '';
|
|
1349
|
-
import * as fs from 'fs';
|
|
1350
|
-
|
|
1351
|
-
const configuration = .createConfiguration();
|
|
1352
|
-
const apiInstance = new .DefaultApi(configuration);
|
|
1353
|
-
|
|
1354
|
-
let body:.DefaultApiGetEligibleIamsRequest = {
|
|
1355
|
-
// string
|
|
1356
|
-
appId: "app_id_example",
|
|
1357
|
-
// string
|
|
1358
|
-
subscriptionId: "subscription_id_example",
|
|
1359
|
-
};
|
|
1360
|
-
|
|
1361
|
-
apiInstance.getEligibleIams(body).then((data:any) => {
|
|
1362
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
1363
|
-
}).catch((error:any) => console.error(error));
|
|
1364
|
-
```
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
### Parameters
|
|
1368
|
-
|
|
1369
|
-
Name | Type | Description | Notes
|
|
1370
|
-
------------- | ------------- | ------------- | -------------
|
|
1371
|
-
**appId** | [**string**] | | defaults to undefined
|
|
1372
|
-
**subscriptionId** | [**string**] | | defaults to undefined
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
### Return type
|
|
1376
|
-
|
|
1377
|
-
**InlineResponse2003**
|
|
1378
|
-
|
|
1379
|
-
### Authorization
|
|
1380
|
-
|
|
1381
|
-
[app_key](README.md#app_key)
|
|
1382
|
-
|
|
1383
|
-
### HTTP request headers
|
|
1384
|
-
|
|
1385
|
-
- **Content-Type**: Not defined
|
|
1386
|
-
- **Accept**: application/json
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
### HTTP response details
|
|
1390
|
-
| Status code | Description | Response headers |
|
|
1391
|
-
|-------------|-------------|------------------|
|
|
1392
|
-
**200** | OK | - |
|
|
1233
|
+
**429** | Rate Limit Exceeded | - |
|
|
1393
1234
|
|
|
1394
1235
|
[[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)
|
|
1395
1236
|
|
|
@@ -1435,7 +1276,7 @@ Name | Type | Description | Notes
|
|
|
1435
1276
|
|
|
1436
1277
|
### Authorization
|
|
1437
1278
|
|
|
1438
|
-
[
|
|
1279
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1439
1280
|
|
|
1440
1281
|
### HTTP request headers
|
|
1441
1282
|
|
|
@@ -1448,11 +1289,13 @@ Name | Type | Description | Notes
|
|
|
1448
1289
|
|-------------|-------------|------------------|
|
|
1449
1290
|
**200** | OK | - |
|
|
1450
1291
|
**400** | Bad Request | - |
|
|
1292
|
+
**404** | Not Found | - |
|
|
1293
|
+
**429** | Rate Limit Exceeded | - |
|
|
1451
1294
|
|
|
1452
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)
|
|
1453
1296
|
|
|
1454
1297
|
# **getNotificationHistory**
|
|
1455
|
-
> NotificationHistorySuccessResponse getNotificationHistory(
|
|
1298
|
+
> NotificationHistorySuccessResponse getNotificationHistory(getNotificationHistoryRequestBody)
|
|
1456
1299
|
|
|
1457
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.
|
|
1458
1301
|
|
|
@@ -1469,8 +1312,8 @@ const apiInstance = new .DefaultApi(configuration);
|
|
|
1469
1312
|
let body:.DefaultApiGetNotificationHistoryRequest = {
|
|
1470
1313
|
// string | The \"id\" of the message found in the Notification object
|
|
1471
1314
|
notificationId: "notification_id_example",
|
|
1472
|
-
//
|
|
1473
|
-
|
|
1315
|
+
// GetNotificationHistoryRequestBody
|
|
1316
|
+
getNotificationHistoryRequestBody: {
|
|
1474
1317
|
events: "sent",
|
|
1475
1318
|
email: "email_example",
|
|
1476
1319
|
app_id: "app_id_example",
|
|
@@ -1487,7 +1330,7 @@ apiInstance.getNotificationHistory(body).then((data:any) => {
|
|
|
1487
1330
|
|
|
1488
1331
|
Name | Type | Description | Notes
|
|
1489
1332
|
------------- | ------------- | ------------- | -------------
|
|
1490
|
-
**
|
|
1333
|
+
**getNotificationHistoryRequestBody** | **GetNotificationHistoryRequestBody**| |
|
|
1491
1334
|
**notificationId** | [**string**] | The \"id\" of the message found in the Notification object | defaults to undefined
|
|
1492
1335
|
|
|
1493
1336
|
|
|
@@ -1497,7 +1340,7 @@ Name | Type | Description | Notes
|
|
|
1497
1340
|
|
|
1498
1341
|
### Authorization
|
|
1499
1342
|
|
|
1500
|
-
[
|
|
1343
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1501
1344
|
|
|
1502
1345
|
### HTTP request headers
|
|
1503
1346
|
|
|
@@ -1510,6 +1353,8 @@ Name | Type | Description | Notes
|
|
|
1510
1353
|
|-------------|-------------|------------------|
|
|
1511
1354
|
**200** | OK | - |
|
|
1512
1355
|
**400** | Bad Request | - |
|
|
1356
|
+
**404** | Not Found | - |
|
|
1357
|
+
**429** | Rate Limit Exceeded | - |
|
|
1513
1358
|
|
|
1514
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)
|
|
1515
1360
|
|
|
@@ -1561,7 +1406,7 @@ Name | Type | Description | Notes
|
|
|
1561
1406
|
|
|
1562
1407
|
### Authorization
|
|
1563
1408
|
|
|
1564
|
-
[
|
|
1409
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1565
1410
|
|
|
1566
1411
|
### HTTP request headers
|
|
1567
1412
|
|
|
@@ -1574,6 +1419,7 @@ Name | Type | Description | Notes
|
|
|
1574
1419
|
|-------------|-------------|------------------|
|
|
1575
1420
|
**200** | OK | - |
|
|
1576
1421
|
**400** | Bad Request | - |
|
|
1422
|
+
**429** | Rate Limit Exceeded | - |
|
|
1577
1423
|
|
|
1578
1424
|
[[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)
|
|
1579
1425
|
|
|
@@ -1631,7 +1477,7 @@ Name | Type | Description | Notes
|
|
|
1631
1477
|
|
|
1632
1478
|
### Authorization
|
|
1633
1479
|
|
|
1634
|
-
[
|
|
1480
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1635
1481
|
|
|
1636
1482
|
### HTTP request headers
|
|
1637
1483
|
|
|
@@ -1644,13 +1490,14 @@ Name | Type | Description | Notes
|
|
|
1644
1490
|
|-------------|-------------|------------------|
|
|
1645
1491
|
**200** | OK | - |
|
|
1646
1492
|
**400** | Bad Request | - |
|
|
1493
|
+
**429** | Rate Limit Exceeded | - |
|
|
1647
1494
|
|
|
1648
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)
|
|
1649
1496
|
|
|
1650
|
-
# **
|
|
1651
|
-
>
|
|
1497
|
+
# **getSegments**
|
|
1498
|
+
> GetSegmentsSuccessResponse getSegments()
|
|
1652
1499
|
|
|
1653
|
-
|
|
1500
|
+
Returns an array of segments from an app.
|
|
1654
1501
|
|
|
1655
1502
|
### Example
|
|
1656
1503
|
|
|
@@ -1662,77 +1509,16 @@ import * as fs from 'fs';
|
|
|
1662
1509
|
const configuration = .createConfiguration();
|
|
1663
1510
|
const apiInstance = new .DefaultApi(configuration);
|
|
1664
1511
|
|
|
1665
|
-
let body:.
|
|
1666
|
-
// string |
|
|
1667
|
-
appId: "app_id_example",
|
|
1668
|
-
// string | Player\'s OneSignal ID
|
|
1669
|
-
playerId: "player_id_example",
|
|
1670
|
-
// string | Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional)
|
|
1671
|
-
emailAuthHash: "email_auth_hash_example",
|
|
1672
|
-
};
|
|
1673
|
-
|
|
1674
|
-
apiInstance.getPlayer(body).then((data:any) => {
|
|
1675
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
1676
|
-
}).catch((error:any) => console.error(error));
|
|
1677
|
-
```
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
### Parameters
|
|
1681
|
-
|
|
1682
|
-
Name | Type | Description | Notes
|
|
1683
|
-
------------- | ------------- | ------------- | -------------
|
|
1684
|
-
**appId** | [**string**] | Your app_id for this device | defaults to undefined
|
|
1685
|
-
**playerId** | [**string**] | Player\'s OneSignal ID | defaults to undefined
|
|
1686
|
-
**emailAuthHash** | [**string**] | Email - Only required if you have enabled Identity Verification and device_type is email (11). | (optional) defaults to undefined
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
### Return type
|
|
1690
|
-
|
|
1691
|
-
**Player**
|
|
1692
|
-
|
|
1693
|
-
### Authorization
|
|
1694
|
-
|
|
1695
|
-
[app_key](README.md#app_key)
|
|
1696
|
-
|
|
1697
|
-
### HTTP request headers
|
|
1698
|
-
|
|
1699
|
-
- **Content-Type**: Not defined
|
|
1700
|
-
- **Accept**: application/json
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
### HTTP response details
|
|
1704
|
-
| Status code | Description | Response headers |
|
|
1705
|
-
|-------------|-------------|------------------|
|
|
1706
|
-
**200** | OK | - |
|
|
1707
|
-
**400** | Bad Request | - |
|
|
1708
|
-
|
|
1709
|
-
[[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)
|
|
1710
|
-
|
|
1711
|
-
# **getPlayers**
|
|
1712
|
-
> PlayerSlice getPlayers()
|
|
1713
|
-
|
|
1714
|
-
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.
|
|
1715
|
-
|
|
1716
|
-
### Example
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
```typescript
|
|
1720
|
-
import { } from '';
|
|
1721
|
-
import * as fs from 'fs';
|
|
1722
|
-
|
|
1723
|
-
const configuration = .createConfiguration();
|
|
1724
|
-
const apiInstance = new .DefaultApi(configuration);
|
|
1725
|
-
|
|
1726
|
-
let body:.DefaultApiGetPlayersRequest = {
|
|
1727
|
-
// 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.
|
|
1728
1514
|
appId: "app_id_example",
|
|
1729
|
-
// number |
|
|
1730
|
-
limit: 1,
|
|
1731
|
-
// 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)
|
|
1732
1516
|
offset: 1,
|
|
1517
|
+
// number | The amount of Segments in the response. Maximum 300. (optional)
|
|
1518
|
+
limit: 1,
|
|
1733
1519
|
};
|
|
1734
1520
|
|
|
1735
|
-
apiInstance.
|
|
1521
|
+
apiInstance.getSegments(body).then((data:any) => {
|
|
1736
1522
|
console.log('API called successfully. Returned data: ' + data);
|
|
1737
1523
|
}).catch((error:any) => console.error(error));
|
|
1738
1524
|
```
|
|
@@ -1742,18 +1528,18 @@ apiInstance.getPlayers(body).then((data:any) => {
|
|
|
1742
1528
|
|
|
1743
1529
|
Name | Type | Description | Notes
|
|
1744
1530
|
------------- | ------------- | ------------- | -------------
|
|
1745
|
-
**appId** | [**string**] | The
|
|
1746
|
-
**
|
|
1747
|
-
**
|
|
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
|
|
1748
1534
|
|
|
1749
1535
|
|
|
1750
1536
|
### Return type
|
|
1751
1537
|
|
|
1752
|
-
**
|
|
1538
|
+
**GetSegmentsSuccessResponse**
|
|
1753
1539
|
|
|
1754
1540
|
### Authorization
|
|
1755
1541
|
|
|
1756
|
-
[
|
|
1542
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1757
1543
|
|
|
1758
1544
|
### HTTP request headers
|
|
1759
1545
|
|
|
@@ -1764,15 +1550,16 @@ Name | Type | Description | Notes
|
|
|
1764
1550
|
### HTTP response details
|
|
1765
1551
|
| Status code | Description | Response headers |
|
|
1766
1552
|
|-------------|-------------|------------------|
|
|
1767
|
-
**
|
|
1553
|
+
**201** | OK | - |
|
|
1768
1554
|
**400** | Bad Request | - |
|
|
1555
|
+
**429** | Rate Limit Exceeded | - |
|
|
1769
1556
|
|
|
1770
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)
|
|
1771
1558
|
|
|
1772
|
-
# **
|
|
1773
|
-
>
|
|
1559
|
+
# **getUser**
|
|
1560
|
+
> User getUser()
|
|
1774
1561
|
|
|
1775
|
-
|
|
1562
|
+
Returns the User’s properties, Aliases, and Subscriptions.
|
|
1776
1563
|
|
|
1777
1564
|
### Example
|
|
1778
1565
|
|
|
@@ -1784,20 +1571,16 @@ import * as fs from 'fs';
|
|
|
1784
1571
|
const configuration = .createConfiguration();
|
|
1785
1572
|
const apiInstance = new .DefaultApi(configuration);
|
|
1786
1573
|
|
|
1787
|
-
let body:.
|
|
1574
|
+
let body:.DefaultApiGetUserRequest = {
|
|
1788
1575
|
// string
|
|
1789
1576
|
appId: "app_id_example",
|
|
1790
1577
|
// string
|
|
1791
1578
|
aliasLabel: "alias_label_example",
|
|
1792
1579
|
// string
|
|
1793
1580
|
aliasId: "alias_id_example",
|
|
1794
|
-
// UserIdentityRequestBody
|
|
1795
|
-
userIdentityRequestBody: {
|
|
1796
|
-
identity: {},
|
|
1797
|
-
},
|
|
1798
1581
|
};
|
|
1799
1582
|
|
|
1800
|
-
apiInstance.
|
|
1583
|
+
apiInstance.getUser(body).then((data:any) => {
|
|
1801
1584
|
console.log('API called successfully. Returned data: ' + data);
|
|
1802
1585
|
}).catch((error:any) => console.error(error));
|
|
1803
1586
|
```
|
|
@@ -1807,7 +1590,6 @@ apiInstance.identifyUserByAlias(body).then((data:any) => {
|
|
|
1807
1590
|
|
|
1808
1591
|
Name | Type | Description | Notes
|
|
1809
1592
|
------------- | ------------- | ------------- | -------------
|
|
1810
|
-
**userIdentityRequestBody** | **UserIdentityRequestBody**| |
|
|
1811
1593
|
**appId** | [**string**] | | defaults to undefined
|
|
1812
1594
|
**aliasLabel** | [**string**] | | defaults to undefined
|
|
1813
1595
|
**aliasId** | [**string**] | | defaults to undefined
|
|
@@ -1815,15 +1597,15 @@ Name | Type | Description | Notes
|
|
|
1815
1597
|
|
|
1816
1598
|
### Return type
|
|
1817
1599
|
|
|
1818
|
-
**
|
|
1600
|
+
**User**
|
|
1819
1601
|
|
|
1820
1602
|
### Authorization
|
|
1821
1603
|
|
|
1822
|
-
[
|
|
1604
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1823
1605
|
|
|
1824
1606
|
### HTTP request headers
|
|
1825
1607
|
|
|
1826
|
-
- **Content-Type**:
|
|
1608
|
+
- **Content-Type**: Not defined
|
|
1827
1609
|
- **Accept**: application/json
|
|
1828
1610
|
|
|
1829
1611
|
|
|
@@ -1831,14 +1613,16 @@ Name | Type | Description | Notes
|
|
|
1831
1613
|
| Status code | Description | Response headers |
|
|
1832
1614
|
|-------------|-------------|------------------|
|
|
1833
1615
|
**200** | OK | - |
|
|
1834
|
-
**
|
|
1616
|
+
**400** | Bad Request | - |
|
|
1617
|
+
**404** | Not Found | - |
|
|
1618
|
+
**429** | Rate Limit Exceeded | - |
|
|
1835
1619
|
|
|
1836
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)
|
|
1837
1621
|
|
|
1838
|
-
# **
|
|
1839
|
-
>
|
|
1622
|
+
# **transferSubscription**
|
|
1623
|
+
> UserIdentityBody transferSubscription(transferSubscriptionRequestBody)
|
|
1840
1624
|
|
|
1841
|
-
|
|
1625
|
+
Transfers this Subscription to the User identified by the identity in the payload.
|
|
1842
1626
|
|
|
1843
1627
|
### Example
|
|
1844
1628
|
|
|
@@ -1850,18 +1634,20 @@ import * as fs from 'fs';
|
|
|
1850
1634
|
const configuration = .createConfiguration();
|
|
1851
1635
|
const apiInstance = new .DefaultApi(configuration);
|
|
1852
1636
|
|
|
1853
|
-
let body:.
|
|
1637
|
+
let body:.DefaultApiTransferSubscriptionRequest = {
|
|
1854
1638
|
// string
|
|
1855
1639
|
appId: "app_id_example",
|
|
1856
1640
|
// string
|
|
1857
1641
|
subscriptionId: "subscription_id_example",
|
|
1858
|
-
//
|
|
1859
|
-
|
|
1860
|
-
identity: {
|
|
1642
|
+
// TransferSubscriptionRequestBody
|
|
1643
|
+
transferSubscriptionRequestBody: {
|
|
1644
|
+
identity: {
|
|
1645
|
+
"key": "key_example",
|
|
1646
|
+
},
|
|
1861
1647
|
},
|
|
1862
1648
|
};
|
|
1863
1649
|
|
|
1864
|
-
apiInstance.
|
|
1650
|
+
apiInstance.transferSubscription(body).then((data:any) => {
|
|
1865
1651
|
console.log('API called successfully. Returned data: ' + data);
|
|
1866
1652
|
}).catch((error:any) => console.error(error));
|
|
1867
1653
|
```
|
|
@@ -1871,18 +1657,18 @@ apiInstance.identifyUserBySubscriptionId(body).then((data:any) => {
|
|
|
1871
1657
|
|
|
1872
1658
|
Name | Type | Description | Notes
|
|
1873
1659
|
------------- | ------------- | ------------- | -------------
|
|
1874
|
-
**
|
|
1660
|
+
**transferSubscriptionRequestBody** | **TransferSubscriptionRequestBody**| |
|
|
1875
1661
|
**appId** | [**string**] | | defaults to undefined
|
|
1876
1662
|
**subscriptionId** | [**string**] | | defaults to undefined
|
|
1877
1663
|
|
|
1878
1664
|
|
|
1879
1665
|
### Return type
|
|
1880
1666
|
|
|
1881
|
-
**
|
|
1667
|
+
**UserIdentityBody**
|
|
1882
1668
|
|
|
1883
1669
|
### Authorization
|
|
1884
1670
|
|
|
1885
|
-
[
|
|
1671
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1886
1672
|
|
|
1887
1673
|
### HTTP request headers
|
|
1888
1674
|
|
|
@@ -1894,14 +1680,17 @@ Name | Type | Description | Notes
|
|
|
1894
1680
|
| Status code | Description | Response headers |
|
|
1895
1681
|
|-------------|-------------|------------------|
|
|
1896
1682
|
**200** | OK | - |
|
|
1683
|
+
**400** | Bad Request | - |
|
|
1684
|
+
**404** | Not Found | - |
|
|
1897
1685
|
**409** | Conflict | - |
|
|
1686
|
+
**429** | Rate Limit Exceeded | - |
|
|
1898
1687
|
|
|
1899
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)
|
|
1900
1689
|
|
|
1901
|
-
# **
|
|
1902
|
-
>
|
|
1690
|
+
# **unsubscribeEmailWithToken**
|
|
1691
|
+
> GenericSuccessBoolResponse unsubscribeEmailWithToken()
|
|
1903
1692
|
|
|
1904
|
-
|
|
1693
|
+
Unsubscribe an email with a token when using your own custom email unsubscribe landing page
|
|
1905
1694
|
|
|
1906
1695
|
### Example
|
|
1907
1696
|
|
|
@@ -1913,18 +1702,16 @@ import * as fs from 'fs';
|
|
|
1913
1702
|
const configuration = .createConfiguration();
|
|
1914
1703
|
const apiInstance = new .DefaultApi(configuration);
|
|
1915
1704
|
|
|
1916
|
-
let body:.
|
|
1917
|
-
// string
|
|
1705
|
+
let body:.DefaultApiUnsubscribeEmailWithTokenRequest = {
|
|
1706
|
+
// string | The OneSignal App ID for your app. Available in Keys & IDs.
|
|
1918
1707
|
appId: "app_id_example",
|
|
1919
|
-
// string
|
|
1920
|
-
|
|
1921
|
-
//
|
|
1922
|
-
|
|
1923
|
-
identity: {},
|
|
1924
|
-
},
|
|
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",
|
|
1925
1712
|
};
|
|
1926
1713
|
|
|
1927
|
-
apiInstance.
|
|
1714
|
+
apiInstance.unsubscribeEmailWithToken(body).then((data:any) => {
|
|
1928
1715
|
console.log('API called successfully. Returned data: ' + data);
|
|
1929
1716
|
}).catch((error:any) => console.error(error));
|
|
1930
1717
|
```
|
|
@@ -1934,29 +1721,31 @@ apiInstance.transferSubscription(body).then((data:any) => {
|
|
|
1934
1721
|
|
|
1935
1722
|
Name | Type | Description | Notes
|
|
1936
1723
|
------------- | ------------- | ------------- | -------------
|
|
1937
|
-
**
|
|
1938
|
-
**
|
|
1939
|
-
**
|
|
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
|
|
1940
1727
|
|
|
1941
1728
|
|
|
1942
1729
|
### Return type
|
|
1943
1730
|
|
|
1944
|
-
**
|
|
1731
|
+
**GenericSuccessBoolResponse**
|
|
1945
1732
|
|
|
1946
1733
|
### Authorization
|
|
1947
1734
|
|
|
1948
|
-
[
|
|
1735
|
+
[rest_api_key](README.md#rest_api_key)
|
|
1949
1736
|
|
|
1950
1737
|
### HTTP request headers
|
|
1951
1738
|
|
|
1952
|
-
- **Content-Type**:
|
|
1739
|
+
- **Content-Type**: Not defined
|
|
1953
1740
|
- **Accept**: application/json
|
|
1954
1741
|
|
|
1955
1742
|
|
|
1956
1743
|
### HTTP response details
|
|
1957
1744
|
| Status code | Description | Response headers |
|
|
1958
1745
|
|-------------|-------------|------------------|
|
|
1959
|
-
**
|
|
1746
|
+
**202** | OK | - |
|
|
1747
|
+
**400** | Bad Request | - |
|
|
1748
|
+
**429** | Rate Limit Exceeded | - |
|
|
1960
1749
|
|
|
1961
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)
|
|
1962
1751
|
|
|
@@ -2024,7 +1813,7 @@ Name | Type | Description | Notes
|
|
|
2024
1813
|
|
|
2025
1814
|
### Authorization
|
|
2026
1815
|
|
|
2027
|
-
[
|
|
1816
|
+
[user_auth_key](README.md#user_auth_key)
|
|
2028
1817
|
|
|
2029
1818
|
### HTTP request headers
|
|
2030
1819
|
|
|
@@ -2037,6 +1826,7 @@ Name | Type | Description | Notes
|
|
|
2037
1826
|
|-------------|-------------|------------------|
|
|
2038
1827
|
**200** | OK | - |
|
|
2039
1828
|
**400** | Bad Request | - |
|
|
1829
|
+
**429** | Rate Limit Exceeded | - |
|
|
2040
1830
|
|
|
2041
1831
|
[[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)
|
|
2042
1832
|
|
|
@@ -2062,10 +1852,103 @@ let body:.DefaultApiUpdateLiveActivityRequest = {
|
|
|
2062
1852
|
activityId: "activity_id_example",
|
|
2063
1853
|
// UpdateLiveActivityRequest
|
|
2064
1854
|
updateLiveActivityRequest: {
|
|
2065
|
-
name: "
|
|
1855
|
+
name: "name_example",
|
|
2066
1856
|
event: "update",
|
|
2067
1857
|
event_updates: {},
|
|
2068
|
-
|
|
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,
|
|
2069
1952
|
},
|
|
2070
1953
|
};
|
|
2071
1954
|
|
|
@@ -2090,91 +1973,7 @@ Name | Type | Description | Notes
|
|
|
2090
1973
|
|
|
2091
1974
|
### Authorization
|
|
2092
1975
|
|
|
2093
|
-
[
|
|
2094
|
-
|
|
2095
|
-
### HTTP request headers
|
|
2096
|
-
|
|
2097
|
-
- **Content-Type**: application/json
|
|
2098
|
-
- **Accept**: application/json
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
### HTTP response details
|
|
2102
|
-
| Status code | Description | Response headers |
|
|
2103
|
-
|-------------|-------------|------------------|
|
|
2104
|
-
**200** | OK | - |
|
|
2105
|
-
**400** | Bad Request | - |
|
|
2106
|
-
|
|
2107
|
-
[[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)
|
|
2108
|
-
|
|
2109
|
-
# **updatePlayer**
|
|
2110
|
-
> UpdatePlayerSuccessResponse updatePlayer(player)
|
|
2111
|
-
|
|
2112
|
-
Update an existing device in one of your OneSignal apps
|
|
2113
|
-
|
|
2114
|
-
### Example
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
```typescript
|
|
2118
|
-
import { } from '';
|
|
2119
|
-
import * as fs from 'fs';
|
|
2120
|
-
|
|
2121
|
-
const configuration = .createConfiguration();
|
|
2122
|
-
const apiInstance = new .DefaultApi(configuration);
|
|
2123
|
-
|
|
2124
|
-
let body:.DefaultApiUpdatePlayerRequest = {
|
|
2125
|
-
// string | Player\'s OneSignal ID
|
|
2126
|
-
playerId: "player_id_example",
|
|
2127
|
-
// Player
|
|
2128
|
-
player: {
|
|
2129
|
-
app_id: "app_id_example",
|
|
2130
|
-
device_type: 1,
|
|
2131
|
-
external_user_id: "external_user_id_example",
|
|
2132
|
-
external_user_id_auth_hash: "external_user_id_auth_hash_example",
|
|
2133
|
-
email_auth_hash: "email_auth_hash_example",
|
|
2134
|
-
identifier: "identifier_example",
|
|
2135
|
-
language: "language_example",
|
|
2136
|
-
timezone: 1,
|
|
2137
|
-
game_version: "game_version_example",
|
|
2138
|
-
device_model: "device_model_example",
|
|
2139
|
-
device_os: "device_os_example",
|
|
2140
|
-
ad_id: "ad_id_example",
|
|
2141
|
-
sdk: "sdk_example",
|
|
2142
|
-
session_count: 1,
|
|
2143
|
-
tags: {},
|
|
2144
|
-
amount_spent: 3.14,
|
|
2145
|
-
created_at: 1,
|
|
2146
|
-
playtime: 1,
|
|
2147
|
-
badge_count: 1,
|
|
2148
|
-
last_active: 1,
|
|
2149
|
-
notification_types: 1,
|
|
2150
|
-
test_type: 1,
|
|
2151
|
-
long: 3.14,
|
|
2152
|
-
lat: 3.14,
|
|
2153
|
-
country: "country_example",
|
|
2154
|
-
},
|
|
2155
|
-
};
|
|
2156
|
-
|
|
2157
|
-
apiInstance.updatePlayer(body).then((data:any) => {
|
|
2158
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
2159
|
-
}).catch((error:any) => console.error(error));
|
|
2160
|
-
```
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
### Parameters
|
|
2164
|
-
|
|
2165
|
-
Name | Type | Description | Notes
|
|
2166
|
-
------------- | ------------- | ------------- | -------------
|
|
2167
|
-
**player** | **Player**| |
|
|
2168
|
-
**playerId** | [**string**] | Player\'s OneSignal ID | defaults to undefined
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
### Return type
|
|
2172
|
-
|
|
2173
|
-
**UpdatePlayerSuccessResponse**
|
|
2174
|
-
|
|
2175
|
-
### Authorization
|
|
2176
|
-
|
|
2177
|
-
[app_key](README.md#app_key)
|
|
1976
|
+
[rest_api_key](README.md#rest_api_key)
|
|
2178
1977
|
|
|
2179
1978
|
### HTTP request headers
|
|
2180
1979
|
|
|
@@ -2187,73 +1986,12 @@ Name | Type | Description | Notes
|
|
|
2187
1986
|
|-------------|-------------|------------------|
|
|
2188
1987
|
**200** | OK | - |
|
|
2189
1988
|
**400** | Bad Request | - |
|
|
2190
|
-
|
|
2191
|
-
[[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)
|
|
2192
|
-
|
|
2193
|
-
# **updatePlayerTags**
|
|
2194
|
-
> UpdatePlayerTagsSuccessResponse updatePlayerTags()
|
|
2195
|
-
|
|
2196
|
-
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\" }
|
|
2197
|
-
|
|
2198
|
-
### Example
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
```typescript
|
|
2202
|
-
import { } from '';
|
|
2203
|
-
import * as fs from 'fs';
|
|
2204
|
-
|
|
2205
|
-
const configuration = .createConfiguration();
|
|
2206
|
-
const apiInstance = new .DefaultApi(configuration);
|
|
2207
|
-
|
|
2208
|
-
let body:.DefaultApiUpdatePlayerTagsRequest = {
|
|
2209
|
-
// string | The OneSignal App ID the user record is found under.
|
|
2210
|
-
appId: "app_id_example",
|
|
2211
|
-
// string | The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated.
|
|
2212
|
-
externalUserId: "external_user_id_example",
|
|
2213
|
-
// UpdatePlayerTagsRequestBody (optional)
|
|
2214
|
-
updatePlayerTagsRequestBody: {
|
|
2215
|
-
tags: {},
|
|
2216
|
-
},
|
|
2217
|
-
};
|
|
2218
|
-
|
|
2219
|
-
apiInstance.updatePlayerTags(body).then((data:any) => {
|
|
2220
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
2221
|
-
}).catch((error:any) => console.error(error));
|
|
2222
|
-
```
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
### Parameters
|
|
2226
|
-
|
|
2227
|
-
Name | Type | Description | Notes
|
|
2228
|
-
------------- | ------------- | ------------- | -------------
|
|
2229
|
-
**updatePlayerTagsRequestBody** | **UpdatePlayerTagsRequestBody**| |
|
|
2230
|
-
**appId** | [**string**] | The OneSignal App ID the user record is found under. | defaults to undefined
|
|
2231
|
-
**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
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
### Return type
|
|
2235
|
-
|
|
2236
|
-
**UpdatePlayerTagsSuccessResponse**
|
|
2237
|
-
|
|
2238
|
-
### Authorization
|
|
2239
|
-
|
|
2240
|
-
[app_key](README.md#app_key)
|
|
2241
|
-
|
|
2242
|
-
### HTTP request headers
|
|
2243
|
-
|
|
2244
|
-
- **Content-Type**: application/json
|
|
2245
|
-
- **Accept**: application/json
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
### HTTP response details
|
|
2249
|
-
| Status code | Description | Response headers |
|
|
2250
|
-
|-------------|-------------|------------------|
|
|
2251
|
-
**200** | OK | - |
|
|
1989
|
+
**429** | Rate Limit Exceeded | - |
|
|
2252
1990
|
|
|
2253
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)
|
|
2254
1992
|
|
|
2255
1993
|
# **updateSubscription**
|
|
2256
|
-
> void updateSubscription(
|
|
1994
|
+
> void updateSubscription(subscriptionBody)
|
|
2257
1995
|
|
|
2258
1996
|
Updates an existing Subscription’s properties.
|
|
2259
1997
|
|
|
@@ -2272,23 +2010,23 @@ let body:.DefaultApiUpdateSubscriptionRequest = {
|
|
|
2272
2010
|
appId: "app_id_example",
|
|
2273
2011
|
// string
|
|
2274
2012
|
subscriptionId: "subscription_id_example",
|
|
2275
|
-
//
|
|
2276
|
-
|
|
2013
|
+
// SubscriptionBody
|
|
2014
|
+
subscriptionBody: {
|
|
2277
2015
|
subscription: {
|
|
2278
2016
|
id: "id_example",
|
|
2279
2017
|
type: "iOSPush",
|
|
2280
2018
|
token: "token_example",
|
|
2281
2019
|
enabled: true,
|
|
2282
|
-
notification_types:
|
|
2283
|
-
session_time:
|
|
2284
|
-
session_count:
|
|
2020
|
+
notification_types: 1,
|
|
2021
|
+
session_time: 1,
|
|
2022
|
+
session_count: 1,
|
|
2285
2023
|
sdk: "sdk_example",
|
|
2286
2024
|
device_model: "device_model_example",
|
|
2287
2025
|
device_os: "device_os_example",
|
|
2288
2026
|
rooted: true,
|
|
2289
|
-
test_type:
|
|
2027
|
+
test_type: 1,
|
|
2290
2028
|
app_version: "app_version_example",
|
|
2291
|
-
net_type:
|
|
2029
|
+
net_type: 1,
|
|
2292
2030
|
carrier: "carrier_example",
|
|
2293
2031
|
web_auth: "web_auth_example",
|
|
2294
2032
|
web_p256: "web_p256_example",
|
|
@@ -2306,7 +2044,7 @@ apiInstance.updateSubscription(body).then((data:any) => {
|
|
|
2306
2044
|
|
|
2307
2045
|
Name | Type | Description | Notes
|
|
2308
2046
|
------------- | ------------- | ------------- | -------------
|
|
2309
|
-
**
|
|
2047
|
+
**subscriptionBody** | **SubscriptionBody**| |
|
|
2310
2048
|
**appId** | [**string**] | | defaults to undefined
|
|
2311
2049
|
**subscriptionId** | [**string**] | | defaults to undefined
|
|
2312
2050
|
|
|
@@ -2317,23 +2055,27 @@ Name | Type | Description | Notes
|
|
|
2317
2055
|
|
|
2318
2056
|
### Authorization
|
|
2319
2057
|
|
|
2320
|
-
[
|
|
2058
|
+
[rest_api_key](README.md#rest_api_key)
|
|
2321
2059
|
|
|
2322
2060
|
### HTTP request headers
|
|
2323
2061
|
|
|
2324
2062
|
- **Content-Type**: application/json
|
|
2325
|
-
- **Accept**:
|
|
2063
|
+
- **Accept**: application/json
|
|
2326
2064
|
|
|
2327
2065
|
|
|
2328
2066
|
### HTTP response details
|
|
2329
2067
|
| Status code | Description | Response headers |
|
|
2330
2068
|
|-------------|-------------|------------------|
|
|
2331
|
-
**
|
|
2069
|
+
**200** | OK | - |
|
|
2070
|
+
**400** | Bad Request | - |
|
|
2071
|
+
**404** | Not Found | - |
|
|
2072
|
+
**409** | Conflict | - |
|
|
2073
|
+
**429** | Rate Limit Exceeded | - |
|
|
2332
2074
|
|
|
2333
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)
|
|
2334
2076
|
|
|
2335
2077
|
# **updateUser**
|
|
2336
|
-
>
|
|
2078
|
+
> PropertiesBody updateUser(updateUserRequest)
|
|
2337
2079
|
|
|
2338
2080
|
Updates an existing User’s properties.
|
|
2339
2081
|
|
|
@@ -2363,29 +2105,29 @@ let body:.DefaultApiUpdateUserRequest = {
|
|
|
2363
2105
|
lat: 3.14,
|
|
2364
2106
|
long: 3.14,
|
|
2365
2107
|
country: "country_example",
|
|
2366
|
-
first_active:
|
|
2367
|
-
last_active:
|
|
2108
|
+
first_active: 1,
|
|
2109
|
+
last_active: 1,
|
|
2368
2110
|
amount_spent: 3.14,
|
|
2369
2111
|
purchases: [
|
|
2370
2112
|
{
|
|
2371
2113
|
sku: "sku_example",
|
|
2372
2114
|
amount: "amount_example",
|
|
2373
2115
|
iso: "iso_example",
|
|
2374
|
-
count:
|
|
2116
|
+
count: 1,
|
|
2375
2117
|
},
|
|
2376
2118
|
],
|
|
2377
2119
|
ip: "ip_example",
|
|
2378
2120
|
},
|
|
2379
2121
|
refresh_device_metadata: false,
|
|
2380
2122
|
deltas: {
|
|
2381
|
-
session_time:
|
|
2382
|
-
session_count:
|
|
2123
|
+
session_time: 1,
|
|
2124
|
+
session_count: 1,
|
|
2383
2125
|
purchases: [
|
|
2384
2126
|
{
|
|
2385
2127
|
sku: "sku_example",
|
|
2386
2128
|
amount: "amount_example",
|
|
2387
2129
|
iso: "iso_example",
|
|
2388
|
-
count:
|
|
2130
|
+
count: 1,
|
|
2389
2131
|
},
|
|
2390
2132
|
],
|
|
2391
2133
|
},
|
|
@@ -2410,11 +2152,11 @@ Name | Type | Description | Notes
|
|
|
2410
2152
|
|
|
2411
2153
|
### Return type
|
|
2412
2154
|
|
|
2413
|
-
**
|
|
2155
|
+
**PropertiesBody**
|
|
2414
2156
|
|
|
2415
2157
|
### Authorization
|
|
2416
2158
|
|
|
2417
|
-
[
|
|
2159
|
+
[rest_api_key](README.md#rest_api_key)
|
|
2418
2160
|
|
|
2419
2161
|
### HTTP request headers
|
|
2420
2162
|
|
|
@@ -2426,6 +2168,9 @@ Name | Type | Description | Notes
|
|
|
2426
2168
|
| Status code | Description | Response headers |
|
|
2427
2169
|
|-------------|-------------|------------------|
|
|
2428
2170
|
**202** | ACCEPTED | - |
|
|
2171
|
+
**400** | Bad Request | - |
|
|
2172
|
+
**409** | Conflict | - |
|
|
2173
|
+
**429** | Rate Limit Exceeded | - |
|
|
2429
2174
|
|
|
2430
2175
|
[[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)
|
|
2431
2176
|
|