COMPLETE API REFERENCE

Every option.
One searchable contract.

Search the installed @wts-calendar/core declarations, public calendar methods, and every PHP and ASP.NET Core endpoint setting. Types and method signatures are generated from the package pinned by this portal.

248 client options95 public APIs78 event-bus names447 exported symbols20 server settings

Shared event REST contract

Both server packages expose the same route-level adapter contract and concurrency semantics. Their field validation and recurrence-key casing have documented differences. PHP supplies a PSR-15 handler; ASP.NET Core supplies Minimal API route extensions. Authentication, authorization, tenant isolation, and durable storage stay in your application.

MethodRouteSuccessPurpose
GET/api/calendar/events?start={ISO}&end={ISO}200Load a bounded range; supports timeZone, cursor and limit.
GET/api/calendar/events/{id}200 + ETagLoad one event and its current version.
POST/api/calendar/events201 + Location + ETagValidate and create one event.
PATCH / PUT/api/calendar/events/{id}200 + ETagReplace the stored event; send If-Match to detect stale edits.
DELETE/api/calendar/events/{id}204Delete an event; If-Match can protect the mutation.

Range query

start
Required offset-aware ISO instant.
end
Required exclusive instant after start; maximum window is configurable.
timeZone
Optional supported runtime/system time-zone identifier, up to 100 characters.
cursor
Optional pagination cursor. Treat it as an opaque server value.
limit
Optional page size, default 250 and maximum 1000 unless reconfigured.

Event JSON fields

FieldTypeContract
idstringStable event identifier; 1–200 printable characters in .NET and bytes in PHP. A create store may assign it.
titlestringRequired display title, limited by the configured title length.
startstringRequired yyyy-MM-dd or ISO date-time containing Z or an explicit offset.
endstring | nullOptional exclusive end in the same date kind as start; must be later than start.
isAllDayboolean | nullOptional. When true, start and end must be date-only. PHP additionally rejects date-only start when false.
descriptionstring | nullOptional long-form description, limited by server configuration.
urlstring | nullOptional HTTP(S) URL. PHP also rejects embedded credentials.
editable / removeableboolean | nullOptional client interaction flags preserved by both packages.
display / color / textColorstring | nullOptional presentation values passed through to the calendar client.
classNamesstring[] | nullOptional classes; at most 64 entries of up to 200 characters/bytes each.
resourceId / resourceUnitsstring / numberOptional resource assignment; units must be greater than zero.
rrule / rdate / exdatestring / string[]Recurrence data. PHP uses lowercase keys; current .NET JSON emits rRule, rDate, and exDate.
recurrenceTimeZonestring | nullOptional time-zone identifier associated with recurrence expansion.
extendedProps / metaobject | nullApplication-owned JSON counted toward the custom-data byte limit.
additional fieldsobjectUnknown top-level fields are retained. PHP also recognizes a broader set of client event properties.

20 matching server settings

routePrefix

PHP

Path prefix matched by CalendarApiHandler. A trailing slash is normalized.

Type
string
Default
/api/calendar/events

defaultPageSize

PHP

Default number of events returned when the request does not provide a page size.

Type
int
Default
250

maxPageSize

PHP

Largest accepted page size. Larger requests are rejected instead of silently loading an unbounded result.

Type
int
Default
1000

maxQueryDays

PHP

Largest permitted start-to-end query range. Protects storage from accidental unbounded scans.

Type
int
Default
366

maxPayloadBytes

PHP

Maximum JSON request-body size accepted for create and update operations.

Type
int
Default
131072

maxTitleLength

PHP

Maximum event title length.

Type
int
Default
300

maxDescriptionLength

PHP

Maximum event description length.

Type
int
Default
16000

maxCustomDataBytes

PHP

Maximum serialized custom-data size for one event.

Type
int
Default
32768

requireIfMatchForUpdate

PHP

When enabled, updates without an If-Match precondition return HTTP 428.

Type
bool
Default
false

requireIfMatchForDelete

PHP

When enabled, deletes without an If-Match precondition return HTTP 428.

Type
bool
Default
false

pattern

ASP.NET Core

Route-group pattern passed to MapWtsCalendarEvents. It must not be null, empty, or whitespace.

Type
string
Default
/api/calendar/events

DefaultPageSize

ASP.NET Core

Default number of events returned when the request does not provide a page size.

Type
int
Default
250

MaxPageSize

ASP.NET Core

