Skip to content

Latest commit

 

History

History
196 lines (143 loc) · 7.23 KB

workbookoperation-get.md

File metadata and controls

196 lines (143 loc) · 7.23 KB
title description ms.localizationpriority author ms.subservice doc_type
Get workbookOperation
Retrieve the properties and relationships of a workbookOperation object.
medium
grangeryy
excel
apiPageType

Get workbookOperation

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

Meaningless if this url is called independently. This request is part of all async requests for excel. This is used to retrieve the status of a workbookOperation object.

Currently not all requests support async. Take Create session request as an example.

Issue an async Create session request, follow the documentation and you may get status code 202 Accepted, async operation starts from here and you can find the url this document required from the response header, from the location part.

[!INCLUDE national-cloud-support]

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

[!INCLUDE permissions-table]

HTTP request

GET /me/drive/items/{id}/workbook/operations/{operation-id}

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Workbook-Session-Id Workbook session Id that determines if changes are persisted or not. Optional.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and the requested workbookOperation object in the response body.

Examples

Request

The following is an example of a long-running operation request.

GET https://graph.microsoft.com/beta/me/drive/items/{drive-item-id}/workbook/operations/{operation-id}

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

Response running

The following is the response with the status of running. When you get this status, poll the request again until you don't get the same responses.

HTTP/1.1 200 OK
Content-type: application/json

{
  "id": "0195cfac-bd22-4f91-b276-dece0aa2378b",
  "status": "running"
}

Response succeeded

The following is the response with the status of succeeded. The resourceLocation is a group of URLs that represent the return values of the original long-running operation. See the following for details about how to get the result from the resourceLocation property.

Operation resourceLocation
Create session sessionInfoResource
Create tableRow tableRowOperationResult
Delete tableRow No resourceLocation needed.
HTTP/1.1 200 OK
Content-type: application/json

{
  "id": "0195cfac-bd22-4f91-b276-dece0aa2378b",
  "status": "succeeded",
  "resourceLocation":"https://graph.microsoft.com/beta/me/drive/items/01CCETFLK7GVZTZHSQNRD2AEI5XWTCU6FJ/workbook/sessionInfoResource(key='0195cfac-bd22-4f91-b276-dece0aa2378b')?sessionId=Y2x1c3Rlcj1QU0c0JnNlc3Npb249MTUuU0cyUEVQRjAwMDI4RjI1MS5BMTE2LjEuVTM2LmM4MGRiNjkwLTQwMTktNGNkNS1hYWJiLTJmYzczM2YxZTQ5ZjE0LjUuZW4tVVM1LmVuLVVTMjQuMTAwM2JmZmRhYzUyMzkzOS1Qcml2YXRlMS5TMjQuJTJmUEI0JTJmWjJqZmt1aXhJZHBjeE8xYmclM2QlM2QxNi4xNi4wLjE0NDEwLjM1MDUwMTQuNS5lbi1VUzUuZW4tVVMxLk0xLk4wLjEuUyZ1c2lkPWExOTMyNTU0LTlhNDAtNzYzNi1mNDU3LWEyNjExMmFkNDg2YQ=="
}

Response failed

The following is the response with the status of failed.

HTTP/1.1 200 OK
Content-type: application/json

{
  "id": "0195cfac-bd22-4f91-b276-dece0aa2378b",
  "status": "failed",
  "error":
  {
      "code": "internalServerError",
      "message": "An internal server error occurred while processing the request.",
      "innerError": {
          "code": ""internalServerErrorUncategorized",
          "message": "An unspecified error has occurred.",
          "innerError": {
               "code": "GenericFileOpenError",
               "message": "The workbook cannot be opened."
          }
      }
  }
}