Skip to content

staff.reports ​

23 methods on staff.reports. Each returns the answer's data and throws NoviqaError on a failed answer.

list ​

GET/admin/v1/reports

List reports the caller may run

The enabled report configurations the caller may run, ordered by position then name. A report configurator sees every one. Anyone else sees those opened to them by their staff report lines (GET /admin/v1/staff/{login}/reports), with can_export true only when they hold the export right and a line allows export, and oldest_from set to the first day they may ask for when a line limits depth.

More details

Rights: the staff member needs at least one of: reports, config.reports.

Returns
Promise<Available[]>
The answer's data.
Errors
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.list()
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/reports" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": [
    {
      "can_export": true,
      "created_at": "2026-09-25T10:15:00Z",
      "daily": true,
      "description": "string",
      "enabled": true,
      "id": 1,
      "inputs": [
        "string"
      ],
      "module": "string",
      "name": "Ann Smith",
      "oldest_from": "string",
      "params": {},
      "position": 1
    }
  ],
  "request_id": "5b7f2c1e"
}
ts
staff.reports.list(options?: RequestOptions): Promise<report.Available[]>

listConfigs ​

GET/admin/v1/reports/configs

List report configurations

Every report configuration, enabled or not, ordered by position then name.

More details

Rights: the staff member needs every one of: config.reports.

Returns
Promise<ReportConfig[]>
The answer's data.
Errors
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.listConfigs()
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/reports/configs" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": [
    {
      "created_at": "2026-09-25T10:15:00Z",
      "enabled": true,
      "id": 1,
      "module": "string",
      "name": "Ann Smith",
      "params": {},
      "position": 1,
      "updated_at": "2026-09-25T10:15:00Z",
      "version": 1
    }
  ],
  "request_id": "5b7f2c1e"
}
ts
staff.reports.listConfigs(options?: RequestOptions): Promise<models.ReportConfig[]>

createConfigs ​

POST/admin/v1/reports/configs

Add a report configuration

Sets up a report over a module. name and module are required: the name is 1-255 characters shaped Folder\Sub\Report (no empty part, no *, , or !) and unique (conflict if taken); the module is one of GET /admin/v1/reports/modules. enabled defaults to true; position 0 or left out puts it last. params holds at most 64 entries, names 1-64 characters, values at most 1024 (groups sets the default groups, company fixes one company). id, version and times are set by the server. Writes a journal line.

More details

Rights: the staff member needs every one of: config.reports.

Request body
created_atstring
UTC time, RFC 3339.
enabledboolean
idinteger
modulestring
namestring
"Folder\Report"
paramsobject
positioninteger
updated_atstring
UTC time, RFC 3339.
versioninteger
Returns
Promise<ReportConfig>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
409conflict: already exists
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.createConfigs({
  enabled: true,
  module: "deposit_withdrawal",
  name: "Finance\\Deposits",
  params: {
    groups: "real\\*,!real\\test*"
  }
})
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/reports/configs" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "enabled": true,
  "module": "deposit_withdrawal",
  "name": "Finance\\Deposits",
  "params": {
    "groups": "real\\*,!real\\test*"
  }
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "created_at": "2026-09-25T10:15:00Z",
    "enabled": true,
    "id": 1,
    "module": "string",
    "name": "Ann Smith",
    "params": {},
    "position": 1,
    "updated_at": "2026-09-25T10:15:00Z",
    "version": 1
  },
  "request_id": "5b7f2c1e"
}
ts
staff.reports.createConfigs(body: models.ReportConfig, options?: RequestOptions): Promise<models.ReportConfig>

updateConfigs ​

PATCH/admin/v1/reports/configs/{id}

Change a report configuration

Changes the fields sent; version is required and must be the one last read, else conflict (reload and retry). The same rules as adding apply to the result; a name taken by another configuration answers conflict. The version goes up by one. Writes a journal line.

More details

Rights: the staff member needs every one of: config.reports.

