Phone Numbers - Get Operation
Gets an operation by its id.
GET {endpoint}/phoneNumbers/operations/{operationId}?api-version=2021-03-07
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
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=2021-03-07
Sample response
Location: /availablePhoneNumbers/searchResults/378ddf60-81be-452a-ba4f-613198ea6c28
{
"status": "succeeded",
"resourceLocation": "",
"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 |
Long running operation. |
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
Long running operation.
Name | Type | Description |
---|---|---|
createdDateTime |
string |
The date that the operation was created. |
error |
The Communication Services error. |
|
id |
string |
Id of operation. |
lastActionDateTime |
string |
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.
Name | Type | Description |
---|---|---|
failed |
string |
|
notStarted |
string |
|
running |
string |
|
succeeded |
string |
PhoneNumberOperationType
The type of operation, e.g. Search
Name | Type | Description |
---|---|---|
purchase |
string |
|
releasePhoneNumber |
string |
|
search |
string |
|
updatePhoneNumberCapabilities |
string |