Microsoft Teams Integration

Configure your Datadog Microsoft Teams integration directly through the Datadog API. Note: These endpoints do not support legacy connector handles.

POST https://api.ap1.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handleshttps://api.datadoghq.eu/api/v2/integration/ms-teams/configuration/tenant-based-handleshttps://api.ddog-gov.com/api/v2/integration/ms-teams/configuration/tenant-based-handleshttps://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handleshttps://api.us3.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handleshttps://api.us5.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles

概要

Create a tenant-based handle in the Datadog Microsoft Teams integration.

リクエスト

Body Data (required)

Tenant-based handle payload.

Expand All

フィールド

種類

説明

data [required]

object

Tenant-based handle data from a response.

attributes [required]

object

Tenant-based handle attributes.

channel_id [required]

string

Channel id.

name [required]

string

Tenant-based handle name.

team_id [required]

string

Team id.

tenant_id [required]

string

Tenant id.

type [required]

enum

Specifies the tenant-based handle resource type. Allowed enum values: tenant-based-handle

default: tenant-based-handle

{
  "data": {
    "attributes": {
      "channel_id": "19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2",
      "name": "Example-Microsoft-Teams-Integration",
      "team_id": "e5f50a58-c929-4fb3-8866-e2cd836de3c2",
      "tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97"
    },
    "type": "tenant-based-handle"
  }
}

応答

CREATED

Response of a tenant-based handle.

Expand All

フィールド

種類

説明

data [required]

object

Tenant-based handle data from a response.

attributes

object

Tenant-based handle attributes.

channel_id

string

Channel id.

name

string

Tenant-based handle name.

team_id

string

Team id.

tenant_id

string

Tenant id.

id

string

The ID of the tenant-based handle.

type

enum

Specifies the tenant-based handle resource type. Allowed enum values: tenant-based-handle

default: tenant-based-handle

