編輯

共用方式為


teamsAsyncOperation resource type

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

A Microsoft Teams async operation is an operation that transcends the lifetime of a single API request. These operations are long-running or too expensive to complete within the timeframe of their originating request.

When an async operation is initiated, the method returns a 202 Accepted response code. The response will also contain a Location header, which contains the location of the teamsAsyncOperation. Periodically check the status of the operation by making a GET request to this location; wait >30 seconds between checks. When the request completes successfully, the status will be "succeeded" and the targetResourceLocation will point to the created/modified resource.

Methods

Method Return Type Description
List operations resourceSpecificPermissionGrant collection List async operations that ran or are running on a specific chat.
Get operation resourceSpecificPermissionGrant collection Get an async operation that ran or is running on a specific resource.

Properties

Property Type Description
attemptsCount Int32 Number of times the operation was attempted before being marked successful or failed.
createdDateTime DateTimeOffset Time when the operation was created.
error operationError Any error that causes the async operation to fail.
id string Unique operation ID.
lastActionDateTime DateTimeOffset Time when the async operation was last updated.
operationType teamsAsyncOperationType Denotes the type of operation described. Possible values are: invalid, cloneTeam, archiveTeam, unarchiveTeam, createTeam, unknownFutureValue, teamifyGroup, createChannel, createChat, archiveChannel, unarchiveChannel. You must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: teamifyGroup, createChannel, createChat, archiveChannel, unarchiveChannel.
status teamsAsyncOperationStatus Operation status.
targetResourceId String The ID of the object that's created or modified as result of this async operation, typically a team.
targetResourceLocation string The location of the object that's created or modified as result of this async operation. This URL should be treated as an opaque value and not parsed into its component paths.

JSON representation

The following JSON representation shows the resource type.

{
  "attemptsCount": "Int32",
  "createdDateTime": "String (timestamp)",
  "error": { "@odata.type": "microsoft.graph.operationError" },
  "id": "String (identifier)",
  "lastActionDateTime": "String (timestamp)",
  "operationType": "String",
  "status": "String",
  "targetResourceId": "String",
  "targetResourceLocation": "String"
}