メインコンテンツへスキップ
PATCH
https://{tenantDomain}/api/v2
/
event-streams
/
{id}
Go
package example

import (
    context "context"

    management "github.com/auth0/go-auth0/management/management"
    client "github.com/auth0/go-auth0/management/management/client"
    option "github.com/auth0/go-auth0/management/management/option"
)

func do() {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    request := &management.UpdateEventStreamRequestContent{}
    client.EventStreams.Update(
        context.TODO(),
        "id",
        request,
    )
}
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.eventStreams.update("id", {});
}
main();
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.eventStreams.update("id", {});
}
main();
curl --request PATCH \
--url https://{tenantDomain}/api/v2/event-streams/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"subscriptions": [
{
"event_type": "<string>"
}
],
"destination": {
"type": "webhook",
"configuration": {
"webhook_endpoint": "<string>",
"webhook_authorization": {
"method": "basic",
"username": "<string>"
}
}
}
}
'
import requests

url = "https://{tenantDomain}/api/v2/event-streams/{id}"

payload = {
"name": "<string>",
"subscriptions": [{ "event_type": "<string>" }],
"destination": {
"type": "webhook",
"configuration": {
"webhook_endpoint": "<string>",
"webhook_authorization": {
"method": "basic",
"username": "<string>"
}
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/event-streams/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'subscriptions' => [
[
'event_type' => '<string>'
]
],
'destination' => [
'type' => 'webhook',
'configuration' => [
'webhook_endpoint' => '<string>',
'webhook_authorization' => [
'method' => 'basic',
'username' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.patch("https://{tenantDomain}/api/v2/event-streams/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"subscriptions\": [\n {\n \"event_type\": \"<string>\"\n }\n ],\n \"destination\": {\n \"type\": \"webhook\",\n \"configuration\": {\n \"webhook_endpoint\": \"<string>\",\n \"webhook_authorization\": {\n \"method\": \"basic\",\n \"username\": \"<string>\"\n }\n }\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{tenantDomain}/api/v2/event-streams/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"subscriptions\": [\n {\n \"event_type\": \"<string>\"\n }\n ],\n \"destination\": {\n \"type\": \"webhook\",\n \"configuration\": {\n \"webhook_endpoint\": \"<string>\",\n \"webhook_authorization\": {\n \"method\": \"basic\",\n \"username\": \"<string>\"\n }\n }\n }\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "name": "<string>",
  "subscriptions": [
    {
      "event_type": "<string>"
    }
  ],
  "destination": {
    "type": "webhook",
    "configuration": {
      "webhook_endpoint": "<string>",
      "webhook_authorization": {
        "method": "basic",
        "username": "<string>"
      }
    }
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

パスパラメータ

id
string
必須

Unique identifier for the event stream.

Required string length: 26

ボディ

name
string

Name of the event stream.

Required string length: 1 - 128
subscriptions
object[]

List of event types subscribed to in this stream.

destination
object
status
enum<string>

Indicates whether the event stream is actively forwarding events.

利用可能なオプション:
enabled,
disabled
Maximum string length: 8

レスポンス

Event stream successfully updated.

id
string<event-stream-id>

Unique identifier for the event stream.

Required string length: 26
name
string

Name of the event stream.

Required string length: 1 - 128
subscriptions
object[]

List of event types subscribed to in this stream.

Minimum array length: 1
destination
object
status
enum<string>

Indicates whether the event stream is actively forwarding events.

利用可能なオプション:
enabled,
disabled
Maximum string length: 8
created_at
string<date-time>

Timestamp when the event stream was created.

updated_at
string<date-time>

Timestamp when the event stream was last updated.