Content Delivery API - Resolve Creator Name
# help-with-umbraco
s
Using the latest Umbraco 13 I'm trying to resolve the "creatorName" and "writerName" when using the Content Delivery API, but even with all properties expanded they're not included. So far I've tried to get it to output by adding it to the Examine Index for the Delivery API, but it does not seem to use the fields in the index for the output values. I can of course add a field to all pages, but that seems a bit excessive for data that is already present on the content node. Is it possible to get the value in the default response? Currently considering just making another API endpoint to get the values since it would be quite fast to implement.
c
I have not worked with the Content Delivery API, but it looks really cool. Doing a quick Google Search and their AI brought up something like this. // Fetch content details using the Content Delivery API fetch('/umbraco/delivery/api/v2/content/123') .then(response => response.json()) .then(data => { console.log('Creator Name:', data._creatorName); // Will output the username of the content creator });
s
The API unfortunately does not provide this data, hence my question of extending the API output. This is an example of the data that the API provides with all properties expanded:
Copy code
json
{
  "contentType": "homepage",
  "name": "Home",
  "createDate": "2024-06-07T08:08:34.203Z",
  "updateDate": "2024-11-12T12:45:48.067Z",
  "route": {
    "path": "/",
    "startItem": {
      "id": "27c74d2b-ef25-4b2a-a01e-a417b3eaea95",
      "path": "home"
    }
  },
  "id": "27c74d2b-ef25-4b2a-a01e-a417b3eaea95",
  "properties": {
    "doNotDelete": false,
    "doNotUnpublish": false,
    "menuTitle": null,
    "umbracoNavihide": false,
    "umbracoUrlAlias": null,
    "umbracoRedirect": null,
    "pageComponents": {
      "items": [
        ...
      ]
    }
  },
  "cultures": {}
}
8 Views