Passer au contenu principal
POST
/
log-streams
TypeScript
import { ManagementClient } from "auth0";

async function main() {
    const client = new ManagementClient({
        token: "<token>",
    });
    await client.logStreams.create({
        type: "http",
        sink: {
            httpEndpoint: "httpEndpoint",
        },
    });
}
main();
{
  "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>"
      }
    ]
  }
}

Autorisations

Authorization
string
header
requis

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

Corps

type
enum<string>
requis
Options disponibles:
http
sink
object
requis
name
string

log stream name

isPriority
boolean

True for priority log streams, false for non-priority

filters
object[]

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

pii_config
object
startFrom
string
défaut:2021-03-01T19:57:29.532Z

The optional datetime (ISO 8601) to start streaming logs from

Réponse

Log stream created

id
string<log-stream-id>

The id of the log stream

name
string

log stream name

status
enum<string>

The status of the log stream. Possible values: active, paused, suspended

Options disponibles:
active,
paused,
suspended
type
enum<string>
Options disponibles:
http
isPriority
boolean

True for priority log streams, false for non-priority

filters
object[]

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

pii_config
object
sink
object