diggama 2.0 Help

View resources

List resources

The data returned by this endpoint will depend on the blueprint type :

  • in case of a normal resource, a paginated list of resources will be returned

  • In case of a singular resource, the resource will be return with its attributes

GET method/resources/{blueprint}

Request parameters

curl \ https://api.diggama.com/v1/resources/pages \ -H "Authorization: Bearer (your token)"
// Get the CRD called "pages" // Fetch the token from a .env file const response = await fetch('https://api.diggama.com/v1/resources/pages', { headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + import.meta.env.DIGGAMA_TOKEN} }); const pages = await response.json();

Responses

{ "data": {}, "links": { "first": "https://app.diggama.com/api/resources/posts?page=1", "last": "https://app.diggama.com/api/resources/posts?page=2", "prev": {}, "next": "https://app.diggama.com/api/resources/posts?page=2" }, "meta": { "current_page": "1", "from": "1", "path": "https://app.diggama.com/api/resources/posts?page=3", "per_page": "20", "to": "20" } }
{ "id": "gKqv6dx6pBk9", "attributes": { "title": "Hello world" } }

Get resource

GET method/resources/{blueprint}/{resource}

Request parameters

curl \ https://api.diggama.com/v1/resources/pages/gKqv6dx6pBk9 \ -H "Authorization: Bearer (your token)"
// Get the "pages" custom resource with ID "100" // Fetch the token from a .env file const response = await fetch('https://api.diggama.com/v1/resources/pages/gKqv6dx6pBk9', { headers: {'Accept': 'application/json', 'Authorization': 'Bearer '.import.meta.env.DIGGAMA_TOKEN} }); const page = await response.json();

Responses

{ "id": "gKqv6dx6pBk9", "attributes": { "title": "Hello world" } }
Last modified: 13 February 2025