Asqatasun v4 - Summary

Asqatasun v4 - SQL procedures

Here is the list of SQL procedures available since Asqatasun 4.0.4+

Note: each SQL procedure has a shell script wrapper, located in /usr/loca/bin/ (hint: names of wrappers begin with "ASQA_"

Last_audit

List last audits.

call last_audits(n);

With:

List_running_acts

List all running acts. May be useful if an audit crashes, you can find its Id_Acts and Id_Audit and delete them manually.

call list_running_acts();

Delete_audit_from_id

Delete an audit based on its id.

call delete_audit_from_id(id);

With:

Contract_create

Create a contract for a given user.

call contract_create(idUser, label, url, referential, audit_page, audit_site, audit_file, audit_scenario, audit_manual, maxDoc, timeSpan, timeSpanUnit);

With:

Mandatory fields

Example of contract: Site-wide audit on Wikipedia for accessibility (RGAA)

We want to create a contract:

call contract_create(1, "Wikipedia RGAA", "https://en.wikipedia.org/", "RGAA3", 0, 1, 0, 0, 0, "1000", NULL, NULL);

Note the NULL value for timeSpan and timeSpanUnit parameters.

Example of contract: Site-wide audit on Wikipedia for SEO

We want to create the same contract but only for SEO. Easy, just change the referential (don't forget, this is the technical codename of the referential that must be passed as argument)

call contract_create(1, "Wikipedia RGAA", "https://en.wikipedia.org/", "SEO", 0, 1, 0, 0, 0, "1000", NULL, NULL);

Example of contract: Site-wide audit + page-audit + manual-audit on Wikipedia for accessibility

Like the previous one, but we add the page-audit feature, and enable the manual-audit option.

call contract_create(1, "Wikipedia RGAA", "https://en.wikipedia.org/", "SEO", 1, 1, 0, 0, 1, "1000", NULL, NULL);

Note: the manual-audit option concerns only page-audit.

Example of contract: page-audit on any webpage over the internet, for accessibility

This time, we do not provide any url parameter. We use to call this kind of contract "openbar".

call contract_create(1, "Openbar RGAA", "", "RGAA3", 1, 0, 0, 0, 0, NULL, NULL, NULL);

Note the NULL value for maxDoc parameter.

Example of contract: page-audit + file-audit + scenario-audit on any webpage over the internet, for accessibility, plus manual-audit

Taking the previous example, we just add features file-audit and scenario-audit, and enable the manual-audit option.

call contract_create(1, "Openbar RGAA", "", "RGAA3", 1, 0, 1, 1, 1, NULL, NULL, NULL);

Examples of contract: 10 years, 2 months or 7 days

Taking the previous example, we just provide the timeSpan and timeSpanUnit parameters.

call contract_create(1, "Openbar RGAA - 10 YEARS", "", "RGAA3", 1, 0, 1, 1, 1, NULL, 10, "YEAR");
call contract_create(1, "Openbar RGAA - 2 MONTHS", "", "RGAA3", 1, 0, 1, 1, 1, NULL,  2, "MONTH");
call contract_create(1, "Openbar RGAA - 7 DAYS",   "", "RGAA3", 1, 0, 1, 1, 1, NULL,  7, "DAY");