Skip to content
Download as .md

CQRS

Base URL

Every path below is relative to https://api.laksonoteknologi.com/v2.

Applies to every endpoint on this page
  • Accept-Language header (or ?lang= query param, which wins if both are sent) picks the response/error locale - optional, falls back to the server's configured default if neither is sent.
  • Successful responses are {"response_code":"001", "response_text":"Success", "data": {...}}.

Get Commands

GET/v2/cqrs/commandsquery

Lists every registered command (POST/PUT/PATCH/DELETE endpoint) with its full metadata - path, method, description, permission key, middleware chain, tags. This is the exact data the docs site generator introspects to build the public API docs, so it's deliberately left public (no auth) even though the data it returns is later republished with no auth anyway one layer up. Optionally filter by group/method/tag/name substring/deprecated. Paginated.

PublicPaginated

Headers

Accept-Language: en (optional - defaults to server config, or use ?lang= instead)

Plain query parameters - no request body / command field needed.

Request fields

FieldSourceTypeRequiredValidation
groupquerystringfalseomitempty
methodquerystringfalseomitempty,oneof=POST PUT PATCH DELETE
tagquerystringfalseomitempty
namequerystringfalseomitempty,notblank,min=2,max=100
deprecatedquerybooleanfalseomitempty
pagequeryintegerfalsemin=1
page_sizequeryintegerfalsemin=1,max=100

Example


Get Cqrs Health

GET/v2/cqrs/healthquery

Lightweight health/liveness check for the CQRS registry itself (not an individual command/query) - no request params, no auth required, meant for uptime probes rather than admin dashboards.

PublicNo body / params

Headers

Accept-Language: en (optional - defaults to server config, or use ?lang= instead)

Plain query parameters - no request body / command field needed.

Example


Get Cqrs Stats

GET/v2/cqrs/statsquery

Returns registry-wide CQRS stats - total command/query counts and related aggregates - with three optional breakdowns you can toggle on: include_groups (per-group counts), include_middlewares (per-middleware usage), include_paths (per-path detail). Response is cached 5 minutes server-side, so a change to the registry may take up to that long to show up here. Admin-auth only.

Auth required · system_owner or merchantCacheable

Headers

Authorization: Bearer <token>
Accept-Language: en (optional - defaults to server config, or use ?lang= instead)

Plain query parameters - no request body / command field needed.

Request fields

FieldSourceTypeRequiredValidation
include_groupsquerybooleanfalseomitempty
include_middlewaresquerybooleanfalseomitempty
include_pathsquerybooleanfalseomitempty

Example


Get Queries

GET/v2/cqrs/queriesquery

Lists every registered query (GET/POST-as-read endpoint) with its full metadata - path, method, description, permission key, middleware chain, tags, plus query-specific flags (cacheable/paginated). Same public-by-design docs-generator source as get-commands. Optionally filter by group/method/tag/name substring/cacheable/paginated/deprecated. Paginated.

PublicPaginated

Headers

Accept-Language: en (optional - defaults to server config, or use ?lang= instead)

Plain query parameters - no request body / command field needed.

Request fields

FieldSourceTypeRequiredValidation
groupquerystringfalseomitempty
methodquerystringfalseomitempty,oneof=GET POST
tagquerystringfalseomitempty
namequerystringfalseomitempty,notblank,min=2,max=100
cacheablequerybooleanfalseomitempty
paginatedquerybooleanfalseomitempty
deprecatedquerybooleanfalseomitempty
pagequeryintegerfalsemin=1
page_sizequeryintegerfalsemin=1,max=100

Example


Search Cqrs

GET/v2/cqrs/searchquery

Full-text searches across registered commands and queries by name/description/path via the required q param (min 2 chars). Narrow results with type (command/query/all), group, and/or deprecated. Admin-auth only, unlike get-commands/get-queries which expose the same underlying data publicly.

Auth required · system_owner or merchant

Headers

Authorization: Bearer <token>
Accept-Language: en (optional - defaults to server config, or use ?lang= instead)

Plain query parameters - no request body / command field needed.

Request fields

FieldSourceTypeRequiredValidation
qquerystringtruerequired,notblank,min=2,max=200
typequerystringfalseomitempty,oneof=command query all
groupquerystringfalseomitempty
deprecatedquerybooleanfalseomitempty

Example


Groups

Get Group Stats

GET/v2/cqrs/groups/:group_name/statsquery

Returns stats scoped to one CQRS group (e.g. 'system', 'auth', 'profile' - the WithGroupName value each command/query is registered under), identified by group_name in the path. 404s if the group name doesn't match any registered item. Cached 3 minutes server-side. Admin-auth only.

Auth required · system_owner or merchantCacheable

Headers

Authorization: Bearer <token>
Accept-Language: en (optional - defaults to server config, or use ?lang= instead)

Plain query parameters - no request body / command field needed.

Request fields

FieldSourceTypeRequiredValidation
:group_namepathstringtruerequired,notblank

Example


Middlewares

Get Middleware Stats

GET/v2/cqrs/middlewares/:middleware_name/statsquery

Returns usage stats for one named middleware (e.g. MWAuthAdmin) - how many registered commands/queries have it in their chain - identified by middleware_name in the path. Cached 3 minutes server-side. Admin-auth only.

Auth required · system_owner or merchantCacheable

Headers

Authorization: Bearer <token>
Accept-Language: en (optional - defaults to server config, or use ?lang= instead)

Plain query parameters - no request body / command field needed.

Request fields

FieldSourceTypeRequiredValidation
:middleware_namepathstringtruerequired,notblank

Example