<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
0D54z00007DAr80CADOkta Identity EngineWorkflowsAnswered2023-11-20T20:40:54.000Z2021-09-30T21:15:43.000Z2021-09-30T22:50:52.000Z

ServiceS.28798 (Freedom Financial Network) asked a question.

Custom API Action returns JSON object in brackets; can't use Get to extract values

It seems there has to be something very obvious that I am missing....

I have a card for a Custom API Action that searches for a user by employeeNumber. It returns a single user's full JSON object data. I am trying to run a Get card to extract data. (I've done this successfully many times in other use cases but not with a query by employeeNumber,). No matter what apparent Get pathing syntax I use, it doesn't match any data. If I run a test with the square "[" "]" brackets removed from the input data, the Get finds exactly what I am looking for. How do I handle the pathing with the [ / ] brackets wrapping the output?


  • Hi @ServiceS.28798 (Freedom Financial Network)​,

     

    It sounds like the Custom API Action is returning an array of users that contains just the one user. To use the Object Get card you will need to include an index in the path input of the Object Get card. For example, if you were to call the Okta API to return a list of users, you could get the email address of the first user in the array using this path: 0.profile.email

     

     Let us know if this helps or you have any further questions.

     

    Blake at Okta, Inc.

    Expand Post
    Selected as Best
  • Hi @ServiceS.28798 (Freedom Financial Network)​,

     

    It sounds like the Custom API Action is returning an array of users that contains just the one user. To use the Object Get card you will need to include an index in the path input of the Object Get card. For example, if you were to call the Okta API to return a list of users, you could get the email address of the first user in the array using this path: 0.profile.email

     

     Let us know if this helps or you have any further questions.

     

    Blake at Okta, Inc.

    Expand Post
    Selected as Best
  • ServiceS.28798 (Freedom Financial Network)

    Worked. Thanks. I had tried the 0 but I had a . in front of the 0

This question is closed.
Loading
Custom API Action returns JSON object in brackets; can't use Get to extract values