Solution Documentation & Developer Guide

PetStore Mock API

Swagger Petstore–compatible mock endpoints built with Boomi Web Services

Version 1.0 · November 2026 · For integration engineers and front-end developers

Executive summary

PetStore Mock API is a small Boomi Web Services project that mimics two operations of the public Swagger Petstore: get a pet by ID and create a pet. It gives front-end and integration teams a stable endpoint to build against before the real back end exists.

It is also a clean reference for the layering used in larger projects: a thin listener process, a sub-process with the business logic, a JSON profile for the contract, and Petstore-style error responses.

2REST endpoints
4Boomi processes
1JSON profile (Pet)
2validation rules

Purpose

Unblock client teams

Front-end and mobile developers get a working Petstore-compatible API on day one.

Contract testing

Predictable responses — including errors — make it easy to test client error handling.

Reference pattern

Shows the API → [SUB] layering, regex decisions and Message-shape responses in their simplest form.

What it demonstrates

Web Services Server

Exposing Boomi processes as REST endpoints on the Atom Cloud shared web server.

Query parameters as DPPs

petId arrives as dynamic process property query_petId.

JSON profile

j.PetStore.Pet follows the Swagger Petstore Pet schema and is used for field access in decisions.

Input validation

Regex decisions reject bad IDs and missing names before anything else runs.

Consistent errors

Errors use the Petstore ApiResponse shape: code, type, message.

Observability

A Notify shape logs every accepted pet in the process log.

Solution architecture

Clients Boomi Atom Cloud · shared web server cURL / Postmanmanual tests Front-end appclient development Web consoleGitHub Pages /ws/simpleBasic authroutes by operationHTTPS API - Get PetWSS GET · no input DecisionpetId ~ ^[0-9]+$ true → Message: mock Pet false → Message: ApiResponse 400 API - Create PetWSS CREATE · JSON Decisionname ~ .*\S.* true → Notify “Pet accepted” · echo false → Message: ApiResponse 405 Return Documents → HTTP response (JSON)each API process calls its [SUB] process; the sub-process holds the decision and messages
Two Web Services listeners mimic Swagger Petstore. All validation happens in the [SUB] processes, which can be tested on their own.

API reference

Base URL: https://<atom-cloud>/ws/simple · Basic authentication with the Atom Cloud shared web server user.

Boomi endpointSwagger PetstoreProcessInput → output
GET /getPetstorePet?petId=GET /pet/{petId}PetStore API - Get Petnone → single data
POST /createPetstorePetPOST /petPetStore API - Create Petsingle JSON → single data

Pet schema (profile j.PetStore.Pet)

FieldTypeDescription
idinteger (int64)Pet ID
categoryobject {id, name}Category
namestringRequired — must contain at least one non-space character
photoUrlsarray of stringPhoto URLs
tagsarray of {id, name}Tags
statusstringavailable | pending | sold

Responses

CaseHTTPBody
GET with a numeric petId200Mock Pet “doggie” with the requested id
GET with a missing or non-numeric petId200{"code": 400, "type": "error", "message": "Invalid ID supplied"}
POST with a name200The request body, echoed back
POST without a usable name200{"code": 405, "type": "error", "message": "Invalid input: pet name is required"}
Note: the processes do not set an HTTP status, so the listener answers 200 even for errors. Clients should check type == "error" in the body.

Examples

curl -u "$BOOMI_USER:$BOOMI_TOKEN" \
  "https://<atom-cloud>/ws/simple/getPetstorePet?petId=123"
{ "id": 123, "category": {"id": 1, "name": "Dogs"}, "name": "doggie",
  "photoUrls": ["https://petstore.swagger.io/photos/doggie.jpg"],
  "tags": [{"id": 1, "name": "friendly"}], "status": "available" }
curl -u "$BOOMI_USER:$BOOMI_TOKEN" -X POST -H "Content-Type: application/json" \
  "https://<atom-cloud>/ws/simple/createPetstorePet" \
  -d '{"id": 10, "name": "Bobby", "category": {"id": 1, "name": "Dogs"}, "status": "available"}'

Process design

ProcessShapesLogic
PetStore API - Get PetStart (WSS Listen: PetStore WSS Get Pet) → Process Call → Return DocumentsReceives GET, passes the request to the sub-process.
[SUB] PetStore Get PetStart (passthrough) → Decision “Valid Pet ID?” → Message → Return Documentsquery_petId matches ^[0-9]+$ → mock Pet with that id; otherwise ApiResponse 400.
PetStore API - Create PetStart (WSS Listen: PetStore WSS Create Pet) → Process Call → Return DocumentsReceives the JSON body, passes it to the sub-process.
[SUB] PetStore Create PetStart (passthrough) → Decision “Pet Name Provided?” → Notify / Message → Return Documentsname matches .*\S.* → Notify “Pet accepted: {1}” and echo the body; otherwise ApiResponse 405.

Design decisions

Test cases

#RequestExpected result
1GET petId=123Pet doggie, id 123
2GET petId=abcApiResponse 400
3GET petId=-1ApiResponse 400 (minus sign is not a digit)
4GET without petIdApiResponse 400
5POST with name “Bobby”Body echoed; “Pet accepted” in the process log
6POST without nameApiResponse 405
7POST with name of only spacesApiResponse 405
8POST with empty bodyApiResponse 405

All cases can be run interactively in the web console.

Web console mockup

A static console reproduces both endpoints in the browser with the same logic as the Boomi processes.

API Console

Build a GET or POST request, use presets for every test case, and read the body, headers, process log and cURL.

Execution path

The process diagram highlights the branch each request takes.

Pet Shop Demo

A tiny storefront that adds pets via POST and fetches them via GET.

API reference

Endpoints, schema, responses and cURL examples.

Request history

Every request in the session; click to replay.

Runs anywhere

Plain HTML, CSS and JavaScript on GitHub Pages; light and dark themes.

Open the console →

Components

TypeComponentPurpose
Process (WSS)PetStore API - Get PetListener for GET getPetstorePet
Process (WSS)PetStore API - Create PetListener for POST createPetstorePet
Sub-process[SUB] PetStore Get PetValidate petId, build the mock Pet
Sub-process[SUB] PetStore Create PetValidate name, log and echo
Connector operationPetStore WSS Get PetWeb Services Server · GET · input none · output single data
Connector operationPetStore WSS Create PetWeb Services Server · CREATE · input single JSON · output single data
JSON profilej.PetStore.PetSwagger Petstore Pet schema

Repository layout

Setup & deployment

  1. Copy .env.example to .env and fill in the Boomi account, API token, target folder, environment and test atom.
  2. Push the components in active-development/ to the platform folder.
  3. Deploy PetStore API - Get Pet and PetStore API - Create Pet to an Atom Cloud environment with the shared web server enabled.
  4. Call the endpoints with the shared web server user (Basic auth) and run the test cases above.

Limitations & next steps

Static GET data

GET always returns “doggie”; created pets are not stored.

HTTP status codes

Set the HTTP status (400/405) through the response headers so clients don’t need to inspect the body.

Persistence

Store pets in a database or Disk V2 and look them up by id.

More operations

Add PUT /pet, DELETE /pet/{petId} and findByStatus.

API Management

Publish through a Boomi API Service component with an OpenAPI spec.

Schema validation

Validate status against available | pending | sold and the types of every field.