Parameters
idinteger · pathrequired
Numeric id.
Request body
created_atstring
UTC time, RFC 3339.
enabledboolean
idinteger
modulestring
namestring
"Folder\Report"
paramsobject
positioninteger
updated_atstring
UTC time, RFC 3339.
versioninteger
Returns
Promise<ReportConfig>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
409conflict: already exists
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.updateConfigs(1, {
  enabled: false,
  version: 3
})
bash
curl -X PATCH "$NOVIQA_API_URL/admin/v1/reports/configs/1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "enabled": false,
  "version": 3
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "created_at": "2026-09-25T10:15:00Z",
    "enabled": true,
    "id": 1,
    "module": "string",
    "name": "Ann Smith",
    "params": {},
    "position": 1,
    "updated_at": "2026-09-25T10:15:00Z",
    "version": 1
  },
  "request_id": "5b7f2c1e"
}
ts
staff.reports.updateConfigs(id: number, body: models.ReportConfig, options?: RequestOptions): Promise<models.ReportConfig>

deleteConfigs ​

DELETE/admin/v1/reports/configs/{id}

Delete a report configuration

Removes the configuration and its schedules; jobs already built stay readable. Writes a journal line.

More details

Rights: the staff member needs every one of: config.reports.

Parameters
idinteger · pathrequired
Numeric id.
Returns
Promise<null>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.deleteConfigs(1)
bash
curl -X DELETE "$NOVIQA_API_URL/admin/v1/reports/configs/1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": null,
  "request_id": "5b7f2c1e"
}
ts
staff.reports.deleteConfigs(id: number, options?: RequestOptions): Promise<null>

daily ​

GET/admin/v1/reports/daily

List daily account reports

The day-end report of each account for each trading day (server clock), newest day first, then by login. Limited to accounts whose group is in the caller's group scope; staff groups and technical accounts are left out, and the group shown is the account's group on that day. group is a group mask, company a licence company, login one account; from and to are dates (2006-01-02), both inclusive, and to must not be before from. Page is 1-based; limit defaults to 100, at most 1000. No group in scope matching gives an empty page.

More details

Rights: the staff member needs every one of: reports.

Parameters
groupstring · query
mask
companystring · query
logininteger · query
fromstring · query
2006-01-02, inclusive
tostring · query
pageinteger · query
limitinteger · query
Returns
Promise<Page>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.daily({
  group: "string",
  company: "string",
  login: 1001
})
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/reports/daily?group=string&company=string&login=1001" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "items": [
      {
        "balance": "1000.00",
        "balance_prev_day": "1.08452",
        "balance_prev_month": "1.08452",
        "credit": "0.00",
        "daily_bonuses": "1.08452",
        "daily_charges": "1.08452",
        "daily_commission_instant": "1.08452",
        "daily_commission_turnover": "1.08452",
        "daily_compensation": "1.08452",
        "daily_corrections": "1.08452",
        "daily_credit": "1.08452",
        "daily_deposits": "1.08452"
      }
    ],
    "page": 1,
    "total": 1
  },
  "request_id": "5b7f2c1e"
}
ts
staff.reports.daily(query?: { group?, company?, login?, from?, to?, page?, limit? }, options?: RequestOptions): Promise<report.Page>

exposure ​

GET/admin/v1/reports/exposure

Open exposure per symbol

Buy, sell and net open volume (lots) and the number of open positions per symbol, summed over the accounts whose group is in the caller's group scope (staff groups left out), ordered by symbol. Empty when no group matches.

More details

Rights: the staff member needs every one of: reports.

Parameters
groupstring · query
Group mask; empty = every group in scope.
companystring · query
Licence company; empty = any.
Returns
Promise<Exposure[]>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.exposure({
  group: "string",
  company: "string"
})
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/reports/exposure?group=string&company=string" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": [
    {
      "buy_volume": "1.08452",
      "net_volume": "1.08452",
      "positions": 1,
      "sell_volume": "1.08452",
      "symbol": "EURUSD",
      "symbol_id": 1
    }
  ],
  "request_id": "5b7f2c1e"
}
ts
staff.reports.exposure(query?: { group?, company? }, options?: RequestOptions): Promise<report.Exposure[]>

