externalItem: addActivities

Namespace: microsoft.graph.externalConnectors

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.

Append additional instances of externalActivity objects on an externalitem.

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Not supported
Delegated (personal Microsoft account) Not supported
Application ExternalItem.ReadWrite.OwnedBy, ExternalItem.ReadWrite.All

HTTP request

POST /connections/{connectionsId}/items/{externalItemId}/addActivities

Request headers

Name Description
Authorization Bearer {token}. Required.
Content-Type application/json. Required.

Request body

In the request body, supply JSON representation of the parameters.

The following table shows the parameters that can be used with this action.

Parameter Type Description
activities microsoft.graph.externalConnectors.externalActivity collection Collection of activities involving an externalItem.

Response

If successful, this action returns a 200 OK response code and a collection of externalConnectors.externalActivityResult objects in the response body.

If a 207 response is returned, this indicates that only some of the added externalActivity instances were successfully processed. The caller should inspect the response payload, looking at the error field for each externalActivityResult to determine why the externalActivity instance was not processed and what action can be taken. If the error field is null, that indicates a successful externalActivityResult.

Examples

Request

The following is an example of a request.

POST https://graph.microsoft.com/beta/connections/{connectionsId}/items/{externalItemId}/addActivities
Content-Type: application/json
Content-length: 190

{
  "activities": [
    {
      "@odata.type": "#microsoft.graph.externalConnectors.externalActivity",
      "type": "String",
      "startDateTime": "String (timestamp)"
    }
  ]
}

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

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

{
  "value": [
    {
      "@odata.type": "#microsoft.graph.externalConnectors.externalActivityResult",
      "type": "String",
      "startDateTime": "String (timestamp)",
      "error": {
        "@odata.type": "microsoft.graph.publicError"
      }
    }
  ]
}