Unsure which services to build for developers because you don't know how they'll use the data?
Start with faking data quickly as part of your development process and get dummy objects floating around your system to confirm your API structure. This provides your API stakeholders with a concrete example of what the objects will look like when all is done.
On XapiX, this is easy with our data faking feature.
Note: Data faking is NOT a solution for load testing - XapiX being a robust system and able to handle millions of calls per second solves that predicament.
Here is a screenshare for how I went through the tutorial:
Let's start faking data!
Make a new project in https://app.xapix.io/projects/new.
Now that we're on the project dashboard, we see it's a bit bare right now.
Scroll down to 'project's resource classes' and click "New". Mine is called 'RC_Data_fakes'. Click 'Create Resource Class'.
Now we're back on Dashboard. In "Attributes and Relationships", we will type in a few attributes.
The fun part of data faking is deciding which values to fake!
Look through this library (https://github.com/stympy/faker) and decide 3 values you will fake.
I chose:
Name: Faker::Name.name
Number: Faker::Number.number(3)
Character: Faker::StarWars.character
There are MANY values but here are some sample ones:
Random job: Faker::Job.title
Random email: Faker::Internet.email
Random password: Faker::Internet.password
Random city: Faker::Address.city
Random street: Faker::Address.street_name
Random planet: Faker::Space.planet
Random Twitter: Faker::Twitter.user
Lorem Ipsum Paragraph: Faker::Lorem.paragraph
For now, enter just the name into 'Attributes and Relationships'. Click "Save".
Now to fake some data!
Click "New" in "Resource Class Fakes".
As we just decided the values we wanted, in the "Helpers" section, choose the 'Faker' type you decided on above. Once that is entered into "Helpers", the "Formula will automatically update.
Resource count means how many lines of data to have - 100 is default. Let's change it to 1000.
Click "Create Resources Class Fake". This page is our fake data home page.
Scroll down to see sample data. It's all different names, numbers, and Star Wars characters!
Click "Publish". You'll see this top blue bar:
Click "Publish" again and now the blue bar will read "Resource Class Published".
Estupendo! You can now make as many data fakes as your heart desires.
Now your API can always be prepped for any type of request. Enjoy the freedom!