<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z00009xQX5cCAGOkta Classic EngineAPI Access ManagementAnswered2025-09-13T09:01:51.000Z2024-01-19T21:10:07.000Z2024-01-19T23:48:47.000Z

PavloY.54590 (Customer) asked a question.

System logs api published filter not working correctly

Hello. I am trying to use system log api with published filter.

Not working both in api directly or in admin panel

`{{baseUrl}}/api/v1/logs/?limit=100&filter=published gt "2024-01-10T19:11:40.930Z"`

But it's not working, the response is empty with any date i entered.

/help/servlet/rtaImage?refid=0EM4z000007oFWd

Same request using since is working properly and i have bunch of events

`{{baseUrl}}/api/v1/logs/?limit=100&since=2024-01-10T19:11:40.930Z`

/help/servlet/rtaImage?refid=0EM4z000007oFWY


  • a0n5s (a0n5s)

    could you give a full json of system log record which contain published for example?

  • PavloY.54590 (Customer)

    here's first one from request with since

    ```

    {

        "actor": {

          "id": "***",

          "type": "PublicClientApp",

          "alternateId": "",

          "displayName": ""***",

          "detailEntry": null

        },

        "client": {

          "userAgent": {

            "rawUserAgent": "python-requests/2.31.0",

            "os": "Unknown",

            "browser": "UNKNOWN"

          },

          "zone": "null",

          "device": "Unknown",

          "id": ""***",

          "ipAddress": ""***",

          "geographicalContext": {

            "city": ""***",

            "state": ""***",

            "country": ""***",

            "postalCode": ""***",

            "geolocation": {

              "lat": 00,

              "lon": -00

            }

          }

        },

        "device": null,

        "authenticationContext": {

          "authenticationProvider": null,

          "credentialProvider": null,

          "credentialType": null,

          "issuer": null,

          "interface": null,

          "authenticationStep": 0,

          "externalSessionId": "unknown"

        },

        "displayMessage": "OIDC access token is granted",

        "eventType": "app.oauth2.token.grant.access_token",

        "outcome": {

          "result": "SUCCESS",

          "reason": null

        },

        "published": "2024-01-10T19:16:08.881Z",

        "securityContext": {

          "asNumber": null,

          "asOrg": null,

          "isp": null,

          "domain": null,

          "isProxy": null

        },

        "severity": "INFO",

        "debugContext": {

          "debugData": {

            "clientAuthType": "client_secret_post",

            "grantedScopes": "okta.logs.read, offline_access, okta.users.read",

            "requestId": ""***",

            "responseTime": "288",

            "dtHash": ""***",

            "clientSecret": ""***",

            "requestUri": "/oauth2/v1/token",

            "requestedScopes": "",

            "threatSuspected": "false",

            "grantType": "refresh_token",

            "url": "/oauth2/v1/token?"

          }

        },

        "legacyEventType": "app.oauth2.token.grant.access_token_success",

        "transaction": {

          "type": "WEB",

          "id": ""***",

          "detail": {}

        },

        "uuid": "b5977a5c-afec-11ee-99c2-659e9ea63176",

        "version": "0",

        "request": {

          "ipChain": [

            {

              "ip": ""***",

              "geographicalContext": {

                "city": ""***",

                "state": ""***",

                "country": ""***",

                "postalCode": ""***",

                "geolocation": {

                  "lat": 0,

                  "lon": -0

                }

              },

              "version": "V4",

              "source": null

            }

          ]

        },

        "target": [

          {

            "id": ""***",

            "type": "User",

            "alternateId": null,

            "displayName": null,

            "detailEntry": null

          },

          {

            "id": ""***",

            "type": "access_token",

            "alternateId": null,

            "displayName": "Access Token",

            "detailEntry": {

              "expires": "2024-01-10T20:16:08.000Z",

              "subject": ""***",

              "hash": ""***"

            }

          }

        ]

      },

    ```

    Expand Post
  • Mihai N. (Okta, Inc.)

    Hi @PavloY.54590 (Customer)​ , Thank you for reaching out to the Okta Community! 

     

    If I’m not mistaking you need to use the “since” parameter: 

    https://developer.okta.com/docs/reference/api/system-log/#datetime-filter

    Please try something like 

     

     {{url}}/api/v1/logs?since=2024-01-10T19:11:40.930Z&limit=100

     

     

     

    If my answer helped, remember to mark it as best to increase its visibility for other members of the Okta Community who might have the same questions as you. 

     

    Hope my answer helps! 

    --------------------------------

    Ask the Experts: Now Thru 1/31 Okta FastPass Engineering and Product Teams Answer Your Questions

    Expand Post
This question is closed.
Loading
System logs api published filter not working correctly