Sorry, we didn't find any relevant articles for you.

Send us your queries using the form below and we will get back to you with a solution.

DataConnect API Guide

REST API Reference

Base URL: https://dataconnect.genrocket.com

The flow is: 

(1) POST /daas/login → get a JWT, then 

(2) POST /daas/generate with that JWT. Two discovery endpoints ( /daas/industries , /daas/generators ) need no token.

Authenticate — POST /daas/login

HTTP Request

POST /daas/login HTTP/1.1
Host: dataconnect.genrocket.com
Content-Type: application/json

Request Body

{
   "orgExternalId": "your-org-external-id", 
   "clientExternalId": "your-client-external-id", 
   "userExternalId": "your-user-or-server-user-externalid", 
   "orgApiKey": "your-org-api-key"
}

Success — 200 OK

{"success": true, "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}

The token is valid for 60 minutes. Reuse it across many generate calls; re-authenticate when it expires.

curl -s -X POST https://dataconnect.genrocket.com/daas/login \ -H "Content-Type: application/json" \ -d '{ "orgExternalId": "your-org-external-id", "clientExternalId": "your-client-external-id", "userExternalId": "youruser-external-id", "orgApiKey": "your-org-api-key" }'```

### 8.2 Generate Data — `POST /daas/generate`

Authenticated. Pass the JWT in the **`X-Daas-Token`** header.

```http
POST /daas/generate HTTP/1.1
Host: dataconnect.genrocket.com
Content-Type: application/json
X-Daas-Token: <jwt-from-login>

Top-level fields

Field Type Required Description
domain string Yes Business domain, e.g., Customer
loopCount integer Yes Records to generate (1-10,000).
attributes array Yes Non-empty list of attribute specs (below)
industry string No Industry vertical, e.g., Banking. Must be valid (see /daas/industries). Defaults to NO_INDUSTRY
context string No Free-text context passed to the LLM to improve inference.
receivers array No When present, output is a file instead of a JSON array.

Attribute Object

Field Type Required Description
name string Yes Attribute / column name.
dataType string No Type hint (e.g., string, integer, date).
description string No Natural-language description used for LLM inference
size integer No Size hint.
listOfOptions array No Fixed value pool - values are drawn from this list
regex string No Regex, the value must match.
generator array No Explicit GenRocket generator(s), e.g. [{ "name":
"UUIDGen" }] . See /daas/generators .

NOTE: Per-attribute resolution order: explicit generator wins → else listOfOptions or regex → else the LLM infers from name , dataType , and description .

Success — 200 OK : the body is a JSON array of record objects (one object per row). It is not wrapped in an envelope:

[
  { 
    "customer_id": "8f14e45f...", 
    "first_name": "Ava", 
    "email":"ava@example.com" 
  }, 
  { 
    "customer_id": "c9f0f895...", 
    "first_name": "Liam",
    "email": "liam@example.com" 
  }
]

Discovery — GET /daas/industries and GET /daas/generators

Anonymous (no token). Use these to discover valid values before building requests.

HTTP Request

GET /daas/industries

Request Body

{ "industries": ["Banking", "Healthcare", "Insurance", "NO_INDUSTRY"] }

HTTP Request

GET /daas/generators

Request Body

{
  "generators": [ 
    { 
      "name": "UUIDGen", 
      "shortDescription": "Generates UUIDs", 
      "description": "..." 
    }, 
    { 
      "name": "FirstNameGen",
      "shortDescription": 
      "Generates first names", 
      "description": "..." 
     } 
  ]
}
curl -s https://dataconnect.genrocket.com/daas/industriescurl -s
https://dataconnect.genrocket.com/daas/generators```
---
## 9. Generation Examples (Cookbook)

All examples assume `export TOKEN=<jwt-from-login>`.

### 9.1 Explicit generators
```bash
curl -s -X POST https://dataconnect.genrocket.com/daas/generate \ -H "Content-Type: application/json" -H "X-Daas-Token: $TOKEN" \ -d '{ "domain": "Customer", "industry": "Banking", "loopCount": 3, "attributes": [ { "name": "customer_id", "dataType": "string", "generator": [{ "name": "UUIDGen" }] }, { "name": "first_name", "dataType": "string", "generator": [{ "name": "FirstNameGen" }] } ] }'```

### 9.2 LLM-inferred attributes (no explicit rules)

Provide a `description`; the embedded LLM picks an appropriate generator.

```json
{
"domain": "Customer", "industry": "Healthcare", "loopCount": 5, "attributes": [ { "name": "patient_name", "dataType": "string", "description": "Full name of a patient" }, { "name": "blood_group", "dataType": "string", "description": "ABO blood group, e.g. O+, A-" } ]}

Enumerated value pool ( listOfOptions )

{
  "domain": "Account",
  "industry": "Banking",
  "loopCount": 4,
  "attributes": [
    {
      "name": "account_type",
      "dataType": "string",
      "listOfOptions": [
        "CHECKING",
        "SAVINGS",
        "CREDIT"
      ]
    },
    {
      "name": "currency",
      "dataType": "string",
      "listOfOptions": [
        "USD",
        "EUR",
        "INR"
      ]
    }
  ]
}

Pattern-constrained values ( regex )

{
  "domain": "Customer",
  "loopCount": 3,
  "attributes": [
    {
      "name": "email",
      "dataType": "string",
      "regex": "[a-z]{5,8}@example\\.com"
    },
    {
      "name": "us_zip",
      "dataType": "string",
      "regex": "[0-9]{5}(-[0-9]{4})?"
    }
  ]
}

Mixed schema with industry context

{
  "domain": "Transaction",
  "industry": "Banking",
  "context": "Domestic wire transfers for retail banking customers",
  "loopCount": 100,
  "attributes": [
    {
      "name": "txn_id",
      "generator": [
        {
          "name": "UUIDGen"
        }
      ]
    },
    {
      "name": "amount",
      "dataType": "decimal",
      "description": "Transfer amount between 10 and 5000"
    },
    {
      "name": "status",
      "listOfOptions": [
        "PENDING",
        "SETTLED",
        "FAILED"
      ]
    },
    {
      "name": "iban",
      "dataType": "string",
      "description": "Valid-looking IBAN"
    }
  ]
}

File output via receivers

Include exactly one receiver to receive a downloadable file instead of a JSON array. The response is a binary attachment ( Content-Disposition: attachment ).

receiverName Output Content-Type
DelimitedFileReceiver Delimited text (CSV-style) text/plain
JSONFileReceiver JSON file application/json
XMLFileReceiver XML file application/xml
curl -s -X POST https://dataconnect.genrocket.com/daas/generate \ -H "Content-Type: application/json" -H "X-Daas-Token: $TOKEN" \ -o customers.json \ -d '{ "domain": "Customer", "industry": "Banking", "loopCount": 100, "attributes": [ { "name": "customer_id", "generator": [{ "name": "UUIDGen" }] } ], "receivers": [ { "receiverName": "JSONFileReceiver", "parameters": { "fileName": "customers.json" } } ]
}'```

> Omit `receivers` entirely to get the inline JSON array. More than one receiver is rejected (`RECEIVERS_TOO_MANY`).

---

## 10. Complete Error Catalog
Every error returns the same shape:

```json
{ "success": false, "errorCode": "DAAS_TOKEN_EXPIRED", "message": "Authentication token expired" }

NOTE: Always branch on the success field, not the HTTP status alone. Quota outcomes are deliberately returned with HTTP 200 and success: false so they read as logical (not transport) failures.

MCP Server Integration

For AI agents and LLM tooling, DataConnect is exposed as a Model Context Protocol (MCP) server.

Property Value
Endpoint https://dataconnect-mcp.genrocket.com/mcp
Transport Streamable HTTP
Authentication Authorization: Bearer <jwt> (the same JWT from POST /daas/login )

 

Every MCP Request must carry: 

Authorization: Bearer <jwt-from-login>
Parameter Type Required Description
domain string Yes Business domain, e.g., Customer .
industry string Yes Industry vertical, e.g., Banking .
loopCount integer Yes Number of records.
attributes array Yes Same attribute shape as the REST API.
receivers array No Not supported in MCP v1 — omit it; rows are always returned as JSON.

Error Codes

Authentication & Login ( POST /daas/login )

HTTP errorCode Message Cause / fix
400 ORG_EXTERNAL_ID_NULL orgExternalId is required Field missing/misspelled in body.
400 DAAS_CLIENT_EXTERNAL_ID_NULL clientExternalId is required Field missing/misspelled.
400 DAAS_USER_EXTERNAL_ID_NULL userExternalId is required Field missing/misspelled.
400 ORG_API_KEY_REQUIRED orgApiKey is required Field missing/misspelled.
400 ORG_NOT_FOUND

Organization not found for externalId=

{orgExternalId}

orgExternalId 

doesn't match any org.

400 INVALID_API_KEY_FOR_ORGANIZATION Invalid API key for organization

orgApiKey 

doesn't match the org (often after a rotate).

400 COULD_NOT_ISSUE_AUTH_TOKEN Could not issue authentication token for the supplied client/user

Credentials passed presence checks but couldn't be authenticated (e.g. 

client/user mismatch).

400 DAAS_USER_AND_SERVER_USER_NULL userExternalId is required No user identity supplied.
405 METHOD_NOT_ALLOWED Method not allowed Login must be POST.

Org / Client / User Validation

HTTP errorCode Message
400 ORG_NOT_DAAS_ENABLED Organization is not enabled for DaaS
400 ORG_NOT_ENABLED Organization is not enabled
400 DAAS_CLIENT_NOT_FOUND Client not found for externalId={clientExternalId}
400 DAAS_CLIENT_EXTERNAL_ID_MISMATCH clientExternalId does not match
400 DAAS_CLIENT_NOT_CHILD_OF_ORG Client does not belong to the supplied organization
400 DAAS_CLIENT_NOT_ENABLED Client is not enabled
400 DAAS_USER_NOT_FOUND

User not found for externalId=

{userExternalId}

400 DAAS_USER_NOT_CHILD_OF_CLIENT User does not belong to the supplied client
400 DAAS_USER_NOT_ENABLED User is not enabled
400 DAAS_SERVER_USER_NOT_CHILD_OF_CLIENT Server user does not belong to the supplied client
400 DAAS_SERVER_USER_NOT_ENABLED Server user is not enabled

Token & Session ( POST /daas/generate )

HTTP errorCode Message Cause / fix
401 DAAS_JWT_TOKEN_NOT_FOUND Missing authentication token Add the X-DaasToken header.
401 DAAS_TOKEN_INVALID Invalid authentication token Token malformed — re-login.
401 DAAS_TOKEN_EXPIRED Authentication token expired

Token older than 

60 min — re-login.

401 DAAS_TOKEN_USER_MISMATCH Token does not match the supplied user Token issued for a different user.
401 DAAS_SESSION_LIMIT_EXCEEDED Session limit exceeded Too many concurrent sessions.

Generate Request Validation

HTTP errorCode Message
400 REQUEST_BODY_REQUIRED Request body is required
400 MALFORMED_JSON_BODY Request body is not valid JSON
400 DOMAIN_REQUIRED The parameter 'domain' is required
400 INDUSTRY_INVALID Invalid industry '{industry}'. Allowed values: {allowed}
400 LOOP_COUNT_REQUIRED The parameter 'loopCount' is required
400 LOOP_COUNT_NOT_INTEGER loopCount must be a non-decimal number (got {loopCount})
400 LOOP_COUNT_OUT_OF_RANGE loopCount must be between 1 and {max} (got {loopCount})
400 ATTRIBUTES_REQUIRED The parameter 'attributes' is required as a non-empty list
400 ATTRIBUTE_NAME_REQUIRED Each attribute must have a 'name'
400 ATTRIBUTE_STRUCTURE_INVALID Attribute payload structure is invalid
400 RECEIVERS_REQUIRED The parameter 'receivers' is required when a file is to be generated
400 RECEIVERS_TOO_MANY Only one Receiver is allowed in the request
400 RECEIVER_NAME_REQUIRED The request parameter 'receiverName' is required.
400 RECEIVER_NAME_UNSUPPORTED

The allowed Receivers are only - 

DelimitedFileReceiver, JSONFileReceiver, XMLFileReceiver.

400 GENERATION_FAILED Data generation failed: {detail}

Quota (returned as HTTP 200, success:false )

HTTP errorCode Message Meaning
200 ORG_QUOTA_EXCEEDED Organization quota exceeded Org quota consumed, no AVAILABLE block to roll to.
200 DAAS_CLIENT_QUOTA_EXCEEDED Client quota exceeded Client quota consumed.
200 DAAS_USER_QUOTA_EXCEEDED User quota exceeded User quota consumed.
200 DAAS_SERVER_USER_QUOTA_EXCEEDED Server user quota exceeded Server-user quota consumed.
200 ORG_NO_ACTIVE_QUOTA No active organization quota configured No usable org quota (all cancelled / none active).
200 DAAS_CLIENT_NO_ACTIVE_QUOTA No active client quota configured No usable client quota.
200 DAAS_USER_NO_ACTIVE_QUOTA No active user quota configured No usable user quota.
200 DAAS_SERVER_USER_NO_ACTIVE_QUOTA No active server user quota configured No usable serveruser quota.

 

Exceeded vs. No-Active: *_QUOTA_EXCEEDED means the quota was used up.

*_NO_ACTIVE_QUOTA means there's nothing to consume because the configs were cancelled (or never created) — fix it by allocating/activating quota, not by waiting.

Server / catch-all

HTTP errorCode Message
500 INTERNAL_SERVER_ERROR An unexpected error occurred. Please contact support if it persists.