Largest accepted page size. Larger requests are rejected instead of silently loading an unbounded result.

Type
int
Default
1000

MaxQueryWindow

ASP.NET Core

Largest permitted start-to-end query range. Protects storage from accidental unbounded scans.

Type
TimeSpan
Default
366 days

MaxPayloadBytes

ASP.NET Core

Maximum JSON request-body size accepted for create and update operations.

Type
long
Default
131072

MaxTitleLength

ASP.NET Core

Maximum event title length.

Type
int
Default
300

MaxDescriptionLength

ASP.NET Core

Maximum event description length.

Type
int
Default
16000

MaxCustomDataBytes

ASP.NET Core

Maximum serialized custom-data size for one event.

Type
int
Default
32768

RequireIfMatchForUpdate

ASP.NET Core

When enabled, updates without an If-Match precondition return HTTP 428.

Type
bool
Default
false

RequireIfMatchForDelete

ASP.NET Core

When enabled, deletes without an If-Match precondition return HTTP 428.

Type
bool
Default
false

Storage interface

Production applications implement the same five logical operations. Mutation status is one of Created, Updated, Deleted, NotFound, Conflict, or Rejected.

OperationPHPASP.NET CoreRequired behavior
Queryquery(CalendarEventQuery): CalendarEventPageQueryAsync(query, cancellationToken): ValueTask<WtsCalendarEventPage>Return half-open range matches, stable ordering, an opaque cursor, and optional collection version/meta.
Findfind(string $id): ?StoredCalendarEventFindAsync(id, cancellationToken): ValueTask<WtsCalendarStoredEvent?>Return the event plus a nonempty opaque version, or null when absent.
Createcreate(CalendarEvent): MutationResultCreateAsync(event, cancellationToken): ValueTask<WtsCalendarMutationResult>Return Created plus a stored event containing its final ID and version.
Updateupdate(id, event, expectedVersion): MutationResultUpdateAsync(id, event, expectedVersion, cancellationToken): ValueTask<WtsCalendarMutationResult>Return Updated, NotFound, Conflict, or Rejected; compare expectedVersion atomically.
Deletedelete(id, expectedVersion): MutationResultDeleteAsync(id, expectedVersion, cancellationToken): ValueTask<WtsCalendarMutationResult>Return Deleted, NotFound, Conflict, or Rejected; compare expectedVersion atomically.

Runtime compatibility

wts-calendar/server-php v1.0.0

PHP 8.2+

PSR-7 2.x, PSR-15 1.x, PSR-17 1.x; the host supplies concrete HTTP factories.

Wts.Calendar.AspNetCore v1.0.0

.NET 8 or .NET 10

ASP.NET Core shared framework; no third-party runtime package.

Error responses

400

Malformed identifiers, query values, range, cursor, time zone, JSON, or If-Match header.

404

The requested event does not exist.

405

Unsupported collection/item method. PHP returns Allow; ASP.NET routing supplies the response.

409

The supplied event version is stale or the mutation conflicts with stored state.

413

The JSON body exceeds MaxPayloadBytes / maxPayloadBytes.

415

Create or update did not use application/json.

422

The JSON shape is valid but event fields fail validation or storage rejects the mutation.

428

If-Match is required by configuration but was not supplied.

401 / 403

Host-owned authentication and authorization failures; apply policy before the package endpoint.

500

Host-owned exception handling for store, option, serialization, or infrastructure failures.

Wire-level differences

  • PHP accepts application/json and structured +json; the .NET endpoint requires application/json.
  • PHP bounds streams even without Content-Length. Configure the ASP.NET host request-body limit for chunked/unknown-length uploads.
  • PHP applies byte limits; .NET applies character limits to text fields. Cursor formats also differ, so clients must treat cursors as opaque.
  • PATCH and PUT both replace the event representation; the route ID wins over any body ID.
  • ETags are opaque. Send exactly one strong tag or * in If-Match; stale writes return 409 and required missing preconditions return 428.

Production checklist

  • Register a durable implementation of CalendarEventStoreInterface or IWtsCalendarEventStore; bundled in-memory stores are for demos and tests.
  • Apply authentication and event-level authorization before the calendar handler/routes.
  • Scope every storage operation by tenant and user; never trust client-supplied ownership fields.
  • Restrict CORS, configure request limits, rate limits, structured logs, metrics, and backups.
  • Enable required If-Match checks when clients must never overwrite a newer event version.