Skip to content

Conversation

tanya732
Copy link
Contributor

@tanya732 tanya732 commented Jul 1, 2025

Changes

Updated changes in below endpoints -

Path HTTP Method Method Name
/log-streams GET getAll
/log-streams POST create
/log-streams/{id} GET get
/log-streams/{id} PATCH update

References

https://auth0.com/docs/api/management/v2/log-streams/get-log-streams
https://auth0.com/docs/api/management/v2/log-streams/post-log-streams
https://auth0.com/docs/api/management/v2/log-streams/get-log-streams-by-id
https://auth0.com/docs/api/management/v2/log-streams/patch-log-streams-by-id

Manual Testing Code

Securely store your Client ID, Client Secret, and Management API token.
Install the SDK: npm install auth0

var auth0 = new ManagementClient({
domain: '{YOUR_TENANT_AND REGION}.auth0.com',
clientId: '{YOUR_CLIENT_ID}',
clientSecret: '{YOUR_CLIENT_SECRET}',
});

// Create a log-stream with pii_config configuration
const createPayload : PostLogStreamsRequest = {
  name: "Test",
  type: "http",
  filters: [
    {
      type: "category",
      name: "auth.login.success"
    }
  ],
  sink: {
    httpContentFormat: "JSONARRAY",
    httpContentType: "application/json",
    httpEndpoint: "<Endpoint>"
  },
  pii_config: {
    log_fields:["last_name"],method:"mask",algorithm:"xxhash"
  }
}

const createResp = await auth0.logStreams.create(createPayload)

// Update a log-stream with pii_config configuration
const updatePayload : PatchLogStreamsByIdRequest = {
  pii_config: {
    log_fields:["last_name", "first_name"],method:"mask",algorithm:"xxhash"
  }
}

const updateResp = await auth0.logStreams.update({id: "<ID>}, updatePayload)

// Get All log-streams
const getAllResp = await auth0.logStreams.getAll()

// Get log-stream
const getResp = await auth0.logStreams.get({<ID>})

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

  • This change adds unit test coverage
  • This change adds integration test coverage

Checklist

@tanya732 tanya732 marked this pull request as ready for review July 7, 2025 06:15
@tanya732 tanya732 requested a review from a team as a code owner July 7, 2025 06:15
@tanya732 tanya732 merged commit 3ef3a40 into master Jul 9, 2025
8 checks passed
@tanya732 tanya732 deleted the sdk-6055-log-streaming-support branch July 9, 2025 10:18
@tanya732 tanya732 mentioned this pull request Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants