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.UpdateLogStreamRequestContent{}
client.LogStreams.Update(
context.TODO(),
"id",
request,
)
}
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.logStreams.update("id", {});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.logStreams.update("id", {});
}
main();
curl --request PATCH \
--url https://{tenantDomain}/api/v2/log-streams/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"isPriority": true,
"filters": [
{
"type": "category"
}
],
"sink": {
"httpEndpoint": "<string>",
"httpAuthorization": "<string>",
"httpContentType": "<string>",
"httpCustomHeaders": [
{
"header": "<string>",
"value": "<string>"
}
]
}
}
'import requests
url = "https://{tenantDomain}/api/v2/log-streams/{id}"
payload = {
"name": "<string>",
"isPriority": True,
"filters": [{ "type": "category" }],
"sink": {
"httpEndpoint": "<string>",
"httpAuthorization": "<string>",
"httpContentType": "<string>",
"httpCustomHeaders": [
{
"header": "<string>",
"value": "<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/log-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>',
'isPriority' => true,
'filters' => [
[
'type' => 'category'
]
],
'sink' => [
'httpEndpoint' => '<string>',
'httpAuthorization' => '<string>',
'httpContentType' => '<string>',
'httpCustomHeaders' => [
[
'header' => '<string>',
'value' => '<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/log-streams/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"isPriority\": true,\n \"filters\": [\n {\n \"type\": \"category\"\n }\n ],\n \"sink\": {\n \"httpEndpoint\": \"<string>\",\n \"httpAuthorization\": \"<string>\",\n \"httpContentType\": \"<string>\",\n \"httpCustomHeaders\": [\n {\n \"header\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/log-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 \"isPriority\": true,\n \"filters\": [\n {\n \"type\": \"category\"\n }\n ],\n \"sink\": {\n \"httpEndpoint\": \"<string>\",\n \"httpAuthorization\": \"<string>\",\n \"httpContentType\": \"<string>\",\n \"httpCustomHeaders\": [\n {\n \"header\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "active",
"type": "http",
"isPriority": true,
"filters": [
{
"type": "category",
"name": "auth.login.fail"
}
],
"pii_config": {
"log_fields": [
"first_name"
],
"method": "mask",
"algorithm": "xxhash"
},
"sink": {
"httpEndpoint": "<string>",
"httpAuthorization": "<string>",
"httpContentFormat": "JSONARRAY",
"httpContentType": "<string>",
"httpCustomHeaders": [
{
"header": "<string>",
"value": "<string>"
}
]
}
}Update a log stream
Update a log stream.
Examples of how to use the PATCH endpoint.
The following fields may be updated in a PATCH operation:
- name
- status
- sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.
Update the status of a log stream
{
"status": "active|paused"
}
Update the name of a log stream
{
"name": "string"
}
Update the sink properties of a stream of type http
{
"sink": {
"httpEndpoint": "string",
"httpContentType": "string",
"httpContentFormat": "JSONARRAY|JSONLINES",
"httpAuthorization": "string"
}
}
Update the sink properties of a stream of type datadog
{
"sink": {
"datadogRegion": "string",
"datadogApiKey": "string"
}
}
Update the sink properties of a stream of type splunk
{
"sink": {
"splunkDomain": "string",
"splunkToken": "string",
"splunkPort": "string",
"splunkSecure": "boolean"
}
}
Update the sink properties of a stream of type sumo
{
"sink": {
"sumoSourceAddress": "string"
}
}
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.UpdateLogStreamRequestContent{}
client.LogStreams.Update(
context.TODO(),
"id",
request,
)
}
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.logStreams.update("id", {});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.logStreams.update("id", {});
}
main();
curl --request PATCH \
--url https://{tenantDomain}/api/v2/log-streams/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"isPriority": true,
"filters": [
{
"type": "category"
}
],
"sink": {
"httpEndpoint": "<string>",
"httpAuthorization": "<string>",
"httpContentType": "<string>",
"httpCustomHeaders": [
{
"header": "<string>",
"value": "<string>"
}
]
}
}
'import requests
url = "https://{tenantDomain}/api/v2/log-streams/{id}"
payload = {
"name": "<string>",
"isPriority": True,
"filters": [{ "type": "category" }],
"sink": {
"httpEndpoint": "<string>",
"httpAuthorization": "<string>",
"httpContentType": "<string>",
"httpCustomHeaders": [
{
"header": "<string>",
"value": "<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/log-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>',
'isPriority' => true,
'filters' => [
[
'type' => 'category'
]
],
'sink' => [
'httpEndpoint' => '<string>',
'httpAuthorization' => '<string>',
'httpContentType' => '<string>',
'httpCustomHeaders' => [
[
'header' => '<string>',
'value' => '<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/log-streams/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"isPriority\": true,\n \"filters\": [\n {\n \"type\": \"category\"\n }\n ],\n \"sink\": {\n \"httpEndpoint\": \"<string>\",\n \"httpAuthorization\": \"<string>\",\n \"httpContentType\": \"<string>\",\n \"httpCustomHeaders\": [\n {\n \"header\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/log-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 \"isPriority\": true,\n \"filters\": [\n {\n \"type\": \"category\"\n }\n ],\n \"sink\": {\n \"httpEndpoint\": \"<string>\",\n \"httpAuthorization\": \"<string>\",\n \"httpContentType\": \"<string>\",\n \"httpCustomHeaders\": [\n {\n \"header\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "active",
"type": "http",
"isPriority": true,
"filters": [
{
"type": "category",
"name": "auth.login.fail"
}
],
"pii_config": {
"log_fields": [
"first_name"
],
"method": "mask",
"algorithm": "xxhash"
},
"sink": {
"httpEndpoint": "<string>",
"httpAuthorization": "<string>",
"httpContentFormat": "JSONARRAY",
"httpContentType": "<string>",
"httpCustomHeaders": [
{
"header": "<string>",
"value": "<string>"
}
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The id of the log stream to get
Body
log stream name
The status of the log stream. Possible values: active, paused, suspended
active, paused, suspended True for priority log streams, false for non-priority
Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Show child attributes
Show child attributes
Response
Log stream updated
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
The id of the log stream
log stream name
The status of the log stream. Possible values: active, paused, suspended
active, paused, suspended http True for priority log streams, false for non-priority
Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes