Skip to Main Content
 

Blog title

Binubuo - The Basics Part 1

INFO_LIST

  • Author Head Binubuo
  • Category Binubuo API
  • Created Fri, Mar 25 2022
 

blog sections

A series introducing the core parts of Binubuo synthetic data generation

Before I can show you all the cool stuff (like Advanced Column Rules or Predefined Random Results) it is best to show the core parts of what makes Binubuo, and this series of blog entries will introduce just that. We will take a look at generators and datasets, and how we can call them from various clients and applications depending on your use case.

The innermost component of any service that can create synthetic or mocked data, are what I call generators. These are the functions that create random output. In Binubuo all of these generators are exposed as standard REST endpoints, and can be called very easily.

These series will all include plenty of examples and variations of calls (using both shell command line and the clients), so if you want to try along on your own machine, you can take a look at the Getting Started Guide on how you create your own account, so you can start to use Binubuo yourself.

Our first call

All the generators are divided into categories or data domains. So our first call will be to retrieve and list all the available generators. So we get the list, so we can see what generators are available to us. Before we show the call, I would like to explain how the basic URL structure for Binubuo generators look like. The server part of the Binubuo endpoints is:

https://binubuo.com/api/

Then we have a couple of different categories of modules:

/generator/
/dataset/
/binubuo-actions/

So since our first task is to simply list the generators available in Binubuo, we can do that by calling a get directly on the /generator/ module, without any more details.

To make the call, we need our API key and a REST client. For simplicity, I will use cURL in the first couple of examples, and then we will progress to using some of the different clients and applications available.

So if our key is "ASDF1234", our call to list all generators would look like this:

curl -H @{"x-binubuo-key" = "ASDF1234"} -Method GET 'https://binubuo.com/api/generator/'

And that call will produce JSON output that looks like this:

{
"generators": [{
	"GENERATOR_ID": 604,
	"GENERATOR_TYPE_NAME": "Data",
	"GENERATOR_CATEGORY_NAME": "Person",
	"GENERATOR_NAME": "Full name",
	"GENERATOR_WEBSERVICE_NAME": "full_name",
	"GENERATOR_WEBSERVICE_CALL": "https:\/\/binubuo.com\/api\/generator\/person\/full_name",
	"GENERATOR_DESCRIPTION": "A full name.",
	"GENERATOR_CALL": "person_random.r_name",
	"GENERATOR_INPUTS": [
		{
			"INPUT_ID": 110439,
			"INPUT_DISPLAY_NAME": "ISO 2 letter country code",
			"PARAMETER_DATATYPE": "Text"
		},
		{
			"INPUT_ID": 110440,
			"INPUT_DISPLAY_NAME": "Gender of the person",
			"PARAMETER_DATATYPE": "Text"
		},
		{
			"INPUT_ID": 110441,
			"INPUT_DISPLAY_NAME": "Include middlename?",
			"PARAMETER_DATATYPE": "Text",
			"INPUT_FIXED_RANGE": "No,Yes"
		},
		{
			"INPUT_ID": 110442,
			"INPUT_DISPLAY_NAME": "Include middlename as initial?",
			"PARAMETER_DATATYPE": "Text",
			"INPUT_FIXED_RANGE": "No,Yes"
		},
		{
			"INPUT_ID": 110443,
			"INPUT_DISPLAY_NAME": "Include prefix, like Dr. or Prof.?",
			"PARAMETER_DATATYPE": "Text",
			"INPUT_FIXED_RANGE": "No,Yes"
		}
	]
}
, .....]
}

Except the real output will list all the generators and not just one, as in the above snippet.

We can cut down a bit on the output, if we also specify the category that we want to list the endpoints from. So from the above output we can see that there is a category called "person", so if we just wanted to list the generators in the person category it would look like this:

curl -H @{"x-binubuo-key" = "ASDF1234"} -Method GET 'https://binubuo.com/api/generator/person'

Now we know how to list the core generators and we know how the basic URL structure looks like in Binubuo. In my next blog entry, I will show how we can start to get the actual random data from the generators.

Don't have an account yet?

If you don't have an account on Binubuo yet, you can create one real quick. Just click "Sign up" in the top right corner, and you are on your way to create all the synthetic data you could dream about.

Want to see how to get started: Get Started Guide

Get more guides and help from the blog

Follow Binubuo on Twitter:


If you already have an account on RapidAPI, you can use your account to access Binubuo

Connect on RapidAPI