Skip to main content

Patch a Subscription

PATCH 

https://sailpoint.api.identitynow.com/beta/trigger-subscriptions/:id

This API updates a trigger subscription in IdentityNow, using a set of instructions to modify a subscription partially. The following fields are patchable:

name, description, enabled, type, filter, responseDeadline, httpConfig, eventBridgeConfig, workflowConfig

Request

Path Parameters

    id stringrequired

    ID of the Subscription to patch

    Example: 0f11f2a4-7c94-4bf3-a2bd-742580fe3bde

Body arrayrequired

  • Array [
  • opstringrequired

    The operation to be performed

    Possible values: [add, remove, replace, move, copy]

    Example: replace
    pathstringrequired

    A string JSON Pointer representing the target path to an element to be affected by the operation

    Example: /description
    value object

    The value to be used for the operation, required for "add" and "replace" operations

    anyOf
    string
  • ]

Responses

Updated subscription.

Schema
    idstringrequired

    Subscription ID.

    Example: 0f11f2a4-7c94-4bf3-a2bd-742580fe3bde
    namestringrequired

    Subscription name.

    Example: Access request subscription
    descriptionstring

    Subscription description.

    Example: Access requested to site xyz
    triggerIdstringrequired

    ID of trigger subscribed to.

    Example: idn:access-request-post-approval
    triggerNamestringrequired

    Trigger name of trigger subscribed to.

    Example: Access Requested
    typestringrequired

    Subscription type. NOTE If type is EVENTBRIDGE, then eventBridgeConfig is required. If type is HTTP, then httpConfig is required.

    Possible values: [HTTP, EVENTBRIDGE, INLINE, SCRIPT, WORKFLOW]

    Example: HTTP
    responseDeadlinestring

    Deadline for completing REQUEST_RESPONSE trigger invocation, represented in ISO-8601 duration format.

    Default value: PT1H
    Example: PT1H
    httpConfig object
    urlstringrequired

    URL of the external/custom integration.

    Example: https://www.example.com
    httpDispatchModestringrequired

    HTTP response modes, i.e. SYNC, ASYNC, or DYNAMIC.

    Possible values: [SYNC, ASYNC, DYNAMIC]

    Example: SYNC
    httpAuthenticationTypestring

    Defines the HTTP Authentication type. Additional values may be added in the future.

    If NO_AUTH is selected, no extra information will be in HttpConfig.

    If BASIC_AUTH is selected, HttpConfig will include BasicAuthConfig with Username and Password as strings.

    If BEARER_TOKEN is selected, HttpConfig will include BearerTokenAuthConfig with Token as string.

    Possible values: [NO_AUTH, BASIC_AUTH, BEARER_TOKEN]

    Default value: NO_AUTH
    Example: BASIC_AUTH
    basicAuthConfig objectnullable

    Config required if BASIC_AUTH is used.

    userNamestring

    The username to authenticate.

    Example: user@example.com
    passwordstringnullable

    The password to authenticate. On response, this field is set to null as to not return secrets.

    Example: null
    bearerTokenAuthConfig objectnullable

    Config required if BEARER_TOKEN authentication is used. On response, this field is set to null as to not return secrets.

    bearerTokenstringnullable

    Bearer token

    Example: null
    eventBridgeConfig object
    awsAccountstringrequired

    AWS Account Number (12-digit number) that has the EventBridge Partner Event Source Resource.

    Example: 123456789012
    awsRegionstringrequired

    AWS Region that has the EventBridge Partner Event Source Resource. See https://docs.aws.amazon.com/general/latest/gr/rande.html for a full list of available values.

    Example: us-west-1
    enabledbooleanrequired

    Whether subscription should receive real-time trigger invocations or not. Test trigger invocations are always enabled regardless of this option.

    Default value: true
    Example: true
    filterstring

    JSONPath filter to conditionally invoke trigger when expression evaluates to true.

    Example: $[?($.identityId == "201327fda1c44704ac01181e963d463c")]

Authorization: oauth2

type: Personal Access Token
scopes: sp:trigger-service-subscriptions:manage
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://sailpoint.api.identitynow.com/beta/trigger-subscriptions/:id"
method := "PATCH"

payload := strings.NewReader(`[
{
"op": "replace",
"path": "/description",
"value": "A new description"
},
{
"op": "replace",
"path": "/name",
"value": "A new name"
}
]`)

client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)

if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json-patch+json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <TOKEN>")

res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()

body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Request Collapse all
Base URL
https://sailpoint.api.identitynow.com/beta
Auth
Parameters
— pathrequired
Body required
[
  {
    "op": "replace",
    "path": "/description",
    "value": "A new description"
  },
  {
    "op": "replace",
    "path": "/name",
    "value": "A new name"
  }
]
ResponseClear

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