← Technical API reference

Backend resource · STATIC DECLARATIONS

Template API reference · mansoq-core

Static source contract for Template: 7 declared or inherited operation mappings, schema/field evidence and authorization/refusal references. Deployment and behavioral review remain explicit.

Static API contract — behavior review pending. Source baseline f6e9f05f76d4.

Enable JavaScript to inspect structured operation, parameter, schema and permission evidence. Download this reference and its evidence.

Declared route and availability

This resource is declared in mansoq-core at /api/v1/template/. verified core mount in config/urls.py A registered path and an indexed handler do not prove deployment availability, user permission or production readiness.

Operation map

Method Path Action Evidence
GET /api/v1/template/ list declared/inherited method
POST /api/v1/template/ create declared/inherited method
GET /api/v1/template/{slug}/ retrieve declared/inherited method
PUT /api/v1/template/{slug}/ update declared/inherited method
PATCH /api/v1/template/{slug}/ partial_update declared/inherited method
GET /api/v1/template/schema/ get_schema @action declaration
POST /api/v1/template/preview/ preview @action declaration

list · GET

GET /api/v1/template/ — action list. static contract extracted; runtime/permission/payload behavior review pending.

Directly observed request reads (these do not constitute a complete accepted-payload or requiredness guarantee):

Location Field Declared/inferred read type Requiredness evidence
query facility not declared at read site direct indexing; validation may be upstream
query facility_only not declared at read site not established

Observed authorization checks: can_list_facility_template. Helper/queryset evidence is included; this is not proof of complete security review.

Declared refusal/error evidence: PermissionDenied: You do not have permission to read templates.

create · POST

POST /api/v1/template/ — action create. static contract extracted; runtime/permission/payload behavior review pending.

Directly observed request reads (these do not constitute a complete accepted-payload or requiredness guarantee):

Location Field Declared/inferred read type Requiredness evidence
query facility not declared at read site direct indexing; validation may be upstream
query facility_only not declared at read site not established

Observed authorization checks: can_list_facility_template, can_write_facility_template. Helper/queryset evidence is included; this is not proof of complete security review.

Declared refusal/error evidence: PermissionDenied: You do not have permission to read templates; PermissionDenied: You do not have permission to write templates; ValidationError: Slug already exists..

retrieve · GET

GET /api/v1/template/{slug}/ — action retrieve. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

Location Parameter Type Required
path slug router lookup string; semantic ID validation requires handler/schema review true

Directly observed request reads (these do not constitute a complete accepted-payload or requiredness guarantee):

Location Field Declared/inferred read type Requiredness evidence
query facility not declared at read site direct indexing; validation may be upstream
query facility_only not declared at read site not established

Observed authorization checks: can_list_facility_template. Helper/queryset evidence is included; this is not proof of complete security review.

Declared refusal/error evidence: PermissionDenied: You do not have permission to read templates.

update · PUT

PUT /api/v1/template/{slug}/ — action update. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

Location Parameter Type Required
path slug router lookup string; semantic ID validation requires handler/schema review true

Directly observed request reads (these do not constitute a complete accepted-payload or requiredness guarantee):

Location Field Declared/inferred read type Requiredness evidence
query facility not declared at read site direct indexing; validation may be upstream
query facility_only not declared at read site not established

Observed authorization checks: can_list_facility_template, can_write_facility_template. Helper/queryset evidence is included; this is not proof of complete security review.

Declared refusal/error evidence: PermissionDenied: You do not have permission to read templates; PermissionDenied: You do not have permission to write templates; ValidationError: Slug already exists..

partial_update · PATCH

PATCH /api/v1/template/{slug}/ — action partial_update. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

Location Parameter Type Required
path slug router lookup string; semantic ID validation requires handler/schema review true

Directly observed request reads (these do not constitute a complete accepted-payload or requiredness guarantee):

Location Field Declared/inferred read type Requiredness evidence
query facility not declared at read site direct indexing; validation may be upstream
query facility_only not declared at read site not established

Observed authorization checks: can_list_facility_template, can_write_facility_template. Helper/queryset evidence is included; this is not proof of complete security review.

Declared refusal/error evidence: PermissionDenied: You do not have permission to read templates; ValidationError: Slug already exists.; PermissionDenied: You do not have permission to write templates.

get_schema · GET

GET /api/v1/template/schema/ — action get_schema. static contract extracted; runtime/permission/payload behavior review pending.

Directly observed request reads (these do not constitute a complete accepted-payload or requiredness guarantee):

Location Field Declared/inferred read type Requiredness evidence
query facility not declared at read site direct indexing; validation may be upstream
query facility_only not declared at read site not established

Observed authorization checks: can_view_template_schema, can_list_facility_template. Helper/queryset evidence is included; this is not proof of complete security review.

Explicit response statuses in observed code: status.HTTP_500_INTERNAL_SERVER_ERROR. Other branches/framework exception handling may differ.

Declared refusal/error evidence: PermissionDenied: You do not have permission to access template schema; PermissionDenied: You do not have permission to read templates.

preview · POST

POST /api/v1/template/preview/ — action preview. static contract extracted; runtime/permission/payload behavior review pending.

Directly observed request reads (these do not constitute a complete accepted-payload or requiredness guarantee):

Location Field Declared/inferred read type Requiredness evidence
query facility not declared at read site direct indexing; validation may be upstream
query facility_only not declared at read site not established

body validation: PreviewTemplateRequest. Declared fields below; inherited fields are retained in the schema inventory.

Field Type Required Constraints
template_data str true No extra constraint extracted
output_format str false No extra constraint extracted
context str true No extra constraint extracted
options dict false No extra constraint extracted

decorator request: PreviewTemplateRequest. Declared fields below; inherited fields are retained in the schema inventory.

The declared field table is shown at its first occurrence in this reference; this operation links the same schema.

Observed authorization checks: can_preview_template, can_list_facility_template. Helper/queryset evidence is included; this is not proof of complete security review.

Declared refusal/error evidence: PermissionDenied: You do not have permission to preview templates; ValidationError: Invalid output format; ValidationError: Invalid context; ValidationError: Preview generation failed; PermissionDenied: You do not have permission to read templates.

Conditional gates: settings.DEBUG.

Integration review checklist

Confirm the installed route and full schema; review authentication, organization/facility scoping, all accepted fields, value-state and date/time semantics, idempotency, pagination, response/exception branches and the allowed correction/reversal workflow. Test positive and negative cases with synthetic data. This source reference does not establish external certification or replace an illustrated user procedure.

Pinned source evidence

Links require access to the private source repository.