Skip to content

Commit 387c690

Browse files
committed
Added /apps/{app_id} prefix for all new endpoints
1 parent 40b6bc3 commit 387c690

File tree

1 file changed

+117
-26
lines changed

1 file changed

+117
-26
lines changed

api.json

Lines changed: 117 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,22 +1639,7 @@
16391639
}]
16401640
},
16411641
"IdentityObject": {
1642-
"type": "object",
1643-
"properties": {
1644-
"onesignal_id": {
1645-
"type": "string",
1646-
"format": "uuid"
1647-
},
1648-
"external_id": {
1649-
"type": "string"
1650-
}
1651-
},
1652-
"additionalProperties": {
1653-
"type": "string"
1654-
},
1655-
"required": [
1656-
"onesignal_id"
1657-
]
1642+
"type": "object"
16581643
},
16591644
"PropertiesObject": {
16601645
"type": "object",
@@ -3015,7 +3000,7 @@
30153000
]
30163001
}
30173002
},
3018-
"/user": {
3003+
"/apps/{app_id}/user": {
30193004
"post": {
30203005
"operationId": "create_user",
30213006
"description": "Creates a User, optionally Subscriptions owned by the User as well as Aliases.\nAliases provided in the payload will be used to look up an existing User.",
@@ -3076,18 +3061,36 @@
30763061
}
30773062
}
30783063
},
3064+
"parameters": [
3065+
{
3066+
"in": "path",
3067+
"name": "app_id",
3068+
"required": true,
3069+
"schema": {
3070+
"type": "string"
3071+
}
3072+
}
3073+
],
30793074
"security": [
30803075
{
30813076
"app_key": []
30823077
}
30833078
]
30843079
}
30853080
},
3086-
"/user/by/{alias_label}/{alias_id}": {
3081+
"/apps/{app_id}/user/by/{alias_label}/{alias_id}": {
30873082
"get": {
30883083
"operationId": "fetch_user",
30893084
"description": "Returns the User’s properties, Aliases, and Subscriptions.",
30903085
"parameters": [
3086+
{
3087+
"in": "path",
3088+
"name": "app_id",
3089+
"required": true,
3090+
"schema": {
3091+
"type": "string"
3092+
}
3093+
},
30913094
{
30923095
"in": "path",
30933096
"name": "alias_label",
@@ -3127,6 +3130,14 @@
31273130
"operationId": "update_user",
31283131
"description": "Updates an existing User’s properties.",
31293132
"parameters": [
3133+
{
3134+
"in": "path",
3135+
"name": "app_id",
3136+
"required": true,
3137+
"schema": {
3138+
"type": "string"
3139+
}
3140+
},
31303141
{
31313142
"in": "header",
31323143
"name": "subscription_id",
@@ -3189,6 +3200,14 @@
31893200
"operationId": "delete_user",
31903201
"description": "Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases",
31913202
"parameters": [
3203+
{
3204+
"in": "path",
3205+
"name": "app_id",
3206+
"required": true,
3207+
"schema": {
3208+
"type": "string"
3209+
}
3210+
},
31923211
{
31933212
"in": "path",
31943213
"name": "alias_label",
@@ -3213,11 +3232,19 @@
32133232
}
32143233
}
32153234
},
3216-
"/user/by/{alias_label}/{alias_id}/identity": {
3217-
"put": {
3235+
"/apps/{app_id}/user/by/{alias_label}/{alias_id}/identity": {
3236+
"patch": {
32183237
"operationId": "identify_user_by_alias",
32193238
"description": "Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).",
32203239
"parameters": [
3240+
{
3241+
"in": "path",
3242+
"name": "app_id",
3243+
"required": true,
3244+
"schema": {
3245+
"type": "string"
3246+
}
3247+
},
32213248
{
32223249
"in": "path",
32233250
"name": "alias_label",
@@ -3298,6 +3325,14 @@
32983325
"operationId": "fetch_user_identity",
32993326
"description": "Lists all Aliases for the User identified by (:alias_label, :alias_id).",
33003327
"parameters": [
3328+
{
3329+
"in": "path",
3330+
"name": "app_id",
3331+
"required": true,
3332+
"schema": {
3333+
"type": "string"
3334+
}
3335+
},
33013336
{
33023337
"in": "path",
33033338
"name": "alias_label",
@@ -3334,11 +3369,19 @@
33343369
]
33353370
}
33363371
},
3337-
"/user/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete}": {
3372+
"/apps/{app_id}/user/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete}": {
33383373
"delete": {
33393374
"operationId": "delete_alias",
33403375
"description": "Deletes an alias by alias label",
33413376
"parameters": [
3377+
{
3378+
"in": "path",
3379+
"name": "app_id",
3380+
"required": true,
3381+
"schema": {
3382+
"type": "string"
3383+
}
3384+
},
33423385
{
33433386
"in": "path",
33443387
"name": "alias_label",
@@ -3383,11 +3426,19 @@
33833426
]
33843427
}
33853428
},
3386-
"/subscriptions/{subscription_id}": {
3429+
"/apps/{app_id}/subscriptions/{subscription_id}": {
33873430
"patch": {
33883431
"operationId": "update_subscription",
33893432
"description": "Updates an existing Subscription’s properties.",
33903433
"parameters": [
3434+
{
3435+
"in": "path",
3436+
"name": "app_id",
3437+
"required": true,
3438+
"schema": {
3439+
"type": "string"
3440+
}
3441+
},
33913442
{
33923443
"in": "path",
33933444
"name": "subscription_id",
@@ -3427,6 +3478,14 @@
34273478
"operationId": "delete_subscription",
34283479
"description": "Deletes the Subscription.",
34293480
"parameters": [
3481+
{
3482+
"in": "path",
3483+
"name": "app_id",
3484+
"required": true,
3485+
"schema": {
3486+
"type": "string"
3487+
}
3488+
},
34303489
{
34313490
"in": "path",
34323491
"name": "subscription_id",
@@ -3448,11 +3507,19 @@
34483507
]
34493508
}
34503509
},
3451-
"/subscriptions/{subscription_id}/identity": {
3510+
"/apps/{app_id}/subscriptions/{subscription_id}/identity": {
34523511
"get": {
34533512
"operationId": "fetch_aliases",
34543513
"description": "Lists all Aliases for the User identified by :subscription_id.",
34553514
"parameters": [
3515+
{
3516+
"in": "path",
3517+
"name": "app_id",
3518+
"required": true,
3519+
"schema": {
3520+
"type": "string"
3521+
}
3522+
},
34563523
{
34573524
"in": "path",
34583525
"name": "subscription_id",
@@ -3485,10 +3552,18 @@
34853552
}
34863553
]
34873554
},
3488-
"put": {
3555+
"patch": {
34893556
"operationId": "identify_user_by_subscription_id",
34903557
"description": "Upserts one or more Aliases for the User identified by :subscription_id.",
34913558
"parameters": [
3559+
{
3560+
"in": "path",
3561+
"name": "app_id",
3562+
"required": true,
3563+
"schema": {
3564+
"type": "string"
3565+
}
3566+
},
34923567
{
34933568
"in": "path",
34943569
"name": "subscription_id",
@@ -3532,11 +3607,19 @@
35323607
]
35333608
}
35343609
},
3535-
"/subscriptions/{subscription_id}/owner": {
3610+
"/apps/{app_id}/subscriptions/{subscription_id}/owner": {
35363611
"patch": {
35373612
"operationId": "transfer_subscription",
35383613
"description": "Transfers this Subscription to the User identified by the identity in the payload.",
35393614
"parameters": [
3615+
{
3616+
"in": "path",
3617+
"name": "app_id",
3618+
"required": true,
3619+
"schema": {
3620+
"type": "string"
3621+
}
3622+
},
35403623
{
35413624
"in": "path",
35423625
"name": "subscription_id",
@@ -3584,11 +3667,19 @@
35843667
]
35853668
}
35863669
},
3587-
"/subscriptions/{subscription_id}/iams": {
3670+
"/apps/{app_id}/subscriptions/{subscription_id}/iams": {
35883671
"get": {
35893672
"operationId": "get_eligible_iams",
35903673
"description": "Manifest of In-App Messages the Subscription is eligible to display by the SDK.",
35913674
"parameters": [
3675+
{
3676+
"in": "path",
3677+
"name": "app_id",
3678+
"required": true,
3679+
"schema": {
3680+
"type": "string"
3681+
}
3682+
},
35923683
{
35933684
"in": "path",
35943685
"name": "subscription_id",

0 commit comments

Comments
 (0)