Appearance
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/auditJournal 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
filestringthe file name, e.g. Positions.csv
formatstringcsv or html
recordsintegerrows written
whatstringthe list, e.g. positions
Returns
Promise<object>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
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>