jobs ​

GET/admin/v1/reports/jobs

List report jobs

The caller's own report jobs, newest first. all=true lists everyone's (report configurators only, else forbidden). Page is 1-based; limit defaults to 50, at most 200. Job progress also arrives on the live socket as report_job frames (id, state, rows, attempts, error) sent to the owner's staff sockets only; poll this route as a fallback.

More details

Rights: the staff member needs at least one of: reports, config.reports.

Parameters
allboolean · query
true = every person's jobs; report configurators only. Default false.
pageinteger · query
1-based page; default 1.
limitinteger · query
Rows per page; default 50.
Returns
Promise<ReportJob_>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.jobs({
  all: true,
  page: 1,
  limit: 1
})
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/reports/jobs?all=true&page=1&limit=1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "items": [
      {
        "attempts": 1,
        "config_id": 1,
        "created_at": "2026-09-25T10:15:00Z",
        "error": "string",
        "finished_at": "2026-09-25T10:15:00Z",
        "format": "string",
        "id": 1,
        "module": "string",
        "name": "Ann Smith",
        "params": {},
        "requested_by": 1,
        "rows": 1
      }
    ],
    "page": 1,
    "total": 1
  },
  "request_id": "5b7f2c1e"
}
ts
staff.reports.jobs(query?: { all?, page?, limit? }, options?: RequestOptions): Promise<http.pageOf_models.ReportJob_>

retrieveJobs ​

GET/admin/v1/reports/jobs/{id}

Read a report job

One job with its state and, once done, its tables (sections: columns, row count and totals). The caller's own job, or any job for a report configurator; anyone else's answers not_found. Job progress also arrives on the live socket as report_job frames (id, state, rows, attempts, error) sent to the owner's staff sockets only; poll this route as a fallback.

More details

Rights: the staff member needs at least one of: reports, config.reports.

Parameters
idinteger · pathrequired
Numeric id.
Returns
Promise<ReportJob>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.retrieveJobs(1)
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/reports/jobs/1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "attempts": 1,
    "config_id": 1,
    "created_at": "2026-09-25T10:15:00Z",
    "error": "string",
    "finished_at": "2026-09-25T10:15:00Z",
    "format": "string",
    "id": 1,
    "module": "string",
    "name": "Ann Smith",
    "params": {
      "config": {},
      "from": "string",
      "groups": "string",
      "in_reach": [
        "string"
      ],
      "login": 1001,
      "logins": [
        1
      ],
      "server": "string",
      "to": "string"
    },
    "requested_by": 1,
    "rows": 1
  },
  "request_id": "5b7f2c1e"
}
ts
staff.reports.retrieveJobs(id: number, options?: RequestOptions): Promise<models.ReportJob>

jobsCancel ​

POST/admin/v1/reports/jobs/{id}/cancel

Cancel a report job

Stops a queued or running job: the caller's own, or any for a report configurator. A job already done, failed or cancelled answers conflict.

More details

Rights: the staff member needs at least one of: reports, config.reports.

Parameters
idinteger · pathrequired
Numeric id.
Returns
Promise<null>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
409conflict: already exists
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.jobsCancel(1)
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/reports/jobs/1/cancel" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": null,
  "request_id": "5b7f2c1e"
}
ts
staff.reports.jobsCancel(id: number, options?: RequestOptions): Promise<null>

jobsExport ​

GET/admin/v1/reports/jobs/{id}/export

Download a finished report

Streams every table of a finished job as a CSV file (format=csv) or a printable HTML page (format=html, text/html) as an attachment named <report> YYYY_MM_DD HH_MM_SS.<format>. It starts with the report name, groups, period and when it was built; each table's totals follow its rows. Needs the export right, and for anyone but a report configurator a report line that allows export (else forbidden). A job not yet done answers conflict. Same visibility as reading the job.

More details

