Skip to content

Data Endpoints ​

Register a server endpoint for AddMaple to fetch full datasets. This is an alternative to using serverFetch URLs in getData().

Register Data Endpoint ​

http
POST /partners/v1/data-endpoints

Request ​

json
{
  "datasetId": "tf_123",
  "url": "https://partner.example.com/addmaple/full-data/tf_123",
  "auth": {
    "type": "bearer",
    "secretHint": "access-key-hint"
  },
  "allowedIps": ["52.4.12.34", "52.4.12.35"],
  "expiresAt": "2025-12-01T00:00:00Z"
}

Auth Types ​

TypeDescription
noneNo authentication required (use IP allowlist)
bearerBearer token authentication
basicBasic auth (username/password)

Response ​

json
{
  "id": "endpoint_abc123",
  "datasetId": "tf_123",
  "url": "https://partner.example.com/addmaple/full-data/tf_123",
  "status": "active",
  "createdAt": "2024-03-15T10:00:00Z",
  "expiresAt": "2025-12-01T00:00:00Z"
}

How It Works ​

  1. Partner registers endpoint with AddMaple
  2. Secrets are exchanged server-to-server (never in browser)
  3. When user requests server-mode analysis, AddMaple calls the registered endpoint
  4. Partner endpoint validates the request and returns data

When to Use This

Use registered endpoints when:

  • You want a permanent URL instead of per-request signed URLs
  • You need IP-based access control
  • You prefer server-to-server auth over presigned URLs

For most use cases, getData() + serverFetch signed URLs are simpler.


Delete Data Endpoint ​

Remove a registered data endpoint.

http
DELETE /partners/v1/data-endpoints/{endpointId}

Response ​

204 No Content

List Data Endpoints ​

List all registered endpoints for your partner account.

http
GET /partners/v1/data-endpoints

Response ​

json
{
  "endpoints": [
    {
      "id": "endpoint_abc123",
      "datasetId": "tf_123",
      "url": "https://partner.example.com/addmaple/full-data/tf_123",
      "status": "active",
      "createdAt": "2024-03-15T10:00:00Z"
    }
  ]
}

Partner Documentation