Api for creating projects and project assets

I’m trying to work out how to integrate the use of Mockaroo into our development workflow, specifically around automation. Ideally, I’d like to be able to source control all of my Mockaroo assets and be able to upload them via an API (possibly via source control triggered web hook), and then run some data generation scripts. There seems to be limited support for the concept of specifying schema as a parameter in the generate APIs but it doesn’t appear to cover scenarios and I couldn’t find any ability to create Mock APIs via API at all. Its all manual via the UX. Datasets seem to be supported though via API. My problem is it appears to be a bit of a mix between things than can be automated and things that can’t.

Is there a programmatic way to go from file based, source controlled Mockaroo asset to dynamically generated test data via automation? Apologies if there is another thread on this but I couldn’t spot one.

Just an update on this - I have found that you can actually post the columns that you want to the generate API instead of using a named schema, which is nice. You basically do a POST instead of a GET, specifying the column collection as your body payload. There seems to be a limitation around the use of scenarios though - they are referenced by name in the column definition, but I can’t see a way to upload the scenarios themselves or inline them.

Hi @grumpyn8 , Can you please give me the format or the code where you give the column names as a payload. I have tried multiple different formats and json structures but still couldnt get it work, it returning error in all the format. It would be really, if you can provide me a sample code for the payload and calling of the API. Thanks in advance.

2 Likes