Skip to content

View resources

Endpoints listed on this page require project tokens with the view ability. 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 list of fields to include
excludestringComma-separated list of fields 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" }
        }
      }
    }
  ],
  "links": {
    "first": "...?page=1",
    "last": "...?page=5",
    "prev": null,
    "next": "...?page=2"
  },
  "meta": {
    "current_page": 1,
    "last_page": 5,
    "per_page": 10,
    "total": 42
  }
}

Get resource

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

Returns a single resource by its ID.

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