Okta.Sdk.Api.SystemLogApi

October 22, 2025 ยท View on GitHub

All URIs are relative to https://subdomain.okta.com

MethodHTTP requestDescription
ListLogEventsGET /api/v1/logsList all System Log events

ListLogEvents

List<LogEvent> ListLogEvents (string since = null, string until = null, string after = null, string filter = null, string q = null, int? limit = null, SortOrderParameter? sortOrder = null)

List all System Log events

Lists all System Log events See System Log query for further details and examples, and System Log filters and search for common use cases. By default, 100 System Log events are returned. If there are more events, see the header link for the next link, or increase the number of returned objects using the limit parameter. >Note: The value of the clientSecret property in the System Log is secured by a hashing function, and isn't the value used during authentication.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class ListLogEventsExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new SystemLogApi(config);
            var since = "\"7 days prior to until\"";  // string | Filters the lower time bound of the log events `published` property for bounded queries or persistence time for polling queries (optional)  (default to "7 days prior to until")
            var until = "\"current time\"";  // string | Filters the upper time bound of the log events `published` property for bounded queries or persistence time for polling queries. (optional)  (default to "current time")
            var after = "after_example";  // string | Retrieves the next page of results. Okta returns a link in the HTTP Header (`rel=next`) that includes the after query parameter (optional) 
            var filter = "filter_example";  // string | Filter expression that filters the results. All operators except [ ] are supported. See [Filter](https://developer.okta.com/docs/api/#filter) and [Operators](https://developer.okta.com/docs/api/#operators). (optional) 
            var q = "q_example";  // string | Filters log events results by one or more case insensitive keywords. (optional) 
            var limit = 100;  // int? | Sets the number of results that are returned in the response (optional)  (default to 100)
            var sortOrder = (SortOrderParameter) "ASCENDING";  // SortOrderParameter? | The order of the returned events that are sorted by the `published` property (optional) 

            try
            {
                // List all System Log events
                List<LogEvent> result = apiInstance.ListLogEvents(since, until, after, filter, q, limit, sortOrder).ToListAsync();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling SystemLogApi.ListLogEvents: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
sincestringFilters the lower time bound of the log events `published` property for bounded queries or persistence time for polling queries[optional] [default to "7 days prior to until"]
untilstringFilters the upper time bound of the log events `published` property for bounded queries or persistence time for polling queries.[optional] [default to "current time"]
afterstringRetrieves the next page of results. Okta returns a link in the HTTP Header (`rel=next`) that includes the after query parameter[optional]
filterstringFilter expression that filters the results. All operators except [ ] are supported. See Filter and Operators.[optional]
qstringFilters log events results by one or more case insensitive keywords.[optional]
limitint?Sets the number of results that are returned in the response[optional] [default to 100]
sortOrderSortOrderParameter?The order of the returned events that are sorted by the `published` property[optional]

Return type

List<LogEvent>

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Success-
400Bad Request-
403Forbidden-
429Too Many Requests-

[Back to top] [Back to API list] [Back to Model list] [Back to README]