Skip to content

staff.exports ​

1 method on staff.exports. Each returns the answer's data and throws NoviqaError on a failed answer.

audit ​

POST/admin/v1/exports/audit

Journal a list export

A terminal saved a list to a file (nothing of the data is sent here): writes the MT5 journal line '<staff login>': export <what>, <N> records to '<file>' (INFO; 1 record for one). what 1-64 characters, records 0 or more, file a file name without a path (at most 128 characters), format csv or html. Answers {"recorded": true}.

More details

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

Request body
filestring
the file name, e.g. Positions.csv
formatstring
csv or html
recordsinteger
rows written
whatstring
the list, e.g. positions
Returns
Promise<object>
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.exports.audit({
  file: "Positions.csv",
  format: "csv",
  records: 12,
  what: "positions"
})
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/exports/audit" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "file": "Positions.csv",
  "format": "csv",
  "records": 12,
  "what": "positions"
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": {},
  "request_id": "5b7f2c1e"
}
ts
staff.exports.audit(body: account.ExportAuditBody, options?: RequestOptions): Promise<object>