Rights: the staff member needs at least one of: reports, config.reports.

Parameters
idinteger · pathrequired
Numeric id.
formatstring · queryrequired
File format.
csv html
Returns
Promise<Response>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
409conflict: already exists
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.jobsExport(1, {
  format: "csv"
})
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/reports/jobs/1/export?format=csv" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
ts
// text/csv file: the SDK returns the raw Response
ts
staff.reports.jobsExport(id: number, query: { format }, options?: RequestOptions): Promise<Response>

jobsRows ​

GET/admin/v1/reports/jobs/{id}/rows

Read rows of a finished report

One page of one table of a finished job. section is a section key from the job; each row is its cells as text in the section's column order (totals are in the job, not here). Page is 1-based; limit defaults to 200, at most 1000. A job not yet done answers conflict; an unknown section invalid_input. Same visibility as reading the job.

More details

Rights: the staff member needs at least one of: reports, config.reports.

Parameters
idinteger · pathrequired
Numeric id.
sectionstring · queryrequired
Section key from the job's sections.
pageinteger · query
1-based page; default 1.
limitinteger · query
Rows per page; default 200.
Returns
Promise<RowsPage>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
409conflict: already exists
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.jobsRows(1, {
  section: "string",
  page: 1,
  limit: 1
})
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/reports/jobs/1/rows?section=string&page=1&limit=1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "page": 1,
    "rows": [
      [
        "string"
      ]
    ],
    "section": "string",
    "total": 1
  },
  "request_id": "5b7f2c1e"
}
ts
staff.reports.jobsRows(id: number, query: { section, page?, limit? }, options?: RequestOptions): Promise<report.RowsPage>

modules ​

GET/admin/v1/reports/modules

List report modules

modules is every kind of server report the reporting service builds: name, title, description, the inputs it asks for (groups, period, day, login), whether it reads day-end data, the configuration parameters it reads with their defaults (params) and again typed (param_specs: key, type — string, int, bool, time or float — and value, its default) so a client can render the right kind of input for each; a parameter with no entry in param_specs is a plain string. info is static metadata about the reporting module system: copyright, author, version, api_version, output_formats (html, csv), required_data and sections (a report job's tables are built per job, not fixed per module — see GET /admin/v1/reports/jobs/{id}).

More details

Rights: the staff member needs at least one of: reports, config.reports.

Returns
Promise<ModulesPage>
The answer's data.
Errors
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.modules()
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/reports/modules" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "info": {
      "api_version": "string",
      "author": "string",
      "copyright": "string",
      "output_formats": [
        "string"
      ],
      "required_data": [
        "string"
      ],
      "sections": [
        "string"
      ],
      "version": "string"
    },
    "modules": [
      {
        "daily": true,
        "description": "string",
        "inputs": [
          "string"
        ],
        "name": "Ann Smith",
        "param_specs": [
          {}
        ],
        "params": {},
        "title": "string"
      }
    ]
  },
  "request_id": "5b7f2c1e"
}
ts
staff.reports.modules(options?: RequestOptions): Promise<report.ModulesPage>

listSchedules ​

GET/admin/v1/reports/schedules

List report schedules

Every report schedule with its subscribers, by id. next_run_at is worked out by the reporting service and is absent until it has done so.

More details

Rights: the staff member needs every one of: config.reports.

Returns
Promise<ReportSchedule[]>
The answer's data.
Errors
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.listSchedules()
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/reports/schedules" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": [
    {
      "config_id": 1,
      "cron": "string",
      "enabled": true,
      "format": "string",
      "groups": "string",
      "id": 1,
      "last_run_at": "2026-09-25T10:15:00Z",
      "name": "Ann Smith",
      "next_run_at": "2026-09-25T10:15:00Z",
      "period": "string",
      "subscribers": [
        1
      ],
      "updated_at": "2026-09-25T10:15:00Z"
    }
  ],
  "request_id": "5b7f2c1e"
}
ts
staff.reports.listSchedules(options?: RequestOptions): Promise<models.ReportSchedule[]>

