Skip to content

Resources API ​

Once you've defined a resource using Blueprints, you can interact with it using the Resources API.

The base API URL is https://api.diggama.com/v2. All requests need a project token.

Endpoints overview ​

MethodEndpointDescriptionAbility
GET/resources/{blueprint}List resourcesview or preview
GET/resources/{blueprint}/{id}Get a resourceview or preview
POST/resources/{blueprint}Create a resourcecreate or publish
PUT/resources/{blueprint}/{id}Full updateupdate
PATCH/resources/{blueprint}/{id}Partial updateupdate
DELETE/resources/{blueprint}/{id}Delete a resourcedelete
POST/resources/{blueprint}/bulkBulk createcreate or publish
PATCH/resources/{blueprint}/bulkBulk updateupdate
DELETE/resources/{blueprint}/bulkBulk deletedelete
POST/resources/{blueprint}/bulk-publishBulk publishpublish
POST/resources/{blueprint}/bulk-unpublishBulk unpublishpublish
GET/resources/{blueprint}/exportExport resourcesview or preview

A token with view but not preview only sees published resources. See Authentication.

Schema introspection lives in the Blueprints API:

MethodEndpointDescriptionAbility
GET/blueprintsList blueprintsview or preview
GET/blueprints/{blueprint}Get one blueprintview or preview

Resource response format ​

All resource endpoints return data in the following format. id is an opaque string; use it as-is in URLs and in reference fields.

json
{
  "id": "gKqv6dx6pBk9",
  "type": "resource",
  "published_at": "2026-01-15T10:30:00+00:00",
  "created_at": "2026-01-10T08:00:00+00:00",
  "updated_at": "2026-01-15T10:30:00+00:00",
  "attributes": {
    "title": "Example page",
    "slug": "example-page",
    "content": "<p>Hello world</p>"
  },
  "relationships": {
    "blueprint": {
      "data": {
        "id": "pages",
        "type": "blueprint"
      }
    }
  }
}

Sparse fieldsets ​

You can control which top-level keys are returned using the fields and exclude query parameters (comma-separated). They work on the list, get and export endpoints.

GET /v2/resources/pages?fields=id,attributes
GET /v2/resources/pages?exclude=relationships

Only the top-level keys shown above (id, type, published_at, created_at, updated_at, attributes, relationships) can be selected. You cannot pick individual fields inside attributes.

Variants ​

If a blueprint uses variants (e.g. for multilingual content), use the variant query parameter on any endpoint:

GET /v2/resources/pages?variant=fr
PUT /v2/resources/pages/gKqv6dx6pBk9?variant=fr

If omitted, the blueprint's default variant is used. Blueprints without variants ignore the parameter.

The slug is not checked against the blueprint's variants: an unknown slug reads as empty attributes (every field null), and a write stores the values under that slug.

API v1 (deprecated) ​

WARNING

V1 is deprecated and receives no new features. Use V2 for all new integrations.

These V1 routes are still served, with the same tokens:

MethodEndpoint
GET/v1/info
GET/v1/resources/{blueprint}
GET/v1/resources/{blueprint}/{id}
POST/v1/resources/{blueprint}
POST/v1/crds/{blueprint}/form-submit

V1 errors use Laravel's default {"message": "..."} body rather than the V2 error format.

Diggama Documentation