Retrieve a project
Please note that the Dashboard API is an experimental, prerelease API. This API method is considered unstable, and should be avoided in production environments and automations. Changes may occur at any time without warning.
Query parameters
Comma-separated list of relationship paths. A relationship path is a dot-separated list of relationship names. Allowed relationship paths: item_types, item_types.fields, item_types.fieldsets, item_types.singleton_item, account.
"active_subscription"
Returns
Returns a resource object of type site.
Examples
GET https://site-api.datocms.com/sites/:field_id_or_api_key HTTP/1.1Authorization: Bearer YOUR-API-TOKENAccept: application/jsonX-Api-Version: 3curl -g 'https://site-api.datocms.com/sites/:field_id_or_api_key' \ \ -H "Authorization: Bearer YOUR-API-TOKEN" \ -H "Accept: application/json" \ -H "X-Api-Version: 3"await fetch("https://site-api.datocms.com/sites/:field_id_or_api_key", { headers: { Authorization: "Bearer YOUR-API-TOKEN", Accept: "application/json", "X-Api-Version": "3", },});HTTP/1.1 200 OKContent-Type: application/jsonCache-Control: cache-control: max-age=0, private, must-revalidateX-RateLimit-Limit: 30X-RateLimit-Remaining: 28
{ "data": { "type": "site", "id": "155", "attributes": { "name": "My blog", "domain": "admin.foobar.com", "internal_domain": "clueless-star-1231.admin.datocms.com", "last_data_change_at": "2020-04-21T07:57:11.124Z", "access_token": "", "created_at": "2020-04-21T07:57:11.124Z", "deactivated": true }, "meta": { "last_data_change_at": "2017-03-30T09:29:14.872Z", "created_at": "2017-03-30T09:29:14.872Z", "deactivated": true, "status": "", "owner": { "type": "account", "email": "mark@foobar.com" }, "require_2fa": false }, "relationships": { "active_subscription": { "data": null }, "active_plan": { "data": null }, "transfer": { "data": { "type": "site_transfer", "id": "124" } } } }}