Skip to main content

Update an addon

PUT 

<your-unleash-url>/api/admin/addons/:id

Update the addon with a specific ID. Any fields in the update object will be updated. Properties that are not included in the update object will not be affected. To empty a property, pass null as that property's value.

Note: passing null as a value for the description property will set it to an empty string.

Request

Path Parameters

    id stringrequired

Bodyrequired

addonCreateUpdateSchema
    provider stringrequired

    The addon provider, such as "webhook" or "slack". This string is case sensitive and maps to the provider's name property.

    The list of all supported providers and their parameters for a specific Unleash instance can be found by making a GET request to the api/admin/addons endpoint: the providers property of that response will contain all available providers.

    The default set of providers can be found in the addons reference documentation. The default supported options are:

    The provider you choose for your addon dictates what properties the parameters object needs. Refer to the documentation for each provider for more information.

    Example: webhook
    description string

    A description of the addon.

    Example: This addon posts updates to our internal feature tracking system whenever a feature is created or updated.
    enabled booleanrequired

    Whether the addon should be enabled or not.

    parameters objectrequired

    Parameters for the addon provider. This object has different required and optional properties depending on the provider you choose. Consult the documentation for details.

    property name* any

    Parameters for the addon provider. This object has different required and optional properties depending on the provider you choose. Consult the documentation for details.

    Example: {"url":"http://localhost:4242/webhook"}
    events string[]required

    The event types that will trigger this specific addon.

    Example: ["feature-created","feature-updated"]
    projects string[]

    The projects that this addon will listen to events from. An empty list means it will listen to events from all projects.

    Example: ["new-landing-project","signups-v2"]
    environments string[]

    The list of environments that this addon will listen to events from. An empty list means it will listen to events from all environments.

    Example: ["development","production"]

Responses

addonSchema
Schema
    id integerrequired

    The addon's unique identifier.

    Possible values: >= 1

    Example: 27
    provider stringrequired

    The addon provider, such as "webhook" or "slack".

    Example: webhook
    description stringnullablerequired

    A description of the addon. null if no description exists.

    Example: This addon posts updates to our internal feature tracking system whenever a feature is created or updated.
    enabled booleanrequired

    Whether the addon is enabled or not.

    parameters objectrequired

    Parameters for the addon provider. This object has different required and optional properties depending on the provider you choose.

    property name* any

    Parameters for the addon provider. This object has different required and optional properties depending on the provider you choose.

    Example: {"url":"http://localhost:4242/webhook"}
    events string[]required

    The event types that trigger this specific addon.

    Example: ["feature-created","feature-updated"]
    projects string[]

    The projects that this addon listens to events from. An empty list means it listens to events from all projects.

    Example: ["new-landing-project","signups-v2"]
    environments string[]

    The list of environments that this addon listens to events from. An empty list means it listens to events from all environments.

    Example: ["development","production"]

Authorization: Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
curl -L -X PUT '<your-unleash-url>/api/admin/addons/:id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>' \
-d '{
"provider": "webhook",
"description": "This addon posts updates to our internal feature tracking system whenever a feature is created or updated.",
"enabled": true,
"parameters": {
"url": "http://localhost:4242/webhook"
},
"events": [
"feature-created",
"feature-updated"
],
"projects": [
"new-landing-project",
"signups-v2"
],
"environments": [
"development",
"production"
]
}'
Request Collapse all
Base URL
<your-unleash-url>
Auth
Parameters
— pathrequired
Body required
{
  "provider": "webhook",
  "description": "This addon posts updates to our internal feature tracking system whenever a feature is created or updated.",
  "enabled": true,
  "parameters": {
    "url": "http://localhost:4242/webhook"
  },
  "events": [
    "feature-created",
    "feature-updated"
  ],
  "projects": [
    "new-landing-project",
    "signups-v2"
  ],
  "environments": [
    "development",
    "production"
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!