Ark.Framework.AspNetCore 9.1.0

dotnet add package Ark.Framework.AspNetCore --version 9.1.0
                    
NuGet\Install-Package Ark.Framework.AspNetCore -Version 9.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ark.Framework.AspNetCore" Version="9.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ark.Framework.AspNetCore" Version="9.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Ark.Framework.AspNetCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ark.Framework.AspNetCore --version 9.1.0
                    
#r "nuget: Ark.Framework.AspNetCore, 9.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ark.Framework.AspNetCore@9.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ark.Framework.AspNetCore&version=9.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Ark.Framework.AspNetCore&version=9.1.0
                    
Install as a Cake Tool

Ark.Framework.AspNetCore

The HTTP endpoints of Ark as ASP.NET Core minimal APIs: the editing API for a CMS UI (MapArk), the public read-only delivery API (MapArkDelivery), the language settings (MapArkSettings), and a user adapter for the signed-in ASP.NET Core user.

Install

dotnet add package Ark.Framework.AspNetCore - requires Ark.Framework.Infrastructure.

Setup

builder.Services.AddArk<ContentTypeKey>(ark =>
{
    ...
    ark.UseClaimsUserAdapter();   // optional: the signed-in user, with Admin/Editor role claims
});

var arkApi = app.MapGroup("").RequireAuthorization();
arkApi.MapArk<ContentTypeKey>();          // /api/content
arkApi.MapArkSettings();                  // /api/settings/languages
app.MapArkDelivery<ContentTypeKey>();     // /api/delivery, public

