type
property. Any content items not based on the Article content type will be omitted from the API response.
{
"system": {
"id": "335d17ac-b6ba-4c6a-ae31-23c1193215cb",
"collection": "default",
"name": "My article",
"codename": "my_article",
"language": "en-US",
"type": "article",
"sitemap_locations": [],
"last_modified": "2023-03-27T13:21:11.38Z",
"workflow_step": "published"
},
"elements": {
...
}
}
// Tip: Find more about .NET SDKs at https://kontent.ai/learn/net
using Kontent.Ai.Delivery;
// Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client
IDeliveryClient client = DeliveryClientBuilder
.WithProjectId("8d20758c-d74c-4f59-ae04-ee928c0816b7")
.Build();
// Gets all content items
// Note: Using the <object> generic parameter produces strongly typed objects, based on "system.type"
IDeliveryItemListingResponse<object> response = await client.GetItemsAsync<object>();
IList<object> items = response.Items;
// Tip: Find more about .NET SDKs at https://kontent.ai/learn/net
using Kontent.Ai.Delivery;
// Tip: Use DI to create Delivery client https://kontent.ai/learn/net-register-client
IDeliveryClient client = DeliveryClientBuilder
.WithProjectId("8d20758c-d74c-4f59-ae04-ee928c0816b7")
.Build();
// Gets all articles
// Tip: Create strongly typed models according to https://kontent.ai/learn/net-strong-types
IDeliveryItemListingResponse<Article> response = await client.GetItemsAsync<Article>(
new EqualsFilter("system.type", "article")
);
IList<Article> items = response.Items;