{
  "data": {
    "attributes": {
      "channel_id": "fake-channel-id",
      "name": "fake-handle-name",
      "team_id": "00000000-0000-0000-0000-000000000000",
      "tenant_id": "00000000-0000-0000-0000-000000000001"
    },
    "id": "596da4af-0563-4097-90ff-07230c3f9db3",
    "type": "tenant-based-handle"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Conflict

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Failed Precondition

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

コード例

// Create api handle returns "CREATED" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	body := datadogV2.MicrosoftTeamsCreateTenantBasedHandleRequest{
		Data: datadogV2.MicrosoftTeamsTenantBasedHandleRequestData{
			Attributes: datadogV2.MicrosoftTeamsTenantBasedHandleRequestAttributes{
				ChannelId: "19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2",
				Name:      "Example-Microsoft-Teams-Integration",
				TeamId:    "e5f50a58-c929-4fb3-8866-e2cd836de3c2",
				TenantId:  "4d3bac44-0230-4732-9e70-cc00736f0a97",
			},
			Type: datadogV2.MICROSOFTTEAMSTENANTBASEDHANDLETYPE_TENANT_BASED_HANDLE,
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewMicrosoftTeamsIntegrationApi(apiClient)
	resp, r, err := api.CreateTenantBasedHandle(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MicrosoftTeamsIntegrationApi.CreateTenantBasedHandle`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `MicrosoftTeamsIntegrationApi.CreateTenantBasedHandle`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"

POST https://api.ap1.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handleshttps://api.datadoghq.eu/api/v2/integration/ms-teams/configuration/workflows-webhook-handleshttps://api.ddog-gov.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handleshttps://api.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handleshttps://api.us3.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handleshttps://api.us5.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handles

概要

Create a Workflows webhook handle in the Datadog Microsoft Teams integration.

リクエスト

Body Data (required)

Workflows Webhook handle payload.

Expand All

フィールド

種類

説明

data [required]

object

Workflows Webhook handle data from a response.

attributes [required]

object

Workflows Webhook handle attributes.

name [required]

string

Workflows Webhook handle name.

url [required]

string

Workflows Webhook URL.

type [required]

enum

Specifies the Workflows webhook handle resource type. Allowed enum values: workflows-webhook-handle

default: workflows-webhook-handle

{
  "data": {
    "attributes": {
      "name": "Example-Microsoft-Teams-Integration",
      "url": "https://fake.url.com"
    },
    "type": "workflows-webhook-handle"
  }
}

応答

CREATED

Response of a Workflows webhook handle.

Expand All

フィールド

種類

説明

data [required]

object

Workflows Webhook handle data from a response.

attributes

object

Workflows Webhook handle attributes.

name

string

Workflows Webhook handle name.

id

string

The ID of the Workflows webhook handle.

type

enum

Specifies the Workflows webhook handle resource type. Allowed enum values: workflows-webhook-handle

default: workflows-webhook-handle

{
  "data": {
    "attributes": {
      "name": "fake-handle-name"
    },
    "id": "596da4af-0563-4097-90ff-07230c3f9db3",
    "type": "workflows-webhook-handle"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Conflict

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Failed Precondition

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

コード例

// Create workflow webhook handle returns "CREATED" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	body := datadogV2.MicrosoftTeamsCreateWorkflowsWebhookHandleRequest{
		Data: datadogV2.MicrosoftTeamsWorkflowsWebhookHandleRequestData{
			Attributes: datadogV2.MicrosoftTeamsWorkflowsWebhookHandleRequestAttributes{
				Name: "Example-Microsoft-Teams-Integration",
				Url:  "https://fake.url.com",
			},
			Type: datadogV2.MICROSOFTTEAMSWORKFLOWSWEBHOOKHANDLETYPE_WORKFLOWS_WEBHOOK_HANDLE,
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewMicrosoftTeamsIntegrationApi(apiClient)
	resp, r, err := api.CreateWorkflowsWebhookHandle(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MicrosoftTeamsIntegrationApi.CreateWorkflowsWebhookHandle`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `MicrosoftTeamsIntegrationApi.CreateWorkflowsWebhookHandle`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"

DELETE https://api.ap1.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}https://api.datadoghq.eu/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}https://api.ddog-gov.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}https://api.us3.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}https://api.us5.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}

概要

Delete a tenant-based handle from the Datadog Microsoft Teams integration.

引数

パスパラメーター

名前

種類

説明

handle_id [required]

string

Your tenant-based handle id.

応答

OK

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Failed Precondition

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

コード例

// Delete tenant-based handle returns "OK" response

package main

import (
	"context"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewMicrosoftTeamsIntegrationApi(apiClient)
	r, err := api.DeleteTenantBasedHandle(ctx, "handle_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MicrosoftTeamsIntegrationApi.DeleteTenantBasedHandle`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Instructions

First install the library and its dependencies and then save the example to main.go and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"

DELETE https://api.ap1.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}https://api.datadoghq.eu/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}https://api.ddog-gov.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}https://api.us3.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}https://api.us5.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}

概要

Delete a Workflows webhook handle from the Datadog Microsoft Teams integration.

引数

パスパラメーター

名前

種類

説明

handle_id [required]

string

Your Workflows webhook handle id.

応答

OK

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Failed Precondition

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

コード例

// Delete Workflows webhook handle returns "OK" response

package main

import (
	"context"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewMicrosoftTeamsIntegrationApi(apiClient)
	r, err := api.DeleteWorkflowsWebhookHandle(ctx, "handle_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MicrosoftTeamsIntegrationApi.DeleteWorkflowsWebhookHandle`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Instructions

First install the library and its dependencies and then save the example to main.go and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"

GET https://api.ap1.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handleshttps://api.datadoghq.eu/api/v2/integration/ms-teams/configuration/tenant-based-handleshttps://api.ddog-gov.com/api/v2/integration/ms-teams/configuration/tenant-based-handleshttps://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handleshttps://api.us3.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handleshttps://api.us5.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles

概要

Get a list of all tenant-based handles from the Datadog Microsoft Teams integration.

引数

クエリ文字列

名前

種類

説明

tenant_id

string

Your tenant id.

name

string

Your tenant-based handle name.

応答

OK

Response with a list of tenant-based handles.

Expand All

フィールド

種類

説明

data [required]

[object]

An array of tenant-based handles.

attributes

object

Tenant-based handle attributes.

channel_id

string

Channel id.

channel_name

string

Channel name.

name

string

Tenant-based handle name.

team_id

string

Team id.

team_name

string

Team name.

tenant_id

string

Tenant id.

tenant_name

string

Tenant name.

id

string

The ID of the tenant-based handle.

type

enum

Tenant-based handle resource type. Allowed enum values: ms-teams-tenant-based-handle-info

default: ms-teams-tenant-based-handle-info

{
  "data": [
    {
      "attributes": {
        "channel_id": "fake-channel-id",
        "channel_name": "fake-channel-name",
        "name": "fake-handle-name",
        "team_id": "00000000-0000-0000-0000-000000000000",
        "team_name": "fake-team-name",
        "tenant_id": "00000000-0000-0000-0000-000000000001",
        "tenant_name": "fake-tenant-name"
      },
      "id": "596da4af-0563-4097-90ff-07230c3f9db3",
      "type": "ms-teams-tenant-based-handle-info"
    }
  ]
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Failed Precondition

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

コード例

// Get all tenant-based handles returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewMicrosoftTeamsIntegrationApi(apiClient)
	resp, r, err := api.ListTenantBasedHandles(ctx, *datadogV2.NewListTenantBasedHandlesOptionalParameters())

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MicrosoftTeamsIntegrationApi.ListTenantBasedHandles`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `MicrosoftTeamsIntegrationApi.ListTenantBasedHandles`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"

GET https://api.ap1.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handleshttps://api.datadoghq.eu/api/v2/integration/ms-teams/configuration/workflows-webhook-handleshttps://api.ddog-gov.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handleshttps://api.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handleshttps://api.us3.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handleshttps://api.us5.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handles

概要

Get a list of all Workflows webhook handles from the Datadog Microsoft Teams integration.

引数

クエリ文字列

名前

種類

説明

name

string

Your Workflows webhook handle name.

応答

OK

Response with a list of Workflows webhook handles.

Expand All

フィールド

種類

説明

data [required]

[object]

An array of Workflows webhook handles.

attributes

object

Workflows Webhook handle attributes.

name

string

Workflows Webhook handle name.

id

string

The ID of the Workflows webhook handle.

type

enum

Specifies the Workflows webhook handle resource type. Allowed enum values: workflows-webhook-handle

default: workflows-webhook-handle

{
  "data": [
    {
      "attributes": {
        "name": "fake-handle-name"
      },
      "id": "596da4af-0563-4097-90ff-07230c3f9db3",
      "type": "workflows-webhook-handle"
    }
  ]
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Failed Precondition

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

コード例

// Get all Workflows webhook handles returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewMicrosoftTeamsIntegrationApi(apiClient)
	resp, r, err := api.ListWorkflowsWebhookHandles(ctx, *datadogV2.NewListWorkflowsWebhookHandlesOptionalParameters())

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MicrosoftTeamsIntegrationApi.ListWorkflowsWebhookHandles`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `MicrosoftTeamsIntegrationApi.ListWorkflowsWebhookHandles`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"

GET https://api.ap1.datadoghq.com/api/v2/integration/ms-teams/configuration/channel/{tenant_name}/{team_name}/{channel_name}https://api.datadoghq.eu/api/v2/integration/ms-teams/configuration/channel/{tenant_name}/{team_name}/{channel_name}https://api.ddog-gov.com/api/v2/integration/ms-teams/configuration/channel/{tenant_name}/{team_name}/{channel_name}https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/channel/{tenant_name}/{team_name}/{channel_name}https://api.us3.datadoghq.com/api/v2/integration/ms-teams/configuration/channel/{tenant_name}/{team_name}/{channel_name}https://api.us5.datadoghq.com/api/v2/integration/ms-teams/configuration/channel/{tenant_name}/{team_name}/{channel_name}

概要

Get the tenant, team, and channel ID of a channel in the Datadog Microsoft Teams integration.

引数

パスパラメーター

名前

種類

説明

tenant_name [required]

string

Your tenant name.

team_name [required]

string

Your team name.

channel_name [required]

string

Your channel name.

応答

OK

Response with channel, team, and tenant ID information.

Expand All

フィールド

種類

説明

data

object

Channel data from a response.

attributes

object

Channel attributes.

is_primary

boolean

Indicates if this is the primary channel.

team_id

string

Team id.

tenant_id

string

Tenant id.

id

string

The ID of the channel.

type

enum

Channel info resource type. Allowed enum values: ms-teams-channel-info

default: ms-teams-channel-info

{
  "data": {
    "attributes": {
      "is_primary": true,
      "team_id": "00000000-0000-0000-0000-000000000000",
      "tenant_id": "00000000-0000-0000-0000-000000000001"
    },
    "id": "19:b41k24b14bn1nwffkernfkwrnfneubgkr@thread.tacv2",
    "type": "ms-teams-channel-info"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

コード例

// Get channel information by name returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewMicrosoftTeamsIntegrationApi(apiClient)
	resp, r, err := api.GetChannelByName(ctx, "tenant_name", "team_name", "channel_name")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MicrosoftTeamsIntegrationApi.GetChannelByName`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `MicrosoftTeamsIntegrationApi.GetChannelByName`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"

GET https://api.ap1.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}https://api.datadoghq.eu/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}https://api.ddog-gov.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}https://api.us3.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}https://api.us5.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}

概要

Get the tenant, team, and channel information of a tenant-based handle from the Datadog Microsoft Teams integration.

引数

パスパラメーター

名前

種類

説明

handle_id [required]

string

Your tenant-based handle id.

応答

OK

Response of a tenant-based handle.

Expand All

フィールド

種類

説明

data [required]

object

Tenant-based handle data from a response.

attributes

object

Tenant-based handle attributes.

channel_id

string

Channel id.

name

string

Tenant-based handle name.

team_id

string

Team id.

tenant_id

string

Tenant id.

id

string

The ID of the tenant-based handle.

type

enum

Specifies the tenant-based handle resource type. Allowed enum values: tenant-based-handle

default: tenant-based-handle

{
  "data": {
    "attributes": {
      "channel_id": "fake-channel-id",
      "name": "fake-handle-name",
      "team_id": "00000000-0000-0000-0000-000000000000",
      "tenant_id": "00000000-0000-0000-0000-000000000001"
    },
    "id": "596da4af-0563-4097-90ff-07230c3f9db3",
    "type": "tenant-based-handle"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Failed Precondition

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

コード例

// Get tenant-based handle information returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewMicrosoftTeamsIntegrationApi(apiClient)
	resp, r, err := api.GetTenantBasedHandle(ctx, "handle_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MicrosoftTeamsIntegrationApi.GetTenantBasedHandle`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `MicrosoftTeamsIntegrationApi.GetTenantBasedHandle`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"

GET https://api.ap1.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}https://api.datadoghq.eu/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}https://api.ddog-gov.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}https://api.us3.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}https://api.us5.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}

概要

Get the name of a Workflows webhook handle from the Datadog Microsoft Teams integration.

引数

パスパラメーター

名前

種類

説明

handle_id [required]

string

Your Workflows webhook handle id.

応答

OK

Response of a Workflows webhook handle.

Expand All

フィールド

種類

説明

data [required]

object

Workflows Webhook handle data from a response.

attributes

object

Workflows Webhook handle attributes.

name

string

Workflows Webhook handle name.

id

string

The ID of the Workflows webhook handle.

type

enum

Specifies the Workflows webhook handle resource type. Allowed enum values: workflows-webhook-handle

default: workflows-webhook-handle

{
  "data": {
    "attributes": {
      "name": "fake-handle-name"
    },
    "id": "596da4af-0563-4097-90ff-07230c3f9db3",
    "type": "workflows-webhook-handle"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Failed Precondition

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

コード例

// Get Workflows webhook handle information returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewMicrosoftTeamsIntegrationApi(apiClient)
	resp, r, err := api.GetWorkflowsWebhookHandle(ctx, "handle_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MicrosoftTeamsIntegrationApi.GetWorkflowsWebhookHandle`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `MicrosoftTeamsIntegrationApi.GetWorkflowsWebhookHandle`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"

PATCH https://api.ap1.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}https://api.datadoghq.eu/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}https://api.ddog-gov.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}https://api.us3.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}https://api.us5.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}

概要

Update a tenant-based handle from the Datadog Microsoft Teams integration.

引数

パスパラメーター

名前

種類

説明

handle_id [required]

string

Your tenant-based handle id.

リクエスト

Body Data (required)

Tenant-based handle payload.

Expand All

フィールド

種類

説明

data [required]

object

Tenant-based handle data from a response.

attributes [required]

object

Tenant-based handle attributes.

channel_id

string

Channel id.

name

string

Tenant-based handle name.

team_id

string

Team id.

tenant_id

string

Tenant id.

type [required]

enum

Specifies the tenant-based handle resource type. Allowed enum values: tenant-based-handle

default: tenant-based-handle

{
  "data": {
    "attributes": {
      "name": "fake-handle-name--updated"
    },
    "type": "tenant-based-handle"
  }
}

応答

OK

Response of a tenant-based handle.

Expand All

フィールド

種類

説明

data [required]

object

Tenant-based handle data from a response.

attributes

object

Tenant-based handle attributes.

channel_id

string

Channel id.

name

string

Tenant-based handle name.

team_id

string

Team id.

tenant_id

string

Tenant id.

id

string

The ID of the tenant-based handle.

type

enum

Specifies the tenant-based handle resource type. Allowed enum values: tenant-based-handle

default: tenant-based-handle

{
  "data": {
    "attributes": {
      "channel_id": "fake-channel-id",
      "name": "fake-handle-name",
      "team_id": "00000000-0000-0000-0000-000000000000",
      "tenant_id": "00000000-0000-0000-0000-000000000001"
    },
    "id": "596da4af-0563-4097-90ff-07230c3f9db3",
    "type": "tenant-based-handle"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Conflict

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Failed Precondition

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

コード例

// Update api handle returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	// there is a valid "tenant_based_handle" in the system
	TenantBasedHandleDataID := os.Getenv("TENANT_BASED_HANDLE_DATA_ID")

	body := datadogV2.MicrosoftTeamsUpdateTenantBasedHandleRequest{
		Data: datadogV2.MicrosoftTeamsUpdateTenantBasedHandleRequestData{
			Attributes: datadogV2.MicrosoftTeamsTenantBasedHandleAttributes{
				Name: datadog.PtrString("fake-handle-name--updated"),
			},
			Type: datadogV2.MICROSOFTTEAMSTENANTBASEDHANDLETYPE_TENANT_BASED_HANDLE,
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewMicrosoftTeamsIntegrationApi(apiClient)
	resp, r, err := api.UpdateTenantBasedHandle(ctx, TenantBasedHandleDataID, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MicrosoftTeamsIntegrationApi.UpdateTenantBasedHandle`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `MicrosoftTeamsIntegrationApi.UpdateTenantBasedHandle`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"

PATCH https://api.ap1.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}https://api.datadoghq.eu/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}https://api.ddog-gov.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}https://api.us3.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}https://api.us5.datadoghq.com/api/v2/integration/ms-teams/configuration/workflows-webhook-handles/{handle_id}

概要

Update a Workflows webhook handle from the Datadog Microsoft Teams integration.

引数

パスパラメーター

名前

種類

説明

handle_id [required]

string

Your Workflows webhook handle id.

リクエスト

Body Data (required)

Workflows Webhook handle payload.

Expand All

フィールド

種類

説明

data [required]

object

Workflows Webhook handle data from a response.

attributes [required]

object

Workflows Webhook handle attributes.

name

string

Workflows Webhook handle name.

url

string

Workflows Webhook URL.

type [required]

enum

Specifies the Workflows webhook handle resource type. Allowed enum values: workflows-webhook-handle

default: workflows-webhook-handle

{
  "data": {
    "attributes": {
      "name": "fake-handle-name--updated"
    },
    "type": "workflows-webhook-handle"
  }
}

応答

OK

Response of a Workflows webhook handle.

Expand All

フィールド

種類

説明

data [required]

object

Workflows Webhook handle data from a response.

attributes

object

Workflows Webhook handle attributes.

name

string

Workflows Webhook handle name.

id

string

The ID of the Workflows webhook handle.

type

enum

Specifies the Workflows webhook handle resource type. Allowed enum values: workflows-webhook-handle

default: workflows-webhook-handle

{
  "data": {
    "attributes": {
      "name": "fake-handle-name"
    },
    "id": "596da4af-0563-4097-90ff-07230c3f9db3",
    "type": "workflows-webhook-handle"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Conflict

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Failed Precondition

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

コード例

// Update workflow webhook handle returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	// there is a valid "workflows_webhook_handle" in the system
	WorkflowsWebhookHandleDataID := os.Getenv("WORKFLOWS_WEBHOOK_HANDLE_DATA_ID")

	body := datadogV2.MicrosoftTeamsUpdateWorkflowsWebhookHandleRequest{
		Data: datadogV2.MicrosoftTeamsUpdateWorkflowsWebhookHandleRequestData{
			Attributes: datadogV2.MicrosoftTeamsWorkflowsWebhookHandleAttributes{
				Name: datadog.PtrString("fake-handle-name--updated"),
			},
			Type: datadogV2.MICROSOFTTEAMSWORKFLOWSWEBHOOKHANDLETYPE_WORKFLOWS_WEBHOOK_HANDLE,
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewMicrosoftTeamsIntegrationApi(apiClient)
	resp, r, err := api.UpdateWorkflowsWebhookHandle(ctx, WorkflowsWebhookHandleDataID, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MicrosoftTeamsIntegrationApi.UpdateWorkflowsWebhookHandle`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `MicrosoftTeamsIntegrationApi.UpdateWorkflowsWebhookHandle`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"

PREVIEWING: vishalshah/add-missing-functions-sql-reference