Get the structure of the function stack through API

Options

Maybe it's a bit confusing what I want, but does Xano have an API where I can get the data from an endpoint or function?

By "data" I mean the structure of the endpoint/function- each step of the logic?

Is this possible or am I crazy

Comments

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Hi, you can data from external API's as well as Xano functions. What do you mean by each step of the logic? Can you provide some example so I can better understand?

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    Hi @nelson artunduaga, I'm also wondering if you can provide more clarity here

  • nelson artunduaga
    nelson artunduaga Member
    edited June 2023
    Options

    I'm sorry if I didn't make myself easily understood.
    in one of my endpoints/functions (of my workspace) I want to make a request to Xano to return me the structure of the logic of that endpoint/function.

    Example:

    If I have a function/endpoint called "hello world".
    that creates a variable with a value "hello" and another variable with value "world" and then I make a concatenation of both variables and this is the result of this function/endpoint.

    I would like to see this step by step in a JSON.

    1. create variable
    2. create variable
    3. Concatenation
    4. response
      It is not necessary to see the "real" result because of course, these values will depend on the inputs of the functions, etc.
      I only need the structure : create a variable, then another, then concatenate and finalize the logic. (for this example)

    I know that it is something difficult to explain and that surely it will not be possible, but finally that is what I need, to see in a JSON text the structure of some of my own functions.

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    The closest thing that comes to my mind is to just create an object at the end of your function stack and set all steps that you have done there and then use it as an output

  • nelson artunduaga
    Options

    @Pawel Magdanski Thanks for replying 🙏, I see that this option will not be useful, since in this example the results would be something like:

    Step1: null / or the database object.
    Step2 : null

    That's an example, but I wouldn't be able to see what variable 1 or 2 does, only the result.

    I think this goes more towards the step by step that the debugger delivers when you see what happened at each step.

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Hi,

    What debuggers is showing are also the results of each step and + the state of previously establish variables and inputs. If you have variable with some math operation inside you are not seeing every operation in the debugger step by step.

    Maybe I don't fully understant what you are trying to do, can you explain what can't you show in JSON object that you can see in debugger?