Skip to content

View resources ​

Endpoints listed on this page require project tokens with the view or preview ability. A token with view but not preview only sees published resources: drafts and resources scheduled for a future date are left out of lists and return 404 when fetched by ID. See Authentication for more details.

List resources ​

GET /v2/resources/{blueprint}

Returns a paginated list of resources for the given blueprint. See Pagination for details on iterating through results.

Query parameters ​

ParameterTypeDefaultDescription
per_pageinteger25Number of results per page (max 100)
pageinteger1Page number
sortstring-created_atSorting expression
searchstringFull-text search query
filterobjectFilter conditions
fieldsstringComma-separated top-level keys to include (see Sparse fieldsets)
excludestringComma-separated top-level keys to exclude
variantstringdefaultVariant slug for multilingual blueprints

Example ​

bash
curl "https://api.diggama.com/v2/resources/posts?per_page=10&sort=-published_at" \
  -H "Authorization: Bearer {token}"

Response ​

json
{
  "data": [
    {
      "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": "My first post",
        "slug": "my-first-post"
      },
      "relationships": {
        "blueprint": {
          "data": { "id": "posts", "type": "blueprint" }
        }
      }
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 10,
    "total": 42,
    "last_page": 5,
    "from": 1,
    "to": 10
  },
  "links": {
    "first": "https://api.diggama.com/v2/resources/posts?per_page=10&sort=-published_at&page=1",
    "last": "https://api.diggama.com/v2/resources/posts?per_page=10&sort=-published_at&page=5",
    "prev": null,
    "next": "https://api.diggama.com/v2/resources/posts?per_page=10&sort=-published_at&page=2"
  }
}

Get resource ​

GET /v2/resources/{blueprint}/{id}

Returns a single resource by its ID. Accepts the fields, exclude and variant query parameters.

An unknown or malformed ID returns 404 RESOURCE_NOT_FOUND.

Example ​

bash
curl "https://api.diggama.com/v2/resources/posts/gKqv6dx6pBk9" \
  -H "Authorization: Bearer {token}"

Response ​

json
{
  "data": {
    "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": "My first post",
      "slug": "my-first-post",
      "content": "<p>Hello world</p>"
    },
    "relationships": {
      "blueprint": {
        "data": { "id": "posts", "type": "blueprint" }
      }
    }
  }
}

Diggama Documentation