godo.ActionGateway.Connections.Delete()

Generated on 5 Nov 2026 from godo version v1.236.0

Usage

client.ActionGateway.Connections.Delete(ctx context.Context, id string) (*godo.ActionGatewayConnectionResponse, *godo.Response, error)

Description

Delete revokes and deletes a connection.

This method sends a DELETE request to /v2/action-gateway/connections/{}.

Parameters

id string required

Returns

*godo.ActionGatewayConnectionResponse
*godo.Response

The HTTP response, with pagination Links, Meta, and Rate limit information.

error

Non-nil when the request fails. API errors are returned as *godo.ErrorResponse.

Fields of godo.ActionGatewayConnectionResponse

ActionGatewayConnectionResponse contains one connection and any pending authorization.

Connection *godo.ActionGatewayConnection

JSON key: connection

Authorization *godo.ActionGatewayConnectionAuthorization

JSON key: authorization

Request Sample

Show Request Sample
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/digitalocean/godo"
)

func main() {
	client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN"))
	ctx := context.TODO()

	result, _, err := client.ActionGateway.Connections.Delete(ctx, "<your-id>")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", result)
}

Response Example

Show Response Example
{
  "connection": {
    "id": "39f9f768-a7f9-4c91-9557-3328c53dd054",
    "provider": "jira",
    "provider_display_name": "Jira",
    "user_id": "alice",
    "status": "revoked",
    "created_at": "2026-07-14T00:50:00Z",
    "updated_at": "2026-08-01T09:00:00Z",
    "revoked_at": "2026-08-01T09:00:00Z",
    "connection_parameters": {
      "site_url": "https://example.atlassian.net"
    },
    "credential_kind": "digitalocean_oauth",
    "credential_id": "",
    "network": null,
    "scopes": [
      "write:jira-work"
    ],
    "granted_at": "2026-07-14T00:52:10Z",
    "oauth": {
      "scopes": [
        "write:jira-work"
      ],
      "granted_at": "2026-07-14T00:52:10Z"
    }
  }
}

More Information

See DELETE /v2/action-gateway/connections/{} in the API reference for additional detail on responses, headers, parameters, and more.

See the Go package documentation for the source of this method.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.