メインコンテンツへスキップ
GET
/
users
/
{id}
/
logs
TypeScript
import { ManagementClient } from "auth0";

async function main() {
    const client = new ManagementClient({
        token: "<token>",
    });
    await client.users.logs.list("id", {
        page: 1,
        perPage: 1,
        sort: "sort",
        includeTotals: true,
    });
}
main();
[
  {
    "date": "2016-02-23T19:57:29.532Z",
    "type": "sapi",
    "description": "<string>",
    "connection": "<string>",
    "connection_id": "<string>",
    "client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww",
    "client_name": "My application Name",
    "ip": "190.257.209.19",
    "hostname": "190.257.209.19",
    "user_id": "auth0|56c75c4e42b6359e98374bc2",
    "user_name": "<string>",
    "audience": "<string>",
    "scope": "",
    "strategy": "<string>",
    "strategy_type": "<string>",
    "log_id": "<string>",
    "isMobile": true,
    "details": {},
    "user_agent": "<string>",
    "security_context": {
      "ja3": "<string>",
      "ja4": "<string>"
    },
    "location_info": {
      "country_code": "<string>",
      "country_code3": "<string>",
      "country_name": "<string>",
      "city_name": "<string>",
      "latitude": 123,
      "longitude": 123,
      "time_zone": "<string>",
      "continent_code": "<string>"
    }
  }
]

承認

Authorization
string
header
必須

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

パスパラメータ

id
string
必須

ID of the user of the logs to retrieve

クエリパラメータ

page
integer

Page index of the results to return. First page is 0.

per_page
integer

Number of results per page. Paging is disabled if parameter not sent.

必須範囲: 1 <= x <= 100
sort
string

Field to sort by. Use fieldname:1 for ascending order and fieldname:-1 for descending.

Pattern: ^((date)|(connection)|(client_id)|(client_name)|(ip)|(user_id)|(user_name)|(description)|(user_agent)|(type)|(details)|(strategy)|(strategy_type))\:(1|-1)$
include_totals
boolean

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

レスポンス

Logs successfully retrieved.

date
デフォルト:2016-02-23T19:57:29.532Z

Date when the event occurred in ISO 8601 format.

type
string
デフォルト:sapi

Type of event.

description
string | null

Description of this event.

connection
string

Name of the connection the event relates to.

connection_id
string

ID of the connection the event relates to.

client_id
string
デフォルト:AaiyAPdpYdesoKnqjj8HJqRn4T5titww

ID of the client (application).

client_name
string
デフォルト:My application Name

Name of the client (application).

ip
string
デフォルト:190.257.209.19

IP address of the log event source.

hostname
string
デフォルト:190.257.209.19

Hostname the event applies to.

user_id
string
デフォルト:auth0|56c75c4e42b6359e98374bc2

ID of the user involved in the event.

user_name
string

Name of the user involved in the event.

audience
string

API audience the event applies to.

scope
string
デフォルト:""

Scope permissions applied to the event.

strategy
string

Name of the strategy involved in the event.

strategy_type
string

Type of strategy involved in the event.

log_id
string

Unique ID of the event.

isMobile
boolean

Whether the client was a mobile device (true) or desktop/laptop/server (false).

details
object

Additional useful details about this event (structure is dependent upon event type).

user_agent
string

User agent string from the client device that caused the event.

security_context
object

Information about security-related signals.

location_info
object

Information about the location that triggered this event based on the ip.