Hi, I'm trying to get the response of a flow run t...
# ask-community
l
Hi, I'm trying to get the response of a flow run through the REST API. I'm using `fetch(`http://localhost:4200/api/flow_runs/${response.id}`` to fetch the data and just getting
*data*: {encoding: 'orion', blob: '{"encoding": "file", "blob": "file:///tmp/78442fec16214918a437e768fa384762"}'}
in the
state
section. Is there something I should configure to get the whole response? Thanks
k
If using the Python client, you can do 
state_data = state.result()
l
Thanks @Kevin Kho, but I'm instead calling those requests in a JavaScript environment
I'm using Prefect Orion
k
Yeah the Python Client was for Orion. If you are in a JS environment, you can try hitting the
/api/data/retrieve
 endpoint with the 
data
 from the flow run response.
You may have a rough time using JS. It’s not recommended
l
Thanks @Kevin Kho the endpoint worked fine, but the response is retrieved with the info pickled and I could not find how to unpickle in a Javascript environment, I'll try something else