createSchedules ​

POST/admin/v1/reports/schedules

Add a report schedule

Runs a configuration on a schedule and e-mails each subscriber the report built within their own group scope. Required: config_id (an existing configuration) and cron (five fields: minute hour day month weekday, server clock). Defaults: period previous_day (today, previous_day, previous_week, previous_month or month_to_date), groups * (1-1024 characters), format html (html or csv), enabled true, no subscribers. name at most 128 characters. Subscribers (at most 500) must be staff members in the caller's group scope. id, next_run_at and last_run_at are ignored. Writes a journal line.

More details

Rights: the staff member needs every one of: config.reports.

Request body
config_idinteger
cronstring
enabledboolean
formatstring
html or csv
groupsstring
idinteger
last_run_atstring
UTC time, RFC 3339.
namestring
next_run_atstring
UTC time, RFC 3339.
periodstring
subscribersinteger[]
updated_atstring
UTC time, RFC 3339.
Returns
Promise<ReportSchedule>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.createSchedules({
  config_id: 4,
  cron: "0 7 * * 1-5",
  enabled: true,
  format: "html",
  groups: "real\\*",
  name: "Morning deposits",
  period: "previous_day",
  subscribers: [
    1001,
    1002
  ]
})
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/reports/schedules" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "config_id": 4,
  "cron": "0 7 * * 1-5",
  "enabled": true,
  "format": "html",
  "groups": "real\\*",
  "name": "Morning deposits",
  "period": "previous_day",
  "subscribers": [
    1001,
    1002
  ]
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "config_id": 1,
    "cron": "string",
    "enabled": true,
    "format": "string",
    "groups": "string",
    "id": 1,
    "last_run_at": "2026-09-25T10:15:00Z",
    "name": "Ann Smith",
    "next_run_at": "2026-09-25T10:15:00Z",
    "period": "string",
    "subscribers": [
      1
    ],
    "updated_at": "2026-09-25T10:15:00Z"
  },
  "request_id": "5b7f2c1e"
}
ts
staff.reports.createSchedules(body: models.ReportSchedule, options?: RequestOptions): Promise<models.ReportSchedule>

updateSchedules ​

PATCH/admin/v1/reports/schedules/{id}

Change a report schedule

Changes only the fields sent; the others keep their stored values. There is no version check. The same rules as adding apply; the next run is worked out again. Writes a journal line.

More details

Rights: the staff member needs every one of: config.reports.

Parameters
idinteger · pathrequired
Numeric id.
Request body
config_idinteger
cronstring
enabledboolean
formatstring
html or csv
groupsstring
idinteger
last_run_atstring
UTC time, RFC 3339.
namestring
next_run_atstring
UTC time, RFC 3339.
periodstring
subscribersinteger[]
updated_atstring
UTC time, RFC 3339.
Returns
Promise<ReportSchedule>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.updateSchedules(1, {
  config_id: 4,
  cron: "30 6 * * *",
  enabled: true,
  format: "csv",
  groups: "real\\*",
  name: "Morning deposits",
  period: "previous_day",
  subscribers: [
    1001
  ]
})
bash
curl -X PATCH "$NOVIQA_API_URL/admin/v1/reports/schedules/1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "config_id": 4,
  "cron": "30 6 * * *",
  "enabled": true,
  "format": "csv",
  "groups": "real\\*",
  "name": "Morning deposits",
  "period": "previous_day",
  "subscribers": [
    1001
  ]
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "config_id": 1,
    "cron": "string",
    "enabled": true,
    "format": "string",
    "groups": "string",
    "id": 1,
    "last_run_at": "2026-09-25T10:15:00Z",
    "name": "Ann Smith",
    "next_run_at": "2026-09-25T10:15:00Z",
    "period": "string",
    "subscribers": [
      1
    ],
    "updated_at": "2026-09-25T10:15:00Z"
  },
  "request_id": "5b7f2c1e"
}
ts
staff.reports.updateSchedules(id: number, body: models.ReportSchedule, options?: RequestOptions): Promise<models.ReportSchedule>

