I want to use prefect to validate api data from an...
# ask-community
j
I want to use prefect to validate api data from an endpoint; is there a good way to report the results of the validations for example data for this ID was wrong
k
Hey @John Ramirez, how to you want to report it? You can use Prefect Artifacts or use the SlackTask?
j
I guess I want something to say task X failed, task Y successful
k
So this is all visible in the UI. Using the Flow to do it is quite tricky. First, you have to read about State Handlers. You need a Flow state handler to run at the end of the flow. And then you need to use the GraphQL client and query for the states of the task in the current flow run, and then format that and send it to Slack with Python