---
title: "Gets an operation by its id."
method: GET
path: "/phoneNumbers/operations/{operationId}"
tags: ["Long running operations"]
---

# Gets an operation by its id.

`GET /phoneNumbers/operations/{operationId}`

## Path parameters

- `operationId` string, required

## Query parameters

- `api-version` string, required

## Response `200`

When the operation is completed, query the final result of the operation using the URL specified in the 'Location' attribute in the response header.

- PhoneNumberOperation
  - `operationType` 'purchase' | 'releasePhoneNumber' | 'search' | 'updatePhoneNumberCapabilities' | 'reservationPurchase', required — The type of operation, e.g. Search
  - `status` 'notStarted' | 'running' | 'succeeded' | 'failed', required — Status of operation.
  - `resourceLocation` string — URL for retrieving the result of the operation, if any.
  - `createdDateTime` string, date-time, required — The date that the operation was created.
  - `error` CommunicationError — unresolved $ref
  - `id` string, required — Id of operation.
  - `lastActionDateTime` string, date-time — The most recent date that the operation was changed.

## Other responses

- `default` — Failure

---

[API](https://skmtc.dev/azure/apis/communication-phonenumbers.md) · [All operations](https://skmtc.dev/azure/apis/communication-phonenumbers/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/communication-phonenumbers/revisions/6e81b3741aa7/schema)