deleteSchedules ​

DELETE/admin/v1/reports/schedules/{id}

Delete a report schedule

Removes the schedule and its subscriptions. Writes a journal line.

More details

Rights: the staff member needs every one of: config.reports.

Parameters
idinteger · pathrequired
Numeric id.
Returns
Promise<null>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.deleteSchedules(1)
bash
curl -X DELETE "$NOVIQA_API_URL/admin/v1/reports/schedules/1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": null,
  "request_id": "5b7f2c1e"
}
ts
staff.reports.deleteSchedules(id: number, options?: RequestOptions): Promise<null>

servers ​

GET/admin/v1/reports/servers

List trade servers

The trade server name (a white label's server_name) of every enabled licence company that has one set, by name. A report's server parameter (GET /admin/v1/reports/modules param_specs, or the server field of POST …/run) narrows a report to one; today's deployments run one server, so this is usually a list of one.

More details

Rights: the staff member needs at least one of: reports, config.reports.

Returns
Promise<string[]>
The answer's data.
Errors
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.servers()
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/reports/servers" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": [
    "string"
  ],
  "request_id": "5b7f2c1e"
}
ts
staff.reports.servers(options?: RequestOptions): Promise<string[]>

listSubscriptions ​

GET/admin/v1/reports/subscriptions

List report schedules the caller may receive

The enabled schedules of reports the caller may run, with the report's name and whether the caller is subscribed. subscribers is always null here: other recipients are not shown.

More details

Rights: the staff member needs at least one of: reports, config.reports.

Returns
Promise<Subscription[]>
The answer's data.
Errors
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.listSubscriptions()
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/reports/subscriptions" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": [
    {
      "config_id": 1,
      "cron": "string",
      "enabled": true,
      "format": "string",
      "groups": "string",
      "id": 1,
      "last_run_at": "2026-09-25T10:15:00Z",
      "name": "Ann Smith",
      "next_run_at": "2026-09-25T10:15:00Z",
      "period": "string",
      "report": "string",
      "subscribed": true
    }
  ],
  "request_id": "5b7f2c1e"
}
ts
staff.reports.listSubscriptions(options?: RequestOptions): Promise<report.Subscription[]>

createSubscriptions ​

POST/admin/v1/reports/subscriptions/{id}

Subscribe to a report schedule

Adds the caller as a recipient of the schedule: each run e-mails them the report built within their own group scope. Only a schedule listed by GET /admin/v1/reports/subscriptions; subscribing twice is harmless.

More details

Rights: the staff member needs at least one of: reports, config.reports.

Parameters
idinteger · pathrequired
Numeric id.
Returns
Promise<null>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.createSubscriptions(1)
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/reports/subscriptions/1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": null,
  "request_id": "5b7f2c1e"
}
ts
staff.reports.createSubscriptions(id: number, options?: RequestOptions): Promise<null>

deleteSubscriptions ​

DELETE/admin/v1/reports/subscriptions/{id}

Unsubscribe from a report schedule

Removes the caller from the schedule's recipients. Only a schedule listed by GET /admin/v1/reports/subscriptions; unsubscribing when not subscribed is harmless.

More details

Rights: the staff member needs at least one of: reports, config.reports.

Parameters
idinteger · pathrequired
Numeric id.
Returns
Promise<null>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.deleteSubscriptions(1)
bash
curl -X DELETE "$NOVIQA_API_URL/admin/v1/reports/subscriptions/1" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": null,
  "request_id": "5b7f2c1e"
}
ts
staff.reports.deleteSubscriptions(id: number, options?: RequestOptions): Promise<null>

whiteLabels ​

GET/admin/v1/reports/white-labels

Trade volume per white label

