JQL Fundamentals

Side effects and casing

Request casing, sideEffects options, event dispatch, multipart behavior, and consequence hooks.

sideEffects is the place for processor directives that are not model fields. Request examples use camelCase, while the server normalizes keys internally.

Casing

The default request and response casing is camelCase. You can request snake_case responses by setting a casing side effect. recursive controls nested object conversion and includeArrays controls arrays.

json
1{ 2 "__meta__": { 3 "schema": "model", 4 "namespace": "system.User", 5 "intent": "retrieve", 6 "authenticationClass": "jwt", 7 "sideEffects": { 8 "casing": { 9 "method": "snake_case", 10 "recursive": true, 11 "includeArrays": true 12 } 13 }, 14 "limit": 5 15 }, 16 "id": null, 17 "firstName": null, 18 "lastName": null 19}

Mutation side effects

Common model side effects include:

  • multipartFormUpload: tells create/update processors to read uploaded files from request.FILES.
  • fileFieldMapping: maps model file fields to multipart part names.
  • appendToManyToMany: on update, add many-to-many values instead of replacing them.
  • dangerouslyDeleteMultiple: required for filtered delete operations.
  • consequenceType: set to class for class-level consequences.
json
1{ 2 "__meta__": { 3 "schema": "model", 4 "namespace": "tasks.Task", 5 "intent": "update", 6 "authenticationClass": "jwt", 7 "uniqueObject": { 8 "id": 100 9 }, 10 "sideEffects": { 11 "appendToManyToMany": true 12 }, 13 "return": { 14 "id": null, 15 "title": null, 16 "assignees": [ 17 { 18 "id": null, 19 "email": null 20 } 21 ] 22 } 23 }, 24 "assignees": [ 25 12, 26 19 27 ] 28}

Event dispatch

Model create, update, delete, bulkInsert, and bulkUpdate dispatch JQL events such as jql:tickets.Ticket:update after processing. Controller calls can also notify subscribers through sideEffects.notifySubscribers.

Consequences

Consequences are model action hooks named on_<consequence>. They run through permission and mutation validation and can return a JQL process response or a direct HTTP response.

See files and uploads, notifications realtime, and /developer/outbound-webhooks.