# Retrieve a log entry (/docs/apis/management/logs/FindLogById)

`GET /logs/{log_id}`

Retrieves detailed information for the specified log entry.

Base URL: `https://{tenant}.{region}.monocloud.com/api`, where `{tenant}`, `{region}` (one of us, eu, in) come from your tenant. Authentication: send your Management API key in the `X-API-KEY` header.

## Parameters

- `log_id` (path) (string, required, uuid) The unique identifier of the log entry.

## Response body

`200`, JSON. The log entry was retrieved successfully

Returns `Log`.

- `id` (string, required, uuid) The unique identifier of the log entry.
- `time_stamp` (integer, required, date-time) Specifies the event time (in Epoch).
- `category` (string, required) The event category. One of: `authentication`, `tokens`, `consent`, `blocks`, `users`, `user_sessions`, `notifications`, `resources`, `trust_store`, `clients`, `groups`, `grants`, `policies`, `network_zones`.
- `name` (string, required) The event name.
- `description` (string, required) A human-readable description of the event.
- `type` (string, required) The event severity/type. One of: `success`, `failure`, `information`, `error`.
- `code` (string, required) The event code. One of: `authorization_succeeded`, `authorization_failed`, `pushed_authorization_succeeded`, `pushed_authorization_failed`, `client_authentication_succeeded`, `client_authentication_failed`, `api_authentication_succeeded`, `api_authentication_failed`, `password_flow_authentication_succeeded`, `password_flow_authentication_failed`, `device_authorization_succeeded`, `device_authorization_failed`, `mtls_authentication_succeeded`, `mtls_authentication_failed`, `user_lookup_failed`, `external_provider_authentication_failed`, `user_sign_in_succeeded`, `user_sign_in_failed`, `user_registration_succeeded`, `user_sign_out_succeeded`, `token_issuance_succeeded`, `token_issuance_failed`, `token_introspection_succeeded`, `token_introspection_failed`, `token_revocation_succeeded`, `token_revocation_failed`, `consent_granted`, `consent_denied`, `identifier_ip_blocked`, `user_account_blocked`, `user_account_unblocked`, `user_account_ip_blocked`, `user_account_ip_unblocked`, `user_account_all_unblocked`, `user_account_all_ip_blocks_removed`, `user_created`, `user_deleted`, `user_password_reset_succeeded`, `user_added_to_group`, `user_removed_from_group`, `user_session_revoked`, `user_sessions_revoked_all`, `user_sessions_deleted_all`, `sign_in_email_sending_succeeded`, `verification_email_sending_succeeded`, `welcome_email_sending_succeeded`, `password_change_email_sending_succeeded`, `password_reset_email_sending_succeeded`, `user_blocked_email_sending_succeeded`, `sign_in_sms_sending_succeeded`, `verification_sms_sending_succeeded`, `password_reset_sms_sending_succeeded`, `email_sending_failed`, `sms_sending_failed`, `api_resource_created`, `api_resource_updated`, `api_resource_deleted`, `api_resource_secret_created`, `api_resource_secret_deleted`, `api_access_policy_created`, `api_access_policy_updated`, `api_access_policy_deleted`, `trust_store_created`, `trust_store_updated`, `trust_store_deleted`, `trust_store_revocation_added`, `trust_store_revocation_removed`, `trust_store_certificate_banned`, `trust_store_certificate_unbanned`, `trust_store_svid_banned`, `trust_store_svid_unbanned`, `client_created`, `client_updated`, `client_deleted`, `client_secret_created`, `client_secret_deleted`, `client_added_to_group`, `client_removed_from_group`, `group_created`, `group_updated`, `group_deleted`, `user_grants_revoked`, `authorization_code_revoked`, `user_consent_revoked`, `reference_token_revoked`, `refresh_token_revoked`, `usage_threshold_reached`, `network_zone_created`, `network_zone_updated`, `network_zone_deleted`.
- `message` (string) The message associated with the event.
- `system` (LogSystem, required) System/environment details for the event.
  - `activity_id` (string) The activity identifier associated with the request.
  - `process_id` (integer, required, int32) The process identifier of the executing service.
  - `local_ip` (LogIpDetails, required) The local IP address details of the service handling the request.
    - `ip` (string, required) The IP address.
    - `version` (string, required) The IP address version.
