An endpoint should be added to allow users to generate data against a given schema, with the data being stored in the mongodb database so that it can be recalled later.
POST /api/data
Request Body
{
"schema": "<schema id or slug>",
"count": XX, // # records to generate
"slug": "<slug of generated data>"
}
schema specifies which schema to use to generate the data. It can be a human-facing slug or an ID.
count specifies how many records to generate. This is optional, default to 50.
slug specifies a human-facing identifier for the generated data. This is optional, no default.
Responses
400 Bad Request
Returned if request body is invalid, e.g. slug conflict, malformed JSON, invalid values, formula/schema errors.
An endpoint should be added to allow users to generate data against a given schema, with the data being stored in the mongodb database so that it can be recalled later.
POST
/api/data
Request Body
schema
specifies which schema to use to generate the data. It can be a human-facing slug or an ID.count
specifies how many records to generate. This is optional, default to50
.slug
specifies a human-facing identifier for the generated data. This is optional, no default.Responses
400 Bad Request
Returned if request body is invalid, e.g. slug conflict, malformed JSON, invalid values, formula/schema errors.
201 Created