Trade deals, lots and traded amount per licence company and symbol over a period, for accounts whose group is in the caller's group scope (staff groups left out). from and to are required dates (2006-01-02), both inclusive. Amounts are in the symbol's base currency and also converted into currency (default USD, case-insensitive, at most 16 characters) at current forex mid prices, not at the deals' own; a row with no price to convert with has null amount_rate/amount_converted and counts in its company total's unconverted. company (at most 128 characters) keeps one company.

More details

Rights: the staff member needs every one of: reports.

Parameters
companystring · query
currencystring · query
fromstring · query
2006-01-02, inclusive
tostring · query
2006-01-02, inclusive
Returns
Promise<WhiteLabelReport>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.whiteLabels({
  company: "string",
  currency: "string",
  from: "string"
})
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/reports/white-labels?company=string&currency=string&from=string" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "currency": "USD",
    "from": "2026-09-25T10:15:00Z",
    "rows": [
      {
        "amount": "1.08452",
        "amount_converted": "1.08452",
        "amount_rate": "1.08452",
        "company": "HS Markets Ltd",
        "currency": "USD",
        "deals": 1,
        "lots": "1.08452",
        "symbol": "EURUSD"
      }
    ],
    "to": "2026-09-25T10:15:00Z",
    "totals": [
      {
        "amount_converted": "1.08452",
        "company": "HS Markets Ltd",
        "deals": 1,
        "lots": "1.08452",
        "unconverted": 1
      }
    ]
  },
  "request_id": "5b7f2c1e"
}
ts
staff.reports.whiteLabels(query?: { company?, currency?, from?, to? }, options?: RequestOptions): Promise<report.WhiteLabelReport>

run ​

POST/admin/v1/reports/{id}/run

Run a report

Queues a job for a report the caller may run (see GET /admin/v1/reports) and answers it in state queued; the reporting service builds it. Send only the inputs the module asks for: groups (group masks, ! exclusions and logins, comma separated, at most 1024 characters; empty = the configuration's groups parameter, else the module default, else *), from/to for a period (dates, inclusive, at most 366 days, not before oldest_from), from alone for a one-day module, login for a one-account module. The groups read are always cut down to the caller's group scope; every login named must be an account in scope. company keeps the groups to one company unless the configuration fixes one; server (GET /admin/v1/reports/servers) keeps it to one trade server unless the configuration fixes one, and must be a configured server name (invalid_input otherwise). A person may have at most 5 jobs queued or running at once (conflict beyond). Job progress also arrives on the live socket as report_job frames (id, state, rows, attempts, error) sent to the owner's staff sockets only; poll this route as a fallback.

More details

Rights: the staff member needs at least one of: reports, config.reports.

Parameters
idinteger · pathrequired
Numeric id.
Request body
companystring
Company narrows the groups to one company's; a configuration's "company" parameter wins.
fromstring
trading days, 2006-01-02
groupsstring
logininteger
one-account modules Login is the numeric identity of every account, trader or staff.
serverstring
Server names the trade server (GET /admin/v1/reports/servers) to run against; a configuration's "server" parameter wins. Left empty, every server is read.
tostring
Returns
Promise<ReportJob>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
409conflict: already exists
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.reports.run(1, {
  from: "2026-09-01",
  groups: "real\\*,!real\\vip*",
  to: "2026-09-24"
})
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/reports/1/run" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "from": "2026-09-01",
  "groups": "real\\*,!real\\vip*",
  "to": "2026-09-24"
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {
    "attempts": 1,
    "config_id": 1,
    "created_at": "2026-09-25T10:15:00Z",
    "error": "string",
    "finished_at": "2026-09-25T10:15:00Z",
    "format": "string",
    "id": 1,
    "module": "string",
    "name": "Ann Smith",
    "params": {
      "config": {},
      "from": "string",
      "groups": "string",
      "in_reach": [
        "string"
      ],
      "login": 1001,
      "logins": [
        1
      ],
      "server": "string",
      "to": "string"
    },
    "requested_by": 1,
    "rows": 1
  },
  "request_id": "5b7f2c1e"
}
ts
staff.reports.run(id: number, body: report.RunRequest, options?: RequestOptions): Promise<models.ReportJob>