- `request` (LogRequest, required) Request details for the event.
  - `trace_id` (string) The trace identifier of the request.
  - `user_agent` (string) The user agent associated with the request.
  - `remote_ip` (LogIpDetails) The remote IP address of the request.
    - `ip` (string, required) The IP address.
    - `version` (string, required) The IP address version.
  - `location` (LogLocation) The geographical location from which the request was made.
    - `region` (string) The region or state of the request.
    - `region_code` (string) The region or state code of the request.
    - `city` (string) The city of the request.
    - `country` (string) The country of the request.
    - `continent` (string) The continent of the request.
    - `latitude` (string) The latitude of the request.
    - `longitude` (string) The longitude of the request.
    - `time_zone` (string) The IANA time zone of the request.
    - `zip_code` (string) The postal or zip code of the request.
  - `is_mtls` (boolean, required) Specifies whether the request was a mTLS request.
  - `is_spiffe` (boolean, required) Specifies whether the request was authenticated with a SPIFFE SVID.
  - `trust_store_id` (string) The id of the trust store used to authenticate the request.
  - `certificate_subject` (string) The subject of the client certificate used in the request.
  - `certificate_issuer` (string) The issuer of the client certificate used in the request.
  - `certificate_thumbprint` (string) The SHA-256 thumbprint of the client certificate used in the request.
  - `certificate_serial_number` (string) The serial number of the client certificate used in the request.
  - `certificate_san_uris` (array) The SAN URIs of the client certificate used in the request.
  - `certificate_san_dns_names` (array) The SAN DNS names of the client certificate used in the request.
  - `certificate_san_ip_addresses` (array) The SAN IP addresses of the client certificate used in the request.
  - `certificate_san_emails` (array) The SAN email addresses of the client certificate used in the request.
  - `certificate_san_upns` (array) The SAN UPNs of the client certificate used in the request.
  - `spiffe_id` (string) The SPIFFE ID of the SVID (X.509-SVID or JWT-SVID) that authenticated the request.
- `source` (string) The source endpoint or path that generated the event.
- `actor` (LogActor, required) The actor that performed the action.
  - `type` (string, required) The actor type. One of: `unknown`, `system`, `api_key`, `private_api_key`, `public_api_key`, `user`, `admin_user`, `api`, `client`, `certificate`.
  - `id` (string) The unique identifier of the actor entity.
  - `name` (string) The display name of the actor.
  - `identifier` (string) The primary identifier of the actor (for example, email address).
  - `session_id` (string) The unique identifier of the session associated with the action.
- `targets` (LogTarget[], required) The targets affected by the action.
  - `type` (string, required) The target type. One of: `user`, `tenant`, `tenant_key`, `subscription`, `client`, `client_secret`, `group`, `user_consent`, `user_identifier`, `external_provider`, `ip_address`, `user_session`, `user_grants`, `trust_store`, `api_resource`, `api_resource_secret`, `claim_resource`, `scope`, `api_scope`, `network_zone`, `key_material`, `system`, `api_access_policy`.
  - `id` (string) The unique identifier of the target entity.
  - `name` (string) The display name of the target entity.
  - `identifier` (string) The primary identifier of the target entity (for example, email address).
- `client` (LogClient) The client application details.
  - `id` (string) The unique identifier of the client application associated with the event.
  - `name` (string) The display name of the client application.
- `details` (LogDetails) Additional event-specific details.

## Errors

- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
  - `type` (string, required) A URI reference that identifies the error type. When accessed, it may provide human-readable documentation.
  - `title` (string, required) A short, human-readable summary of the error.
  - `status` (integer, required, int32) The HTTP status code associated with this error response.
  - `trace_id` (string, required) A unique identifier for the request, used for tracing and diagnostics.
  - `detail` (string) A human-readable explanation specific to this occurrence of the error.
  - `instance` (string) A URI reference that identifies the specific occurrence of the error.
- `422` Unprocessable Entity
  - `type` (string, required) A URI reference that identifies the error type. When accessed, it may provide human-readable documentation.
  - `title` (string, required) A short, human-readable summary of the error.
  - `status` (integer, required, int32) The HTTP status code associated with this error response.
  - `trace_id` (string, required) A unique identifier for the request, used for tracing and diagnostics.
  - `detail` (string) A human-readable explanation specific to this occurrence of the error.
  - `instance` (string) A URI reference that identifies the specific occurrence of the error.
  - `errors` (Record<string, string[]>, required) A key-value map of validation errors, where each key represents a request field and the value contains one or more messages describing why the request could not be processed.

## Example (MonoCloud .NET SDK)

```csharp
using MonoCloud.Management;
using MonoCloud.Management.Core.Base;

var apiClient = new MonoCloudManagementClient(new MonoCloudConfig("<your-domain>", "[[API-Key]]"));


var logId = Guid.Parse("4d86d918-069c-4f3a-b82c-47a61bdc903b");


var result = await apiClient.Logs.FindLogByIdAsync(logId);
```

## Example (MonoCloud Javascript SDK)

```javascript
import { MonoCloudManagementClient } from '@monocloud/management';

const apiClient = MonoCloudManagementClient.init({ domain: '<your-domain>', apiKey: '[[API-Key]]' });

const logId = '4d86d918-069c-4f3a-b82c-47a61bdc903b';

const result = apiClient.logs.findLogById(logId);
```