Skip to content

Commit ead37ec

Browse files
onesignal-deployOneSignal
andauthored
docs: add v5.4.0 package updates (#44)
Co-authored-by: OneSignal <noreply@onesignal.com>
1 parent ce16107 commit ead37ec

1 file changed

Lines changed: 76 additions & 0 deletions

File tree

docs/DefaultApi.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Stop a scheduled or currently outgoing notification
5858

5959
Used to stop a scheduled or currently outgoing notification
6060

61+
6162
### Parameters
6263

6364

@@ -89,6 +90,7 @@ Copy template to another app
8990

9091
Copy a template to a destination app.
9192

93+
9294
### Parameters
9395

9496

@@ -121,6 +123,7 @@ Name | Type | Description | Required | Notes
121123

122124
Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
123125

126+
124127
### Parameters
125128

126129

@@ -154,6 +157,7 @@ Name | Type | Description | Required | Notes
154157

155158
Upserts one or more Aliases for the User identified by :subscription_id.
156159

160+
157161
### Parameters
158162

159163

@@ -186,6 +190,7 @@ Create API key
186190

187191
Use this API to create a new App API Key (also called a Rich Authentication Token) for a specific OneSignal app. These keys are used to authenticate API requests at the app level and offer enhanced security features, including optional IP allowlisting.
188192

193+
189194
### Parameters
190195

191196

@@ -217,6 +222,7 @@ Create an app
217222

218223
Creates a new OneSignal app
219224

225+
220226
### Parameters
221227

222228

@@ -247,6 +253,7 @@ Create custom events
247253

248254
The Custom Events API allows you to record user events. Custom events can represent any action users take in your application, such as completing a purchase, viewing content, or achieving milestones.
249255

256+
250257
### Parameters
251258

252259

@@ -278,6 +285,39 @@ Create notification
278285

279286
Sends notifications to your users
280287

288+
### Example
289+
290+
```rust
291+
use onesignal_rust_api::apis::configuration::Configuration;
292+
use onesignal_rust_api::apis::default_api;
293+
use onesignal_rust_api::models::notification::TargetChannelType;
294+
use onesignal_rust_api::models::{LanguageStringMap, Notification};
295+
296+
#[tokio::main]
297+
async fn main() {
298+
let mut configuration = Configuration::new();
299+
configuration.rest_api_key_token = Some("YOUR_REST_API_KEY".to_string());
300+
301+
let mut notification = Notification::new("YOUR_APP_ID".to_string());
302+
notification.contents = Some(Box::new(LanguageStringMap {
303+
en: Some("Hello from OneSignal!".to_string()),
304+
..Default::default()
305+
}));
306+
let mut aliases = std::collections::HashMap::new();
307+
aliases.insert(
308+
"external_id".to_string(),
309+
vec!["YOUR_USER_EXTERNAL_ID".to_string()],
310+
);
311+
notification.include_aliases = Some(aliases);
312+
notification.target_channel = Some(TargetChannelType::Push);
313+
314+
match default_api::create_notification(&configuration, notification).await {
315+
Ok(resp) => println!("{:?}", resp),
316+
Err(e) => eprintln!("create_notification failed: {:?}", e),
317+
}
318+
}
319+
```
320+
281321
### Parameters
282322

283323

@@ -308,6 +348,7 @@ Create Segment
308348

309349
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. &#x1F6A7; 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.
310350

351+
311352
### Parameters
312353

313354

@@ -339,6 +380,7 @@ Name | Type | Description | Required | Notes
339380

340381
Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User.
341382

383+
342384
### Parameters
343385

344386

@@ -372,6 +414,7 @@ Create template
372414

373415
Create reusable message templates for push, email, and SMS channels.
374416

417+
375418
### Parameters
376419

377420

@@ -402,6 +445,7 @@ Name | Type | Description | Required | Notes
402445

403446
Creates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User.
404447

448+
405449
### Parameters
406450

407451

@@ -433,6 +477,7 @@ Name | Type | Description | Required | Notes
433477

434478
Deletes an alias by alias label
435479

480+
436481
### Parameters
437482

438483

@@ -466,6 +511,7 @@ Delete API key
466511

467512
Delete a specific Rich Authentication Token (App API Key) for a OneSignal app. Requires your Organization API Key and the token’s unique ID, not the token value itself.
468513

514+
469515
### Parameters
470516

471517

@@ -497,6 +543,7 @@ Delete Segment
497543

498544
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.
499545

546+
500547
### Parameters
501548

502549

@@ -528,6 +575,7 @@ Name | Type | Description | Required | Notes
528575

529576
Deletes the Subscription.
530577

578+
531579
### Parameters
532580

533581

@@ -559,6 +607,7 @@ Delete template
559607

560608
Delete a template by id.
561609

610+
562611
### Parameters
563612

564613

@@ -590,6 +639,7 @@ Name | Type | Description | Required | Notes
590639

591640
Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases
592641

642+
593643
### Parameters
594644

595645

@@ -622,6 +672,7 @@ Export CSV of Events
622672

623673
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.
624674

675+
625676
### Parameters
626677

627678

@@ -653,6 +704,7 @@ Export CSV of Subscriptions
653704

654705
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. &#x1F6A7; 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. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; 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. |
655706

707+
656708
### Parameters
657709

658710

@@ -684,6 +736,7 @@ Name | Type | Description | Required | Notes
684736

685737
Lists all Aliases for the User identified by (:alias_label, :alias_id).
686738

739+
687740
### Parameters
688741

689742

@@ -716,6 +769,7 @@ Name | Type | Description | Required | Notes
716769

717770
Lists all Aliases for the User identified by :subscription_id.
718771

772+
719773
### Parameters
720774

721775

@@ -747,6 +801,7 @@ View an app
747801

748802
View the details of a single OneSignal app
749803

804+
750805
### Parameters
751806

752807

@@ -777,6 +832,7 @@ View apps
777832

778833
View the details of all of your current OneSignal apps
779834

835+
780836
### Parameters
781837

782838
This endpoint does not need any parameter.
@@ -804,6 +860,7 @@ View notification
804860

805861
View the details of a single notification and outcomes associated with it
806862

863+
807864
### Parameters
808865

809866

@@ -835,6 +892,7 @@ Notification History
835892

836893
-> 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. &#x1F6A7; 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.
837894

895+
838896
### Parameters
839897

840898

@@ -866,6 +924,7 @@ View notifications
866924

867925
View the details of multiple notifications
868926

927+
869928
### Parameters
870929

871930

@@ -899,6 +958,7 @@ View Outcomes
899958

900959
View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it.
901960

961+
902962
### Parameters
903963

904964

@@ -934,6 +994,7 @@ Get Segments
934994

935995
Returns an array of segments from an app.
936996

997+
937998
### Parameters
938999

9391000

@@ -966,6 +1027,7 @@ Name | Type | Description | Required | Notes
9661027

9671028
Returns the User’s properties, Aliases, and Subscriptions.
9681029

1030+
9691031
### Parameters
9701032

9711033

@@ -998,6 +1060,7 @@ Rotate API key
9981060

9991061
Rotate a Rich Authentication Token (App API Key) for a OneSignal app. Rotating a key revokes the current token and generates a new one under the same configuration—ideal when a token is lost or compromised but you don’t want to recreate and reconfigure it from scratch.
10001062

1063+
10011064
### Parameters
10021065

10031066

@@ -1029,6 +1092,7 @@ Start Live Activity
10291092

10301093
Remotely start a Live Activity on iOS devices via OneSignal’s REST API.
10311094

1095+
10321096
### Parameters
10331097

10341098

@@ -1061,6 +1125,7 @@ Name | Type | Description | Required | Notes
10611125

10621126
Transfers this Subscription to the User identified by the identity in the payload.
10631127

1128+
10641129
### Parameters
10651130

10661131

@@ -1093,6 +1158,7 @@ Unsubscribe with token
10931158

10941159
Unsubscribe an email with a token when using your own custom email unsubscribe landing page
10951160

1161+
10961162
### Parameters
10971163

10981164

@@ -1125,6 +1191,7 @@ Update API key
11251191

11261192
Update a Rich Authentication Token (App API Key) for a OneSignal app.
11271193

1194+
11281195
### Parameters
11291196

11301197

@@ -1157,6 +1224,7 @@ Update an app
11571224

11581225
Updates the name or configuration settings of an existing OneSignal app
11591226

1227+
11601228
### Parameters
11611229

11621230

@@ -1188,6 +1256,7 @@ Update a Live Activity via Push
11881256

11891257
Updates a specified live activity.
11901258

1259+
11911260
### Parameters
11921261

11931262

@@ -1220,6 +1289,7 @@ Name | Type | Description | Required | Notes
12201289

12211290
Updates an existing Subscription’s properties.
12221291

1292+
12231293
### Parameters
12241294

12251295

@@ -1252,6 +1322,7 @@ Update subscription by token
12521322

12531323
Update properties on an existing OneSignal subscription using its token.
12541324

1325+
12551326
### Parameters
12561327

12571328

@@ -1285,6 +1356,7 @@ Update template
12851356

12861357
Update an existing template.
12871358

1359+
12881360
### Parameters
12891361

12901362

@@ -1317,6 +1389,7 @@ Name | Type | Description | Required | Notes
13171389

13181390
Updates an existing User’s properties.
13191391

1392+
13201393
### Parameters
13211394

13221395

@@ -1350,6 +1423,7 @@ View API keys
13501423

13511424
View the details of all of your current app API keys (Rich Authentication Token) for a single OneSignal app.
13521425

1426+
13531427
### Parameters
13541428

13551429

@@ -1380,6 +1454,7 @@ View template
13801454

13811455
Fetch a single template by id.
13821456

1457+
13831458
### Parameters
13841459

13851460

@@ -1411,6 +1486,7 @@ View templates
14111486

14121487
List templates for an app.
14131488

1489+
14141490
### Parameters
14151491

14161492

0 commit comments

Comments
 (0)