xopabyteh
07/19/2024, 1:54 PMps
curl -X 'GET' \
  'https://localhost:5151/umbraco/delivery/api/v2/content/item/blogs?expand=properties%5B%24all%5D&fields=properties%5B%24all%5D' \
  -H 'accept: application/json'json
{
  "contentType": "blogs",
  "name": "Blogs",
  "createDate": "2024-07-19T15:21:02.723Z",
  "updateDate": "2024-07-19T15:37:37.753Z",
  "route": {
    "path": "/cz/blogs/",
    "startItem": {
      "id": "cb4a02ea-0f37-4aaf-9ccc-0f7386d67e79",
      "path": "blogs"
    }
  },
  "id": "cb4a02ea-0f37-4aaf-9ccc-0f7386d67e79",
  "properties": {
    "blogCategories": null
  },
  "cultures": {
    "en-US": {
      "path": "/en/blogs/",
      "startItem": {
        "id": "cb4a02ea-0f37-4aaf-9ccc-0f7386d67e79",
        "path": "blogs"
      }
    },
    "cs-CZ": {
      "path": "/cz/blogs/",
      "startItem": {
        "id": "cb4a02ea-0f37-4aaf-9ccc-0f7386d67e79",
        "path": "blogs"
      }
    }
  }
}xopabyteh
07/19/2024, 5:59 PMxopabyteh
07/20/2024, 9:24 AMcs
        var categories = blogs!.Children
            .Select(c => new BlogCategoryResponse(
                c.GetProperty("title")!.GetValue()!.ToString()!,
                c.Children.Select(a => new BlogArticleResponse(
                    a.GetProperty("title")!.GetValue()!.ToString()!,
                    a.GetProperty("body")!.GetValue()!.ToString()!
                ))
                    .ToArray()
            ))
            .ToArray();A hub and casual space for you to interact with fellow community members and learn more about Umbraco!
Powered by