Adding a results.json file

A key feature of One Codex is the ability to have retrieve a structured, machine-readable version of the results of your workflow accessible over the One Codex API. All of our One Codex analyses provide this JSON result representation by default, and we've made it easy for you to include the same functionality in your workflows.

All you need to do is output a file named results.json with a valid, JSON-encoded representation of your analysis results at the top level of the working directory. When your workflow completes, we will automatically search for this file, and if found we'll parse the contents and make them accessible to you via the /api/v1/analyses/<analysis uuid>/results API route.

🚧

A note on invalid results.json files

If you have a results.json file in the working directory that is empty or does not contain valid JSON, we will consider the analysis to have failed.

πŸ“˜

JSON schema for results.json files

At the moment, your results.json file can contain any JSON object you'd like. We don't valid the contents of the JSON, just that it is valid JSON. That means you can feel free to follow whatever schema you'd like.

In the future, we will offer particular schema definitions that will let us e.g. provide you with more enhanced, dynamic results visualizations for your workflows. Once we release those, we'll give you the option to opt-in to having your results.jsonfile validated against those schemas. But for now, let your imagination run wild!


What’s Next

Learn how outputs are made available.