When json format is requested, the result will be an object when size = 1, an array when size > 1. Defaults to 1, or if a saved schema is used, the number of rows specified on the saved schema. If specified, the response will be in jsonp format. The name of a javascript function to call in the response. When false, the data is returned in the response body and there is a 5000 record limit regardless of plan. A paid plan is required to use background=true. The maximum amount of records that can be generated is based on your plan. When set to true data will be generated in the background rather than being returned directly. Set to true to include the BOM (byte order mark). Defaults to false.īoolean (optional, only used when format is csv, txt, or custom) To always return an array, specify a value of "true" for this parameter. When generating json data, Mockaroo will return an array when count > 1 and an object when count is 1. Results are returned as SQL insert statements. Subsequent rows will contain the generated data values. The first row will contain the field names. Specify a custom quote character using the "quote_char" query parameter. Specify a custom delimiter using the "delimiter" query parameter. Results will be returned as an array if the "size" query string parameter is greater than 1.Ĭomma separated values. Output format is specified by the file type part of the URL. POST (.format)?key=(your API key) Formats The Mockaroo Generate API has the following methods: GET /api/types This allows developers with paid plans to issue many more small requests than would be allowed with a free plan. Silver and Gold plans are limited to a total number of records per day (with no request limit). Sign up to obtain an API Key Usage Limitsįree plans are limited to 200 requests per day. Gaining Accessīoth APIs require an API Key to be passed with each request, either as a query string parameter called "key" or as an "X-API-Key" request header. Configure Mock APIs using the APIs link in the header. Mock APIs are ideal for simulating back ends before they're built so you can start working on your front end code. Mock APIs give your full control over URLs, handling request parameters, and simulating errors. Anything you can generate via the website can also be generated via the data API. Mockaroo's Generate API is a single endpoint that you can use to generate data based on a saved schema or fields you define in the post body of the request. Mockaroo offers two different approaches for downloading data programmatically:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |