openapi: 3.0.0 info: title: Auth0 Authentication actions logs API description: Auth0 Authentication API. Endpoints for authentication and authorization using OpenID Connect, OAuth 2.0, SAML, WS-Federation, and Passwordless flows. version: 1.0.0 servers: - url: '{auth0_domain}' description: The Authentication API is served over HTTPS. variables: auth0_domain: description: Auth0 domain default: https://demo.us.auth0.com tags: - name: logs paths: /logs: get: summary: Search Log Events description: "Retrieve log entries that match the specified search criteria (or all log entries if no criteria specified).\n\nSet custom search criteria using the q parameter, or search from a specific log ID (\"search from checkpoint\").\n\nFor more information on all possible event types, their respective acronyms, and descriptions, see Log Event Type Codes.\n\n
To set custom search criteria, use the following parameters:
\n\n\n\nFor more information on the list of fields that can be used in fields and sort, see Searchable Fields.\n\nAuth0 limits the number of logs you can return by search criteria to 100 logs per request. Furthermore, you may paginate only through 1,000 search results. If you exceed this threshold, please redefine your search or use the get logs by checkpoint method.\n\n
To search from a checkpoint log ID, use the following parameters:
\n\n\nImportant: When fetching logs from a checkpoint log ID, any parameter other than from and take will be ignored, and date ordering is not guaranteed.\n" tags: - logs parameters: - name: page in: query description: Page index of the results to return. First page is 0. schema: type: integer minimum: 0 - name: per_page in: query description: ' Number of results per page. Paging is disabled if parameter not sent. Default: 50. Max value: 100' schema: type: integer minimum: 0 maximum: 100 - name: sort in: query description: Field to use for sorting appended with :1 for ascending and :-1 for descending. e.g. date:-1 schema: type: string pattern: ^((date)|(connection)|(client_id)|(client_name)|(ip)|(user_id)|(user_name)|(description)|(user_agent)|(type)|(details)|(strategy)|(strategy_type))\:(1|-1)$ - name: fields in: query description: Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. schema: type: string pattern: ^((date)|(connection)|(client_id)|(client_name)|(ip)|(user_id)|(user_name)|(description)|(user_agent)|(type)|(details)|(strategy)|(strategy_type))(,((date)|(connection)|(client_id)|(client_name)|(ip)|(user_id)|(user_name)|(description)|(user_agent)|(type)|(details)|(strategy)|(strategy_type)))*$ - name: include_fields in: query description: Whether specified fields are to be included (true) or excluded (false) schema: type: boolean - name: include_totals in: query description: Return results as an array when false (default). Return results inside an object that also contains a total result count when true. schema: type: boolean - name: from in: query description: Log Event Id from which to start selection from. schema: type: string - name: take in: query description: Number of entries to retrieve when using the from parameter. Default 50, max 100 schema: type: integer - name: search in: query description: 'Retrieves logs that match the specified search criteria. This parameter can be combined with all the others in the /api/logs endpoint but is specified separately for clarity. If no fields are provided a case insensitive ''starts with'' search is performed on all of the following fields: client_name, connection, user_name. Otherwise, you can specify multiple fields and specify the search using the %field%:%search%, for example: application:node user:"John@contoso.com". Values specified without quotes are matched using a case insensitive ''starts with'' search. If quotes are used a case insensitve exact search is used. If multiple fields are used, the AND operator is used to join the clauses.' schema: type: string responses: '200': description: Logs successfully retrieved. content: application/json: schema: $ref: '#/components/schemas/ListLogResponseContent' '400': description: Invalid request URI. The message will vary depending on the cause. '401': description: Invalid token. x-description-1: Invalid signature received for JSON Web Token validation. '403': description: 'Insufficient scope; expected any of: read:logs, read:logs_users.' '429': description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers. operationId: get_logs x-release-lifecycle: GA x-operation-name: list x-operation-request-parameters-name: ListLogsRequestParameters x-operation-group: logs security: - bearerAuth: [] - oAuth2ClientCredentials: - read:logs - read:logs_users /logs/{id}: get: summary: Get a Log Event by Id description: Retrieve an individual log event. tags: - logs parameters: - name: id in: path description: log_id of the log to retrieve. required: true schema: type: string responses: '200': description: Log successfully retrieved. content: application/json: schema: $ref: '#/components/schemas/GetLogResponseContent' '400': description: Invalid request URI. The message will vary depending on the cause. '401': description: Invalid token. x-description-1: Invalid signature received for JSON Web Token validation. '403': description: 'Insufficient scope; expected any of: read:logs, read:logs_users.' '404': description: Log not found. '429': description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers. operationId: get_logs_by_id x-release-lifecycle: GA x-operation-name: get x-operation-group: logs security: - bearerAuth: [] - oAuth2ClientCredentials: - read:logs - read:logs_users components: schemas: ListLogOffsetPaginatedResponseContent: type: object additionalProperties: false properties: start: type: number limit: type: number length: type: number total: type: number logs: type: array items: $ref: '#/components/schemas/Log' LogDate: oneOf: - type: string description: Date when the event occurred in ISO 8601 format. default: '2016-02-23T19:57:29.532Z' - $ref: '#/components/schemas/LogDateObject' GetLogResponseContent: type: object additionalProperties: true properties: date: $ref: '#/components/schemas/LogDate' type: type: string description: Type of event. default: sapi description: type: - string - 'null' description: Description of this event. connection: type: string description: Name of the connection the event relates to. connection_id: type: string description: ID of the connection the event relates to. client_id: type: string description: ID of the client (application). default: AaiyAPdpYdesoKnqjj8HJqRn4T5titww client_name: type: string description: Name of the client (application). default: My application Name ip: type: string description: IP address of the log event source. default: 190.257.209.19 hostname: type: string description: Hostname the event applies to. default: 190.257.209.19 user_id: type: string description: ID of the user involved in the event. default: auth0|56c75c4e42b6359e98374bc2 user_name: type: string description: Name of the user involved in the event. audience: type: string description: API audience the event applies to. scope: type: string description: Scope permissions applied to the event. default: '' strategy: type: string description: Name of the strategy involved in the event. strategy_type: type: string description: Type of strategy involved in the event. log_id: type: string description: Unique ID of the event. isMobile: type: boolean description: Whether the client was a mobile device (true) or desktop/laptop/server (false). details: $ref: '#/components/schemas/LogDetails' user_agent: type: string description: User agent string from the client device that caused the event. security_context: $ref: '#/components/schemas/LogSecurityContext' location_info: $ref: '#/components/schemas/LogLocationInfo' Log: type: object additionalProperties: true properties: date: $ref: '#/components/schemas/LogDate' type: type: string description: Type of event. default: sapi description: type: - string - 'null' description: Description of this event. connection: type: string description: Name of the connection the event relates to. connection_id: type: string description: ID of the connection the event relates to. client_id: type: string description: ID of the client (application). default: AaiyAPdpYdesoKnqjj8HJqRn4T5titww client_name: type: string description: Name of the client (application). default: My application Name ip: type: string description: IP address of the log event source. default: 190.257.209.19 hostname: type: string description: Hostname the event applies to. default: 190.257.209.19 user_id: type: string description: ID of the user involved in the event. default: auth0|56c75c4e42b6359e98374bc2 user_name: type: string description: Name of the user involved in the event. audience: type: string description: API audience the event applies to. scope: type: string description: Scope permissions applied to the event. default: '' strategy: type: string description: Name of the strategy involved in the event. strategy_type: type: string description: Type of strategy involved in the event. log_id: type: string description: Unique ID of the event. isMobile: type: boolean description: Whether the client was a mobile device (true) or desktop/laptop/server (false). details: $ref: '#/components/schemas/LogDetails' user_agent: type: string description: User agent string from the client device that caused the event. security_context: $ref: '#/components/schemas/LogSecurityContext' location_info: $ref: '#/components/schemas/LogLocationInfo' LogLocationInfo: type: object description: Information about the location that triggered this event based on the `ip`. additionalProperties: true properties: country_code: type: string description: Two-letter Alpha-2 ISO 3166-1 country code. minLength: 2 maxLength: 2 country_code3: type: string description: Three-letter Alpha-3 ISO 3166-1 country code. minLength: 3 maxLength: 3 country_name: type: string description: Full country name in English. city_name: type: string description: Full city name in English. latitude: type: number description: Global latitude (horizontal) position. longitude: type: number description: Global longitude (vertical) position. time_zone: type: string description: Time zone name as found in the tz database. continent_code: type: string description: Continent the country is located within. Can be `AF` (Africa), `AN` (Antarctica), `AS` (Asia), `EU` (Europe), `NA` (North America), `OC` (Oceania) or `SA` (South America). LogDetails: type: object description: Additional useful details about this event (structure is dependent upon event type). additionalProperties: true LogSecurityContext: type: object description: Information about security-related signals. additionalProperties: true properties: ja3: type: string description: JA3 fingerprint value. ja4: type: string description: JA4 fingerprint value. LogDateObject: type: object description: Date when the event occurred in ISO 8601 format. additionalProperties: true ListLogResponseContent: oneOf: - type: array items: $ref: '#/components/schemas/Log' - $ref: '#/components/schemas/ListLogOffsetPaginatedResponseContent'