Notification Hubs - Debug Send

Test send a push notification.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/debugsend?api-version=2023-09-01

URI Parameters

Name In Required Type Description
namespaceName
path True

string

Namespace name

Regex pattern: ^[a-zA-Z][a-zA-Z0-9-]*$

notificationHubName
path True

string

Notification Hub name

Regex pattern: ^[a-zA-Z][a-zA-Z0-9-./_]*$

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

uuid

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

The API version to use for this operation.

Responses

Name Type Description
200 OK

DebugSendResponse

Success

Other Status Codes

ErrorResponse

Error code with reason.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

NotificationHubs_DebugSend

Sample request

POST https://management.azure.com/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/nh-sdk-hub/debugsend?api-version=2023-09-01

Sample response

{
  "properties": {
    "success": 0,
    "failure": 0,
    "results": []
  },
  "id": "/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/test",
  "name": "test",
  "type": "Microsoft.NotificationHubs/namespaces/notificationHubs/debugSend"
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

DebugSendResponse

Description of a NotificationHub Resource.

DebugSendResult

Result of DebugSend operations.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

RegistrationResult

Notification result for a single registration.

systemData

Metadata pertaining to creation and last modification of the resource.

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

DebugSendResponse

Description of a NotificationHub Resource.

Name Type Description
id

string

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

location

string

Deprecated - only for compatibility.

name

string

The name of the resource

properties

DebugSendResult

Result of DebugSend operations.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Deprecated - only for compatibility.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

DebugSendResult

Result of DebugSend operations.

Name Type Description
failure

integer

Gets or sets send failure

results

RegistrationResult[]

Gets or sets actual failure description

success

integer

Gets or sets successful send

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

RegistrationResult

Notification result for a single registration.

Name Type Description
applicationPlatform

string

PNS type.

outcome

string

Notification outcome.

pnsHandle

string

PNS handle.

registrationId

string

Registration id.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.