Phone Numbers - Get Operation
Gets an operation by its id.
GET {endpoint}/phoneNumbers/operations/{operationId}?api-version=2025-06-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (url) |
The communication resource, for example https://resourcename.communication.azure.com |
|
operation
|
path | True |
string |
The id of the operation |
|
api-version
|
query | True |
string |
Version of API to invoke |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
When the operation is completed, query the final result of the operation using the URL specified in the 'Location' attribute in the response header. Headers Location: string |
|
| Other Status Codes |
Failure |
Examples
Get long running operation status by operation id
Sample request
GET https://resourcename.communication.azure.com//phoneNumbers/operations/search-my-operation-id?api-version=2025-06-01
Sample response
Location: /availablePhoneNumbers/searchResults/378ddf60-81be-452a-ba4f-613198ea6c28
{
"status": "succeeded",
"resourceLocation": "/availablePhoneNumbers/searchResults/378ddf60-81be-452a-ba4f-613198ea6c28",
"createdDateTime": "2020-11-19T16:31:49.048Z",
"id": "search-my-operation-id",
"operationType": "search",
"lastActionDateTime": "2020-11-19T22:31:49.048Z"
}
Definitions
| Name | Description |
|---|---|
|
Communication |
The Communication Services error. |
|
Communication |
The Communication Services error. |
|
Phone |
|
|
Phone |
Status of operation. |
|
Phone |
The type of operation, e.g. Search |
CommunicationError
The Communication Services error.
| Name | Type | Description |
|---|---|---|
| code |
string |
The error code. |
| details |
Further details about specific errors that led to this error. |
|
| innererror |
The inner error if any. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
CommunicationErrorResponse
The Communication Services error.
| Name | Type | Description |
|---|---|---|
| error |
The Communication Services error. |
PhoneNumberOperation
| Name | Type | Description |
|---|---|---|
| createdDateTime |
string (date-time) |
The date that the operation was created. |
| error |
The Communication Services error. |
|
| id |
string |
Id of operation. |
| lastActionDateTime |
string (date-time) |
The most recent date that the operation was changed. |
| operationType |
The type of operation, e.g. Search |
|
| resourceLocation |
string |
URL for retrieving the result of the operation, if any. |
| status |
Status of operation. |
PhoneNumberOperationStatus
Status of operation.
| Value | Description |
|---|---|
| notStarted | |
| running | |
| succeeded | |
| failed |
PhoneNumberOperationType
The type of operation, e.g. Search
| Value | Description |
|---|---|
| purchase | |
| releasePhoneNumber | |
| search | |
| updatePhoneNumberCapabilities | |
| reservationPurchase |