The Ingestion API is designed for bulk content seeding, automated imports, and ad hoc content fixes. It provides three atomic upsert endpoints: one for complete site trees (site + all pages + containers + items), one for standalone page trees (page + all containers + all items), and one for themes (theme + all tokens). All support optional immediate publish or scheduled publish within the same request. Consumers integrate via the MobileContent.ApiClient.Ingest NuGet package (IIngestApiClient).
Auth: Ingestion endpoints should be secured with API key or service-to-service OAuth before production. Currently [AllowAnonymous] for development.
NuGet Setup
// Program.cs
services.AddHttpClient<IIngestApiClient, IngestApiClient>(client =>
{
client.BaseAddress = new Uri("https://gatewayapi.alpa.org");
// Add API key header or service-to-service auth
});
Ingest Page
Delivers a complete page tree in one atomic operation. If the pageKey already exists within the given site, the existing draft rows (all containers and items) are fully replaced. If the page does not exist, it is created fresh. Both paths result in the same normalized database rows.
POST /api/mobilecontent/ingest/page → PageIngestionResponse
PageIngestionRequest
Field
Type
Required
Notes
siteKey
string
Yes
Parent site must already exist.
pageKey
string
Yes
Unique within the site. Lowercase normalized.
title
string?
No
Display title.
sortOrder
int
No
Default 0.
activeTheme
string?
No
Page-level theme override by key (e.g. brand-dark). Resolved to a GUID on save.
containers
IngestContainerDto[]
No
Full container+item tree. Replaces all existing containers on upsert.
publishImmediately
bool
No
Default true. When true, page is snapshotted and set to Published within the same transaction. Ignored when scheduledPublishDate is a future time.
publishNotes
string?
No
Optional note attached to the snapshot when published.
scheduledPublishDate
DateTime?
No
UTC. When set to a future time, overrides publishImmediately — the page lands as Draft and the background scheduler publishes it at the specified time.
previewUsers
string[]
No
User/group IDs for draft preview access. Replaces any existing preview users on upsert. Ignored when publishImmediately is true.
IngestContainerDto fields
Field
Type
Required
Notes
containerType
string
Yes
Must be a valid ContainerType enum name.
title
string?
No
viewAllText
string?
No
viewAllLink
string?
No
columns
int?
No
backgroundToken
string?
No
cornerRadiusToken
string?
No
paddingToken
string?
No
isSortable
bool
No
Default true.
sortOrder
int
No
items
IngestItemDto[]
No
Items nested within this container.
Each IngestItemDto carries the same fields as AdminItemRequest — see the Admin Portal guide for the full field list.
PageIngestionResponse
Field
Type
Description
id
Guid
Database ID of the page.
key
string
Normalized page key.
title
string?
Display title of the page.
activeThemeId
Guid?
GUID of the resolved active theme override for this page, if any.
activeThemeKey
string?
Key of the active theme override for this page, if any.
workflowState
int
Resulting state: 0=Draft, 1=Published.
wasUpserted
bool
True when an existing page was replaced rather than created fresh.
snapshotVersionNumber
int?
Populated when the page was published immediately.
scheduledPublishDate
DateTime?
Populated when the page was deferred to a scheduled publish.
Delivers a complete site tree in one atomic operation. If the siteKey already exists, its metadata (description, active theme) is updated. Each page in the payload is upserted — existing draft rows (containers and items) are fully replaced. Pages that previously belonged to the site but are absent from this payload are soft-deleted. Per-page publish flags are honoured within the same transaction.
POST /api/mobilecontent/ingest/site → SiteIngestionResponse
SiteIngestionRequest
Field
Type
Required
Notes
siteKey
string
Yes
Unique site key. Created if it does not exist; updated if it does.
description
string
No
Human-readable description of the site.
activeTheme
string?
No
Site-level theme key (e.g. brand-dark). Resolved to a GUID on save.
pages
SiteIngestionPageEntry[]
No
Full page tree. Pages absent from this list that already exist in the site are soft-deleted.
SiteIngestionPageEntry fields
Field
Type
Required
Notes
pageKey
string
Yes
Unique within the site. Lowercase normalized.
title
string?
No
Display title.
sortOrder
int
No
Default 0.
activeTheme
string?
No
Page-level theme override key. Resolved to a GUID on save.
containers
IngestContainerDto[]
No
Full container+item tree. Replaces all existing containers on upsert. See IngestContainerDto below.
publishImmediately
bool
No
Default true. When true, page is snapshotted and set to Published within the same transaction. Ignored when scheduledPublishDate is a future time.
publishNotes
string?
No
Optional note attached to the snapshot when published.
scheduledPublishDate
DateTime?
No
UTC. When set to a future time, overrides publishImmediately — the page lands as Draft and the background scheduler publishes it at the specified time.
previewUsers
string[]
No
User/group IDs for draft preview access. Replaces any existing preview users on upsert. Ignored when publishImmediately is true.
Container and item fields are identical to those used by Ingest Page — see IngestContainerDto fields below.
SiteIngestionResponse
Field
Type
Description
id
Guid
Database ID of the site.
key
string
Normalized site key.
description
string
Site description.
activeThemeId
Guid?
GUID of the resolved active theme for the site, if any.
activeThemeKey
string?
Key of the active theme for the site, if any.
wasUpserted
bool
True when an existing site was updated rather than created fresh.
deletedPageKeys
string[]
Keys of pages that were soft-deleted because they were absent from the payload.
Delivers a complete theme with all tokens in one atomic operation. If the key already exists, both the theme metadata and all tokens are fully replaced. Supports optional immediate publish within the same request.
POST /api/mobilecontent/ingest/theme → ThemeIngestionResponse
ThemeIngestionRequest
Field
Type
Required
Notes
key
string
Yes
Unique theme key. Lowercase normalized.
title
string?
No
Display title. On upsert, omitting this field preserves the existing title; passing a value always overwrites it.
description
string?
No
Human-readable description. Always overwritten on upsert (set to null to clear).
tokens
Dictionary<string, string>
No
Token path → value pairs (e.g. "Surface/Brand": "#005DAA"). Any valid path is accepted. Known paths are defined in MobDynThemeTokenRegistry; unknown paths are stored without validation. All 91 registry tokens are recommended for a complete theme.
publishImmediately
bool
No
Default false. When true, theme is snapshotted and set to Published in the same transaction.
publishNotes
string?
No
Optional note stored with the snapshot when published.
ThemeIngestionResponse
Field
Type
Description
id
Guid
Database ID of the theme.
key
string
Normalized theme key.
title
string?
Display title of the theme.
description
string?
Description of the theme.
wasUpserted
bool
True when an existing theme was replaced rather than created fresh.
status
string
Draft or Published depending on publishImmediately.
versionNumber
int?
Snapshot version number. Populated when publishImmediately is true.
tokens
Dictionary<string, string?>
All persisted tokens for the theme, in canonical registry order.