Main entry points

  • MapArk<T>() - the editing API, with the endpoints of the features that are on.
  • MapArkDelivery<T>() - published content for visitors, access-filtered, with ETags.
  • MapArkSettings() - the supported and default languages.
  • UseClaimsUserAdapter() - the signed-in ClaimsPrincipal as the CMS user.
  • ArkDeliveryEndpointRouteBuilderExtensions.ContentResult, FileResponses - the delivery and file response formats, for add-on endpoints.
  • ArkEndpointTags - the area every framework endpoint is tagged with. Each also has a name, a summary, parameter descriptions and typed responses as standard endpoint metadata, so API documentation (OpenAPI with AddOpenApi, say) describes them with no setup.
  • ArkQueryParameterGroupMetadata - query parameters an endpoint reads by a name prefix (the search's f.{facet}=), which the framework's API client sends as one parameter.

HTTP endpoints

Editing API (MapArk, /api/content):

Request Does
GET /features the optional features and add-ons turned on, the site's own property editors and the framework version
GET /types every content type, with its editing rules and file limits
GET /creationschema?contentTypeKey=&language= the form for a new item
POST / creates an item from that form (metadata.fileToken for file content, metadata.parentId for a page)
GET /{id}/updateschema?language=&version= the form of a version (the live one, else the latest)
PUT /{id} saves the form as a new version (and publishes with a publish block)
GET /{id}?language= a summary row
GET /search?query=&language=&contentTypeKeys=&statuses=&languages=&createdFrom=&createdTo=&page=&pageSize=&resolve=... the editors' content search, with facets and ready; with search on it is answered from the index, and resolve=true loads every property for the page
GET /{id}/history?language= every version
POST /validate?contentTypeKey=&propertyName= checks one property value
POST /{id}/publish { language, versionNumber, startPublish, stopPublish }; returns the version published
POST /{id}/unpublish?language=&stopPublish= takes the live version offline, or schedules it
POST /users/{userId}/remove-references removes a user's id from every version (GDPR)
GET/PUT /{id}/access, GET /groups?query= access rules (UseAccessRules)
GET /{id}/references where an item is used (UseContentReferences)
GET /{id}/bin-preview, POST /{id}/bin, GET /bin, POST /bin/{id}/restore, DELETE /bin/{id}, DELETE /bin the rubbish bin (UseContentBin)
POST /files/staged, POST /files, PUT /files/{id}, GET /files/{id}?version=&file=&variant=&width=&download=, PUT/DELETE /files/{id}/crop files (a file store); bodies are application/octet-stream

Delivery API (MapArkDelivery, /api/delivery):

Request Returns
GET /{id}?language= the live item, or 404
GET /?type=&type=&exactTypes=&language=&page=&pageSize=&orderBy=&descending=&filterBy=&from=&to= { items, totalCount, page, pageSize }, at most 100 per page
GET /files/{id}?language=&variant=&width=&download= the file of a live file item

Languages (MapArkSettings, /api/settings): GET /languages, PUT /languages (Admin).

Notes

  • MapArk maps no authorization itself: put it behind RequireAuthorization(); roles and access rules are enforced by the services when a user adapter is registered.
  • Exceptions become problem responses: validation 400, unauthenticated 401, forbidden 403, conflicts 409, too large 413. An item the user may not read is a 404.
  • Delivery responses are Cache-Control: no-cache (private, no-cache for a signed-in visitor), so a publish shows at once.
  • A ?file= URL always means the same bytes and is cached as immutable; build image URLs from fileId.
  • The upload endpoints lift Kestrel's request size limit; a host in front (IIS) must allow the largest file type limit.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Ark.Framework.AspNetCore:

Package Downloads
Ark.Framework.Pages

Pages for the CMS framework: the page tree, URLs per language, IPageService, and the tree and by-URL endpoints (ark.UsePages, MapArkPages).

Ark.Framework.Jobs

Scheduled jobs for the CMS framework: the runner, run history and logs in the CMS database, IArkJobService, and the jobs endpoints (ark.UseJobs, MapArkJobs).

Ark.Framework.Search

Search for the CMS framework: [Searchable] properties indexed on publish, ISearchService's query builder, ISearchIndexer, and the search endpoints (ark.UseSearch, MapArkSearch). Add a provider such as Ark.Framework.Search.Lucene.

Ark.Framework.Settings

Settings types for the CMS framework: ISettings<T> for code, the CMS settings API and the public settings endpoint (ark.UseSettings, MapArkSettingsTypes, MapArkSettingsDelivery). Settings types themselves are declared with Ark.Framework.Settings.Abstractions.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.1.0 0 11/23/2026

v9.1.0: Public packages, content type display texts, search sort order, Markdown images and tables

**Breaking for the CMS UI package**
- The npm package is renamed from `@ark/cms` to `@arkframework/cms` (and `@ark/cms/client` to `@arkframework/cms/client`). Change the dependency and the imports. To install a release candidate, map the scope to the cms-packages feed in `.npmrc`: `@arkframework:registry=https://pkgs.dev.azure.com/antonkronosjo/CMS/_packaging/cms-packages/npm/registry/`.

**New**
- Public packages: stable versions are published to nuget.org (`Ark.Framework.*`) and npmjs.org (`@arkframework/cms`), so a site needs no feed for them. Release candidates stay on the cms-packages feed.
- Release notes: every package carries its release's notes (`<releaseNotes>` in the `.nuspec`), shown on nuget.org.
- Content type display texts: `[DisplayText(language, name)]` on a content type, settings type, property or tab (`Tab = "..."`), repeatable per CMS language, with `Description`, and `Group` on a content type. The API sends them as `displayTexts` on `GET /api/content/types`, the creation, update and settings schemas and `GET /api/settings`. The CMS UI shows them - create picker names, descriptions and groups, field labels and help texts, tab and type names - before the site's `resources`.
- Search sort order: `o.Sorts` on `MapArkSearch` lists the index fields visitors may sort by, such as `SearchSchema.FirstPublishedField`. `GET /api/search?sort={field}&desc=true` picks one; without `sort` the order is best match first, as before. A sort the site didn't allow is a 400; a field in `o.Sorts` that can't be sorted on stops the site at startup. `searchContent` in `@arkframework/cms/client` takes `sort` and `desc`.

**Fixed**
- The CMS Markdown editor keeps images, GFM tables and raw HTML. Before, editing any text saved it without its images and tables, and with its HTML escaped. A table may be saved reformatted, with the same cells.

**Docs**
- Guide: a section on the CMS editor UI, and where stable versions and release candidates come from.

No migrations.