Skip to content

Commit 6966ac4

Browse files
author
OneSignal
committed
Update Node API
1 parent 3b399a3 commit 6966ac4

27 files changed

+557
-277
lines changed

DefaultApi.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Method | HTTP request | Description
2626

2727

2828
# **cancelNotification**
29-
> InlineResponse2001 cancelNotification()
29+
> CancelNotificationSuccessResponse cancelNotification()
3030
3131
Used to stop a scheduled or currently outgoing notification
3232

@@ -63,7 +63,7 @@ Name | Type | Description | Notes
6363

6464
### Return type
6565

66-
**InlineResponse2001**
66+
**CancelNotificationSuccessResponse**
6767

6868
### Authorization
6969

@@ -155,7 +155,7 @@ Name | Type | Description | Notes
155155
[[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)
156156

157157
# **createNotification**
158-
> InlineResponse200 createNotification(notification)
158+
> CreateNotificationSuccessResponse createNotification(notification)
159159
160160
Sends notifications to your users
161161

@@ -189,7 +189,7 @@ Name | Type | Description | Notes
189189

190190
### Return type
191191

192-
**InlineResponse200**
192+
**CreateNotificationSuccessResponse**
193193

194194
### Authorization
195195

@@ -210,7 +210,7 @@ Name | Type | Description | Notes
210210
[[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)
211211

212212
# **createPlayer**
213-
> InlineResponse2005 createPlayer(player)
213+
> CreatePlayerSuccessResponse createPlayer(player)
214214
215215
Register a new device to one of your OneSignal apps 🚧 Don\'t use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won\'t work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. 🚧 iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds.
216216

@@ -270,7 +270,7 @@ Name | Type | Description | Notes
270270

271271
### Return type
272272

273-
**InlineResponse2005**
273+
**CreatePlayerSuccessResponse**
274274

275275
### Authorization
276276

@@ -290,7 +290,7 @@ Name | Type | Description | Notes
290290
[[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)
291291

292292
# **createSegments**
293-
> InlineResponse201 createSegments()
293+
> CreateSegmentSuccessResponse createSegments()
294294
295295
Create segments 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 Segments endpoint and re-create it with this endpoint to edit.
296296

@@ -333,7 +333,7 @@ Name | Type | Description | Notes
333333

334334
### Return type
335335

336-
**InlineResponse201**
336+
**CreateSegmentSuccessResponse**
337337

338338
### Authorization
339339

@@ -355,7 +355,7 @@ Name | Type | Description | Notes
355355
[[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)
356356

357357
# **deletePlayer**
358-
> InlineResponse2007 deletePlayer()
358+
> DeletePlayerSuccessResponse deletePlayer()
359359
360360
Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app.
361361

@@ -392,7 +392,7 @@ Name | Type | Description | Notes
392392

393393
### Return type
394394

395-
**InlineResponse2007**
395+
**DeletePlayerSuccessResponse**
396396

397397
### Authorization
398398

@@ -414,7 +414,7 @@ Name | Type | Description | Notes
414414
[[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)
415415

416416
# **deleteSegments**
417-
> InlineResponse2001 deleteSegments()
417+
> DeleteSegmentSuccessResponse deleteSegments()
418418
419419
Delete segments (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.
420420

@@ -451,7 +451,7 @@ Name | Type | Description | Notes
451451

452452
### Return type
453453

454-
**InlineResponse2001**
454+
**DeleteSegmentSuccessResponse**
455455

456456
### Authorization
457457

@@ -473,7 +473,7 @@ Name | Type | Description | Notes
473473
[[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)
474474

475475
# **exportPlayers**
476-
> InlineResponse2008 exportPlayers()
476+
> ExportPlayersSuccessResponse exportPlayers()
477477
478478
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. |
479479

@@ -516,7 +516,7 @@ Name | Type | Description | Notes
516516

517517
### Return type
518518

519-
**InlineResponse2008**
519+
**ExportPlayersSuccessResponse**
520520

521521
### Authorization
522522

@@ -696,7 +696,7 @@ Name | Type | Description | Notes
696696
[[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)
697697

698698
# **getNotificationHistory**
699-
> InlineResponse2002 getNotificationHistory(getNotificationRequestBody)
699+
> NotificationHistorySuccessResponse getNotificationHistory(getNotificationRequestBody)
700700
701701
-> 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.
702702

@@ -737,7 +737,7 @@ Name | Type | Description | Notes
737737

738738
### Return type
739739

740-
**InlineResponse2002**
740+
**NotificationHistorySuccessResponse**
741741

742742
### Authorization
743743

@@ -1085,7 +1085,7 @@ Name | Type | Description | Notes
10851085
[[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)
10861086

10871087
# **updatePlayer**
1088-
> InlineResponse2001 updatePlayer(player)
1088+
> UpdatePlayerSuccessResponse updatePlayer(player)
10891089
10901090
Update an existing device in one of your OneSignal apps
10911091

@@ -1148,7 +1148,7 @@ Name | Type | Description | Notes
11481148

11491149
### Return type
11501150

1151-
**InlineResponse2001**
1151+
**UpdatePlayerSuccessResponse**
11521152

11531153
### Authorization
11541154

@@ -1168,7 +1168,7 @@ Name | Type | Description | Notes
11681168
[[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)
11691169

11701170
# **updatePlayerTags**
1171-
> InlineResponse2001 updatePlayerTags()
1171+
> UpdatePlayerTagsSuccessResponse updatePlayerTags()
11721172
11731173
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\" }
11741174

@@ -1210,7 +1210,7 @@ Name | Type | Description | Notes
12101210

12111211
### Return type
12121212

1213-
**InlineResponse2001**
1213+
**UpdatePlayerTagsSuccessResponse**
12141214

12151215
### Authorization
12161216

0 commit comments

Comments
 (0)