JQL Fundamentals
Intents
Supported JQL intents for reads, mutations, metadata, controllers, consequences, aggregation, and bulk work.
An intent tells JQL which processor or controller method to run. Model intents are permission-checked as namespace:intent; controller intents are dispatched to matching on_<intent> methods.
Read intents
retrieve: list records with offset/limit pagination.retrieveOne: fetch a single record usinguniqueObject.retrieveV2: list records with optional cursor pagination.metadata,meta,documentation: inspect model metadata.constant: return model constants where supported.extract: stream exported data from a model processor.
1{
2 "__meta__": {
3 "schema": "model",
4 "namespace": "tickets.Ticket",
5 "intent": "retrieveOne",
6 "authenticationClass": "jwt",
7 "uniqueObject": {
8 "id": 1001
9 }
10 },
11 "id": null,
12 "title": null,
13 "status": null,
14 "category": {
15 "id": null,
16 "name": null
17 }
18}Mutation intents
create: create one model instance and serialize fields from__meta__.return.update/patch: update an existing instance selected byuniqueObject.updateOrCreate: update if present, otherwise create usinguniqueObjectplus payload values.deleteOne: delete one instance selected byuniqueObject.delete: delete a filtered set only whensideEffects.dangerouslyDeleteMultipleis true.bulkInsertandbulkUpdate: run the bulk processors.
1{
2 "__meta__": {
3 "schema": "model",
4 "namespace": "tasks.Category",
5 "intent": "create",
6 "authenticationClass": "jwt",
7 "return": {
8 "id": null,
9 "name": null,
10 "alias": null
11 }
12 },
13 "name": "Customer onboarding",
14 "alias": "customer-onboarding"
15}Aggregate intents
aggregate supports sum, count, max, min, and avg, with optional groupBy, truncate, bins, comparisons, filters, search, and ordering.
1{
2 "__meta__": {
3 "schema": "model",
4 "namespace": "billing.Invoice",
5 "intent": "aggregate",
6 "authenticationClass": "jwt",
7 "groupBy": "status"
8 },
9 "status": null,
10 "invoiceCount": {
11 "__meta__": {
12 "field": "*",
13 "function": "count"
14 }
15 },
16 "totalAmount": {
17 "__meta__": {
18 "field": "total",
19 "function": "sum"
20 }
21 }
22}Consequences
consequence invokes a model method named on_<consequence>. By default it acts on one instance selected by uniqueObject; set sideEffects.consequenceType: "class" for class-level actions.
1{
2 "__meta__": {
3 "schema": "model",
4 "namespace": "shopbyantly.Cart",
5 "intent": "consequence",
6 "authenticationClass": "public",
7 "consequence": "addItem",
8 "uniqueObject": {
9 "id": 77
10 }
11 },
12 "listing": 12,
13 "quantity": 2
14}Controller intents
Controller intents are named after the public method without the on_ prefix, for example system.User.authenticate, objects.Record.saveWithInlines, reports.Chart.makePieChart, or iris.IrisV2.chat.
See side effects, filters and queries, and /developer/scripts-api.