janedoe

Random Data as a Service

Janedoe currently supports the types described below. Some types may be used with additonal parameters. The parameters are separated with a |. All parameters are optional and can be omitted if only the following parameters should be used (For instance date|||2015-01-01 for only passing the max parameter).

The language of the result can be controlled with the Accept-Language header. Currently en and de are supported.

boolean

Returns true or false.

Example: boolean

city

Returns a random city name from a predefined list.

Example: city
Might return 'Atlanta'.

color

Returns one of the 16 VGA standcolor names.

Example: color
Might return 'fuchsia'.

company

Returns a random name of an existing company.

Example: company
Might return 'Apple'.

country

Returns a name or 2-digit ISO code of a country.

Params

Name Description Example Default
DisplayType name or iso. iso name

Example: country|iso
Might return 'FR'.

creditcard

Returns a testable Creditcard number. The numbers are not generated but taken from here.

Example: creditcard
Might return '4111111111111111'.

date

Generates a random date and returns it as formatted String.

Params

Name Description Example Default
Pattern A Date Pattern parseable by a DateTimeFormatter. Supported fields are year, month, date. Timezones are not supported. dd.MM.yyyy yyyy-MM-dd
Min The minimum value for the random date (inclusive). Must be parseable by given pattern. 28.07.1980 1900-01-01
Max The maximum value for the random date (exclusive). Must be parseable by given pattern. 01.01.2015 2050-01-01

Example: date|dd.MM.yyyy|01.01.2010|10.12.2014
Will return a random date between 01.01.2010 and 10.12.2014 formatted with pattern 'dd.MM.yyyy'.

datetime

Generates a random datetime and returns it as formatted String.

Params

Name Description Example Default
Pattern A DateTime Pattern parseable by a DateTimeFormatter. Supported fields are year, month, date, hour, minute, second, millisecond. Timezones are not supported. dd.MM.yyyy HH:mm:ss yyyy-MM-dd'T'HH:mm:ss
Min The minimum value for the random date (inclusive). Must be parseable by given pattern. 28.07.1980 17:23:12 1900-01-01T00:00:00
Max The maximum value for the random date (exclusive). Must be parseable by given pattern. 01.01.2015 04:23:49 2050-01-01T00:00:00

Example: datetime|dd.MM.yyyy HH:mm:ss|01.01.2010 00:00:00|02.01.2010 00:00:00
Will return a random time of 2010-01-01 formatted with pattern 'dd.MM.yyyy HH:mm:ss'.

domain

Returns a random domain name.

Params

Name Description Example Default
Protocol A string like http or https (without ://). Will be taken 'as is'. http
Subdomain All random domain names come without a subdomain. You can provide a non random one which will be used for every domain. www

Example: domain|http|www
Might return 'http://www.google.com'.

echo

Returns nothing but the given param. Useful for filling static fields which should not be random.

Example: echo|foo
Will return 'foo'.

email

Returns a random eMail Address. Uses firstname and lastname if they are found on the same level of the current object.

Params

Name Description Example Default
Domain A static domain which will be used for every eMail Address http
Subdomain All random domain names come without a subdomain. You can provide a non random one which will be used for every domain. janedoe.io

Example: email|janedoe.io
Might return 'jane.doe@janedoe.io'.

firstname

Returns a random name from the list of firstnames. Respects the gender if an according attribute is found on the same level of the current object.

Params

Name Description Example Default
Gender male or female male

Example: firstname|female
Might return 'Jane'.

gender

Returns MALE or FEMALE

Params

Name Description Example Default
Case lower or upper lower upper

Example: gender|lower
Might return 'female'.

geolocation

Returns a random name point on earth.

Example: geolocation|female
Might return { "lat": -56.76371966342054, "lng": 44.90128102651394 }..

ip

Returns a random IPv4 address.

Example: ip
Might return '137.23.98.112'.

lastname

Returns a random lastname.

Example: lastname
Might return 'Doe'.

lorem

Returns a few sentences of lorem ipsum.

Params

Name Description Example Default
Count The number of generated sentences. The maximum value is 25. 17 5

Example: lorem|1
Might return 'Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua.'.

number

Returns a random number.

Params

Name Description Example Default
Type int or float float int

Example: lorem|float
Might return '3.14'.

oneof

Returns one of the given values. Usefull for filling enums etc.

Params

Name Description Example Default
values A comma separated list of values. RED,BLUE,GREEN

Example: oneof|RED,BLUE,GREEN
Might return 'BLUE'.

state

Returns a name or 2-digit ISO code for a state. Respects the Accept-Language Header. Uses the 50 US states for EN and the 16 german states for DE.

Params

Name Description Example Default
DisplayType name or iso. iso name

Example: state
Might return 'Bayern'.

street

Returns a random street name.

Params

Name Description Example Default
IncludeNumber true or false. true false

Example: street|false
Might return 'Adams Street'.

string

Returns a random string.

Params

Name Description Example Default
StringType alphabetic, numeric, alphanumeric or ascii. alphabetic ascii
Minlength The minimum length of the generated String. 12 8
Maxlenght The maximum length of the generated String. The maximum value is 256. 12 20
Case lower or upper. The default is mixed case. lower

Example: string|alphanumeric|2|10
Might return 'YqERUCeb'.

timestamp

Generates a random timestamp (milliseconds since 1970-01-01).

Params

Name Description Example Default
Min The minimum value for the timestamp (inclusive). 1420070400000
Max The maximum value for the timestamp (exclusive). 1451606400000

Example: timestamp|1420070400000|1451606400000
Will return a random timestamp in the year 2015.

uuid

Returns a random UUID.

Example: uuid
Might return 'bab07246-fde0-4650-a86c-490c5d9a0286'.

zipcode

Returns a random number matching the zipcode pattern of given locale. The zipcode might not exist.

Example: zipcode
Might return '90513'.