Quantcast
Channel: Mockaroo Community Forum - Latest posts
Viewing all 2648 articles
Browse latest View live

How to pass the field value in API


How to pass the field value in API

$
0
0

Harish,
I am unable to access your schema "Quote" but I think I understand what you are trying to do. If you are wanting to use an URL parameter as the value to a column then you should use the following.

Schema: https://www.mockaroo.com/10be7960

Contains a field, Status that is of Formula type. The formula being used is request_params['status']

The Mock API url looks like this: https://my.api.mockaroo.com/3118.json?key=xyxyxyxy&status=Completed

Result:
id,Status
1,Completed
2,Completed
3,Completed
4,Completed
5,Completed
6,Completed
7,Completed
8,Completed
9,Completed
10,Completed

Hope that helps you out.

How to pass the field value in API

$
0
0

Thanks for the reply ,and i got your point but I want the status column to be dataset so that when i pass the status Submitted in the API then it matches the values in dataset and then give me the records.
If I add request_params['status'] then anything/dummy can be passed.

How to pass the field value in API

Need first word of my custom list to be static, is it possible?

UTF-8 Data Set could not be read, but ANSI upload successful

$
0
0

You can simply use the Notepad editor is the Windows operating system. you can easily write your article in the notepad.If your windows are not working properly then please contact Windows Update Error Code 0x80073712 for the best solution.

Entity always return "null". What's wrong?

$
0
0

So I got schema with 2 fields: id and name
I sending API call like that:

schema "v2"
data = generate 1
data['name'] = entity['name']
data

curl -H "X-API-Key: 47fda570" -X POST -d '{"name":"random_POSTname"}' https://my.api.mockaroo.com/v2.json

and Instead of getting name: "random_POSTname" I'm getting response:

{"id":1,"name":null}

Is "entity" option working correctly?

Entity always return "null". What's wrong?

$
0
0

I don't have experience with the v2 version of the interface, so I can only provide you an answer for the methods described at the API documentation page.

What I noticed is that {"id":1,"name":null} is always the default output, so there is something wrong in your request.

I do not know which operating system you are using, but you can not use single quotes in windows (command prompt) to surround a parameter.

Also try to understand the API reference, because this is not how the parameters work: You have to provide a JSON array with n objects each containing at least a name attribute and a type attribute.

What I did to make it work in your case is:
1. use the "old" api
2. Provide an Array
3. Add an object with name=name, type=Blank, formula="random_POSTname"

With the double quote escaping of the Windows command line, it gets a bit messy, so please consider using a file as data instead of cmd parameters.

Solution:
curl "https://api.mockaroo.com/api/generate.json?key={{YOUR_API_KEY}}&count=5" -d "[{"""name""":"""name""","""type""":"""Blank""","""formula""":"""'random_POSTname'"""}]"

Please change {{YOUR_API_KEY}} with the relevant value (maybe you want to remove it from your original question too, to prevent abuse).


Creating an email address with a sequential number?

$
0
0

When you are creating the email you can choose the Alphabetic or numeric values. you can also use the Roadrunner email for better email services. for instant support related to the Roadrunner Email please contact Roadrunner Email Error 0x800ccc90 for the proper solution.

Datasets upload via REST API

$
0
0

Bump Bump... not hearing back from Mark. Is this a dead service?

Save option is not working

$
0
0

Save option is not working

Showing : We're sorry, but something went wrong.

Creating an Array of simple types not working

$
0
0

Note: this fails for CSV, but works for json...

I'm trying to create an array of strings. I choose Custom List and give it values of "Task, File, Note, Appt"

  • If I call the field registrations[], it will populate with a single value.

  • If i call the field registrations[1-2], it always ends up empty

I do exactly as described here but it does not work - https://mockaroo.com/ff6a9e90

Field not Found Error for Email Address Type

$
0
0

I am receiving a field not found error for an email field. If I switch the field in the formula to the Id field, everything works as expected.

Sample Schema

Creating an Array of simple types not working

$
0
0

You can use a Formula field and enter this formula. It does behave a bit differently, but it solves your case for CSVs if you want to have one column with multiple random values in a comma separated list.

'Task,File,Note,Appt'.split(',').sample(random(1,4)).join(', ')

Field not Found Error for Email Address Type

$
0
0

Can you update your sample schema link?

The page you are looking for does not exist.

There is a 'Share Link:' at the bottom of your schema you need to use, not the url of the schema.


Field not Found Error for Email Address Type

Cannot upload a CSV to create a Schema

$
0
0

I will recommend you to use Total CSV Converter tool developed by COOLUTIL company. This tool is used to convert CSV and TSV files into DOC, PDF, JSON nd many more. Software comes in two variants Paid and Free. I will personally recommend you to go with free version at first.

Datasets upload via REST API

$
0
0

mockaroo - is this going to be available soon?

Field not Found Error for Email Address Type

$
0
0

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

Field not Found Error for Email Address Type

$
0
0

It looks like it has something to do with the relation between email and first name (you'll see that the initial/name in the email and first name are the same). This is causing some kind of bug. When we change the field to something unrelated, there is no problem in the execution.

I found a workaround by adding a dummy First Name field after the initial First Name field. Prepend it with underscores so it won't show up in your data:

Viewing all 2648 articles
Browse latest View live