blob: d68b9fa42037059705092fb84a490caa8f4f2cde [file] [log] [blame]
{
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/cloud-platform": {
"description": "View and manage your data across Google Cloud Platform services"
}
}
}
},
"basePath": "",
"baseUrl": "https://fcm.googleapis.com/",
"batchPath": "batch",
"canonicalName": "Firebase Cloud Messaging",
"description": "FCM send API that provides a cross-platform messaging solution to reliably deliver messages at no cost.",
"discoveryVersion": "v1",
"documentationLink": "https://firebase.google.com/docs/cloud-messaging",
"fullyEncodeReservedExpansion": true,
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
},
"id": "fcm:v1",
"kind": "discovery#restDescription",
"name": "fcm",
"ownerDomain": "google.com",
"ownerName": "Google",
"parameters": {
"$.xgafv": {
"description": "V1 error format.",
"enum": [
"1",
"2"
],
"enumDescriptions": [
"v1 error format",
"v2 error format"
],
"location": "query",
"type": "string"
},
"access_token": {
"description": "OAuth access token.",
"location": "query",
"type": "string"
},
"alt": {
"default": "json",
"description": "Data format for response.",
"enum": [
"json",
"media",
"proto"
],
"enumDescriptions": [
"Responses with Content-Type of application/json",
"Media download with context-dependent Content-Type",
"Responses with Content-Type of application/x-protobuf"
],
"location": "query",
"type": "string"
},
"callback": {
"description": "JSONP",
"location": "query",
"type": "string"
},
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"location": "query",
"type": "string"
},
"key": {
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
"location": "query",
"type": "string"
},
"oauth_token": {
"description": "OAuth 2.0 token for the current user.",
"location": "query",
"type": "string"
},
"prettyPrint": {
"default": "true",
"description": "Returns response with indentations and line breaks.",
"location": "query",
"type": "boolean"
},
"quotaUser": {
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
"location": "query",
"type": "string"
},
"uploadType": {
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
"location": "query",
"type": "string"
},
"upload_protocol": {
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
"location": "query",
"type": "string"
}
},
"protocol": "rest",
"resources": {
"projects": {
"resources": {
"messages": {
"methods": {
"send": {
"description": "Send a message to specified target (a registration token, topic\nor condition).",
"flatPath": "v1/projects/{projectsId}/messages:send",
"httpMethod": "POST",
"id": "fcm.projects.messages.send",
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Required. It contains the Firebase project id (i.e. the unique identifier\nfor your Firebase project), in the format of `projects/{project_id}`.\nFor legacy support, the numeric project number with no padding is also\nsupported in the format of `projects/{project_number}`.",
"location": "path",
"pattern": "^projects/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/messages:send",
"request": {
"$ref": "SendMessageRequest"
},
"response": {
"$ref": "Message"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
}
}
}
},
"revision": "20190711",
"rootUrl": "https://fcm.googleapis.com/",
"schemas": {
"AndroidConfig": {
"description": "Android specific options for messages sent through\n[FCM connection server](https://goo.gl/4GLdUl).",
"id": "AndroidConfig",
"properties": {
"collapseKey": {
"description": "An identifier of a group of messages that can be collapsed, so that only\nthe last message gets sent when delivery can be resumed. A maximum of 4\ndifferent collapse keys is allowed at any given time.",
"type": "string"
},
"data": {
"additionalProperties": {
"type": "string"
},
"description": "Arbitrary key/value payload. If present, it will override\ngoogle.firebase.fcm.v1.Message.data.",
"type": "object"
},
"fcmOptions": {
"$ref": "AndroidFcmOptions",
"description": "Options for features provided by the FCM SDK for Android."
},
"notification": {
"$ref": "AndroidNotification",
"description": "Notification to send to android devices."
},
"priority": {
"description": "Message priority. Can take \"normal\" and \"high\" values.\nFor more information, see [Setting the priority of a\nmessage](https://goo.gl/GjONJv).",
"enum": [
"NORMAL",
"HIGH"
],
"enumDescriptions": [
"Default priority for data messages. Normal priority messages won't open\nnetwork connections on a sleeping device, and their delivery may be\ndelayed to conserve the battery. For less time-sensitive messages, such\nas notifications of new email or other data to sync, choose normal\ndelivery priority.",
"Default priority for notification messages. FCM attempts to deliver high\npriority messages immediately, allowing the FCM service to wake a\nsleeping device when possible and open a network connection to your app\nserver. Apps with instant messaging, chat, or voice call alerts, for\nexample, generally need to open a network connection and make sure FCM\ndelivers the message to the device without delay. Set high priority if\nthe message is time-critical and requires the user's immediate\ninteraction, but beware that setting your messages to high priority\ncontributes more to battery drain compared with normal priority messages."
],
"type": "string"
},
"restrictedPackageName": {
"description": "Package name of the application where the registration token must match in\norder to receive the message.",
"type": "string"
},
"ttl": {
"description": "How long (in seconds) the message should be kept in FCM storage if the\ndevice is offline. The maximum time to live supported is 4 weeks, and the\ndefault value is 4 weeks if not set. Set it to 0 if want to send the\nmessage immediately.\nIn JSON format, the Duration type is encoded as a string rather than an\nobject, where the string ends in the suffix \"s\" (indicating seconds) and\nis preceded by the number of seconds, with nanoseconds expressed as\nfractional seconds. For example, 3 seconds with 0 nanoseconds should be\nencoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should\nbe expressed in JSON format as \"3.000000001s\". The ttl will be rounded down\nto the nearest second.",
"format": "google-duration",
"type": "string"
}
},
"type": "object"
},
"AndroidFcmOptions": {
"description": "Options for features provided by the FCM SDK for Android.",
"id": "AndroidFcmOptions",
"properties": {
"analyticsLabel": {
"description": "Label associated with the message's analytics data.",
"type": "string"
}
},
"type": "object"
},
"AndroidNotification": {
"description": "Notification to send to android devices.",
"id": "AndroidNotification",
"properties": {
"body": {
"description": "The notification's body text. If present, it will override\ngoogle.firebase.fcm.v1.Notification.body.",
"type": "string"
},
"bodyLocArgs": {
"description": "Variable string values to be used in place of the format specifiers in\nbody_loc_key to use to localize the body text to the user's current\nlocalization.\nSee [Formatting and Styling](https://goo.gl/MalYE3) for more information.",
"items": {
"type": "string"
},
"type": "array"
},
"bodyLocKey": {
"description": "The key to the body string in the app's string resources to use to localize\nthe body text to the user's current localization.\nSee [String Resources](https://goo.gl/NdFZGI) for more information.",
"type": "string"
},
"channelId": {
"description": "The [notification's channel\nid](https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels)\n(new in Android O). The app must create a channel with this channel ID\nbefore any notification with this channel ID is received. If you don't send\nthis channel ID in the request, or if the channel ID provided has not yet\nbeen created by the app, FCM uses the channel ID specified in the app\nmanifest.",
"type": "string"
},
"clickAction": {
"description": "The action associated with a user click on the notification.\nIf specified, an activity with a matching intent filter is launched when\na user clicks on the notification.",
"type": "string"
},
"color": {
"description": "The notification's icon color, expressed in #rrggbb format.",
"type": "string"
},
"icon": {
"description": "The notification's icon.\nSets the notification icon to myicon for drawable resource myicon.\nIf you don't send this key in the request, FCM displays the launcher icon\nspecified in your app manifest.",
"type": "string"
},
"image": {
"description": "Contains the URL of an image that is going to be displayed in a\nnotification. If present, it will override\ngoogle.firebase.fcm.v1.Notification.image.",
"type": "string"
},
"sound": {
"description": "The sound to play when the device receives the notification.\nSupports \"default\" or the filename of a sound resource bundled in the app.\nSound files must reside in /res/raw/.",
"type": "string"
},
"tag": {
"description": "Identifier used to replace existing notifications in the notification\ndrawer.\nIf not specified, each request creates a new notification.\nIf specified and a notification with the same tag is already being shown,\nthe new notification replaces the existing one in the notification drawer.",
"type": "string"
},
"title": {
"description": "The notification's title. If present, it will override\ngoogle.firebase.fcm.v1.Notification.title.",
"type": "string"
},
"titleLocArgs": {
"description": "Variable string values to be used in place of the format specifiers in\ntitle_loc_key to use to localize the title text to the user's current\nlocalization.\nSee [Formatting and Styling](https://goo.gl/MalYE3) for more information.",
"items": {
"type": "string"
},
"type": "array"
},
"titleLocKey": {
"description": "The key to the title string in the app's string resources to use to\nlocalize the title text to the user's current localization.\nSee [String Resources](https://goo.gl/NdFZGI) for more information.",
"type": "string"
}
},
"type": "object"
},
"ApnsConfig": {
"description": "[Apple Push Notification Service](https://goo.gl/MXRTPa) specific options.",
"id": "ApnsConfig",
"properties": {
"fcmOptions": {
"$ref": "ApnsFcmOptions",
"description": "Options for features provided by the FCM SDK for iOS."
},
"headers": {
"additionalProperties": {
"type": "string"
},
"description": "HTTP request headers defined in Apple Push Notification Service. Refer to\n[APNs request headers](https://goo.gl/C6Yhia) for\nsupported headers, e.g. \"apns-priority\": \"10\".",
"type": "object"
},
"payload": {
"additionalProperties": {
"description": "Properties of the object.",
"type": "any"
},
"description": "APNs payload as a JSON object, including both `aps` dictionary and custom\npayload. See [Payload Key Reference](https://goo.gl/32Pl5W).\nIf present, it overrides google.firebase.fcm.v1.Notification.title\nand google.firebase.fcm.v1.Notification.body.",
"type": "object"
}
},
"type": "object"
},
"ApnsFcmOptions": {
"description": "Options for features provided by the FCM SDK for iOS.",
"id": "ApnsFcmOptions",
"properties": {
"analyticsLabel": {
"description": "Label associated with the message's analytics data.",
"type": "string"
},
"image": {
"description": "Contains the URL of an image that is going to be displayed in a\nnotification. If present, it will override\ngoogle.firebase.fcm.v1.Notification.image.",
"type": "string"
}
},
"type": "object"
},
"FcmOptions": {
"description": "Platform independent options for features provided by the FCM SDKs.",
"id": "FcmOptions",
"properties": {
"analyticsLabel": {
"description": "Label associated with the message's analytics data.",
"type": "string"
}
},
"type": "object"
},
"Message": {
"description": "Message to send by Firebase Cloud Messaging Service.",
"id": "Message",
"properties": {
"android": {
"$ref": "AndroidConfig",
"description": "Input only. Android specific options for messages sent through\n[FCM connection server](https://goo.gl/4GLdUl)."
},
"apns": {
"$ref": "ApnsConfig",
"description": "Input only. [Apple Push Notification Service](https://goo.gl/MXRTPa)\nspecific options."
},
"condition": {
"description": "Condition to send a message to,\ne.g. \"'foo' in topics \u0026\u0026 'bar' in topics\".",
"type": "string"
},
"data": {
"additionalProperties": {
"type": "string"
},
"description": "Input only. Arbitrary key/value payload.",
"type": "object"
},
"fcmOptions": {
"$ref": "FcmOptions",
"description": "Input only. Template for FCM SDK feature options to use across all\nplatforms."
},
"name": {
"description": "Output Only. The identifier of the message sent, in the format of\n`projects/*/messages/{message_id}`.",
"type": "string"
},
"notification": {
"$ref": "Notification",
"description": "Input only. Basic notification template to use across all platforms."
},
"token": {
"description": "Registration token to send a message to.",
"type": "string"
},
"topic": {
"description": "Topic name to send a message to, e.g. \"weather\".\nNote: \"/topics/\" prefix should not be provided.",
"type": "string"
},
"webpush": {
"$ref": "WebpushConfig",
"description": "Input only. [Webpush protocol](https://tools.ietf.org/html/rfc8030)\noptions."
}
},
"type": "object"
},
"Notification": {
"description": "Basic notification template to use across all platforms.",
"id": "Notification",
"properties": {
"body": {
"description": "The notification's body text.",
"type": "string"
},
"image": {
"description": "Contains the URL of an image that is going to be downloaded on the device\nand displayed in a notification.\nJPEG, PNG, BMP have full support across platforms. Animated GIF and video\nonly work on iOS. WebP and HEIF have varying levels of support across\nplatforms and platform versions.\nAndroid has 1MB image size limit.\nQuota usage and implications/costs for hosting image on Firebase Storage:\nhttps://firebase.google.com/pricing",
"type": "string"
},
"title": {
"description": "The notification's title.",
"type": "string"
}
},
"type": "object"
},
"SendMessageRequest": {
"description": "Request to send a message to specified target.",
"id": "SendMessageRequest",
"properties": {
"message": {
"$ref": "Message",
"description": "Required. Message to send."
},
"validateOnly": {
"description": "Flag for testing the request without actually delivering the message.",
"type": "boolean"
}
},
"type": "object"
},
"WebpushConfig": {
"description": "[Webpush protocol](https://tools.ietf.org/html/rfc8030) options.",
"id": "WebpushConfig",
"properties": {
"data": {
"additionalProperties": {
"type": "string"
},
"description": "Arbitrary key/value payload. If present, it will override\ngoogle.firebase.fcm.v1.Message.data.",
"type": "object"
},
"fcmOptions": {
"$ref": "WebpushFcmOptions",
"description": "Options for features provided by the FCM SDK for Web."
},
"headers": {
"additionalProperties": {
"type": "string"
},
"description": "HTTP headers defined in webpush protocol. Refer to\n[Webpush protocol](https://tools.ietf.org/html/rfc8030#section-5) for\nsupported headers, e.g. \"TTL\": \"15\".",
"type": "object"
},
"notification": {
"additionalProperties": {
"description": "Properties of the object.",
"type": "any"
},
"description": "Web Notification options as a JSON object. Supports Notification instance\nproperties as defined in [Web Notification\nAPI](https://developer.mozilla.org/en-US/docs/Web/API/Notification). If\npresent, \"title\" and \"body\" fields override\n[google.firebase.fcm.v1.Notification.title] and\n[google.firebase.fcm.v1.Notification.body].",
"type": "object"
}
},
"type": "object"
},
"WebpushFcmOptions": {
"description": "Options for features provided by the FCM SDK for Web.",
"id": "WebpushFcmOptions",
"properties": {
"link": {
"description": "The link to open when the user clicks on the notification.\nFor all URL values, HTTPS is required.",
"type": "string"
}
},
"type": "object"
}
},
"servicePath": "",
"title": "Firebase Cloud Messaging API",
"version": "v1",
"version_module": true
}