Skip to content
API Reference

Update application

client.Zones.Applications.Update(ctx, id, params) (*Application, error)
PATCH/zones/{zoneId}/applications/{id}

Updates an Application's configuration and metadata

ParametersExpand Collapse
id string
params ZoneApplicationUpdateParams
ZoneID param.Field[string]

Path param

Description param.Field[string]optional

Body param: Human-readable description

maxLength2048
Identifier param.Field[string]optional

Body param: User specified identifier, unique within the zone

minLength1
maxLength2048
Metadata param.Field[MetadataUpdate]optional

Body param: Entity metadata (set to null or {} to remove metadata)

Name param.Field[string]optional

Body param: Human-readable name

minLength1
maxLength255
Protocols param.Field[ZoneApplicationUpdateParamsProtocols]optional

Body param: Protocol-specific configuration for application update

Oauth2 ZoneApplicationUpdateParamsProtocolsOauth2optional

OAuth 2.0 protocol configuration for application update

PostLogoutRedirectUris []stringoptional

OAuth 2.0 post-logout redirect URIs for this application (set to null or [] to unset)

RedirectUris []stringoptional

OAuth 2.0 redirect URIs for this application (set to null or [] to unset)

ReturnsExpand Collapse
type Application struct{…}

An Application is a software system with an associated identity that can access Resources. It may act on its own behalf (machine-to-machine) or on behalf of a user (delegated access).

ID string

Unique identifier of the application

CreatedAt Time

Entity creation timestamp

formatdate-time
DependenciesCount int64

Number of resource dependencies

Identifier string

User specified identifier, unique within the zone

minLength1
maxLength2048
Name string

Human-readable name

minLength1
maxLength255
OrganizationID string

Organization that owns this application

OwnerType ApplicationOwnerType

Who owns this application. Platform-owned applications cannot be modified via API.

Accepts one of the following:
const ApplicationOwnerTypePlatform ApplicationOwnerType = "platform"
const ApplicationOwnerTypeCustomer ApplicationOwnerType = "customer"
Slug string

URL-safe identifier, unique within the zone

minLength1
maxLength63
UpdatedAt Time

Entity update timestamp

formatdate-time
ZoneID string

Zone this application belongs to

Description stringoptional

Human-readable description

maxLength2048
Metadata Metadataoptional

Entity metadata

DocsURL stringoptional

Documentation URL

formaturi
maxLength2048
Protocols ApplicationProtocolsoptional

Protocol-specific configuration

Oauth2 ApplicationProtocolsOauth2optional

OAuth 2.0 protocol configuration

PostLogoutRedirectUris []stringoptional

OAuth 2.0 post-logout redirect URIs for this application

RedirectUris []stringoptional

OAuth 2.0 redirect URIs for this application

Update application

package main

import (
  "context"
  "fmt"

  "github.com/keycardai/keycard-go"
)

func main() {
  client := keycard.NewClient(

  )
  application, err := client.Zones.Applications.Update(
    context.TODO(),
    "id",
    keycard.ZoneApplicationUpdateParams{
      ZoneID: "zoneId",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", application.ID)
}
{
  "id": "id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "dependencies_count": 0,
  "identifier": "x",
  "name": "x",
  "organization_id": "organization_id",
  "owner_type": "platform",
  "slug": "slug",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "zone_id": "zone_id",
  "description": "description",
  "metadata": {
    "docs_url": "https://example.com"
  },
  "protocols": {
    "oauth2": {
      "post_logout_redirect_uris": [
        "https://example.com"
      ],
      "redirect_uris": [
        "https://example.com"
      ]
    }
  }
}
Returns Examples
{
  "id": "id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "dependencies_count": 0,
  "identifier": "x",
  "name": "x",
  "organization_id": "organization_id",
  "owner_type": "platform",
  "slug": "slug",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "zone_id": "zone_id",
  "description": "description",
  "metadata": {
    "docs_url": "https://example.com"
  },
  "protocols": {
    "oauth2": {
      "post_logout_redirect_uris": [
        "https://example.com"
      ],
      "redirect_uris": [
        "https://example.com"
      ]
    }
  }
}