How do we export the entire schema to CSV using pyhton? #472
Replies: 2 comments
-
@sameer-metron there are a couple of ways this could be done depending on the desired result and how much you want to rely on the Python code as opposed to using logic already implemented in the Alternately the code could query the OCSF server api endpoints - especially useful if if a more complex use case was required. This would save having to construct the schema with the Python code, but not really necessary if none of the attributes and relationships are of interest. |
Beta Was this translation helpful? Give feedback.
-
This will give it to you in JSON curl -X GET "https://schema.ocsf.io/export/schema" -H "accept: application/json" Converting that to CSV in a useful way depends a lot on what you are actually trying to do with the CSV, but should be pretty simple using various JSON command-line tools and/or python |
Beta Was this translation helpful? Give feedback.
-
How can we export the schema to a CSV file having the columns as ['Name', 'Caption', 'Description', 'Type']?
Beta Was this translation helpful? Give feedback.
All reactions