TriggerAPI:s

Updated:2022-11-18

MAIA triggers are external services that is starting background jobs in the web app by making periodic calls to the below API:s.

The Trigger API contains api calls that starts various background jobs in the MAIA web app.

  1. Update CVE status API. Updates the CVE status of external artifacts.
  2. Update health status API. Updates the health status of external artifacts.
  3. Update issue status API. Requests information about issues from the adapter, updating slogans and tracker status.
  4. Remove old activities API. Removes data for obsolete activities.
  5. Remove old artifacts API. Removes data for obsolete artifacts.
  6. Remove old tests API. Removes data for obsolete test executions.
  7. Remove unreferenced data API. Removes data that doesn't have any references.

Update CVE status

Updated:2022-11-01

Updates CVE status for external artifacts registered in the MAIA web app. The web app communicates with the central MAIA CVE Management Service, requesting up-to-date CVE information.

The API call starts a background job in the MAIA web app. The jobs stop when all artifacts within the scope are reviewed.

URL :
/maia/api/public/v4/cves/sync?force=<true/false> --fail -X POST --header 'Content-Type:application/json' --header Api-Token:<token-string>"
Parameters :
Method :

POST

Auth required :

YES with a user token.

Permissions required :

User permissions required for this API call: Access all records and Read CVEs.

Example :
curl -k https://maia.example.com:7777/maia/api/public/v4/cves/sync?force=true --fail -X POST --header 'Content-Type:application/json' --header "Api-Token: Xk8FjBjQcRWdqh4kICvMEL...."

CVE information will be presented on the artifact show page.

Success Response

TBD


Update health status

Updated:2022-11-01

Updates health status for external artifacts registered in the MAIA web app. The web app communicates with the central MAIA Software Health Service, requesting up-to-date information.

The API call starts a background job in the MAIA web app. The jobs stop when all artifacts within the scope are reviewed.

URL :
/maia/api/public/v4/artifacts/check_updates --fail -X POST --header 'Content-Type:application/json' --header Api-Token:<token-string>"
Parameters :
Method :

POST

Auth required :

YES with a user token.

Permissions required :

User permissions required for this API call: Access all records, Update external software and Create/update licenses.

Example :
curl -k https://maia.example.com:7777/maia/api/public/v4/artifacts/check_updates --fail -X POST --header 'Content-Type:application/json' --header "Api-Token: Xk8FjBjQcRWdqh4kICvMEL...."

Updated information will be presented on various pages e.g. the artifacts index page.

Success Response

TBD


Update issue status

Updated:2022-11-01

Synchronize issue status information between MAIA and corresponding Issue Tracker Systems.

The API call starts a background job in the MAIA web app. The jobs stop when all issues within the scope are reviewed.

URL :
/maia/api/public/v4/issues/update_all?age=<days> --fail -X POST -H Api-Token:<token-string>"
Parameters :
Method :

POST

Auth required :

YES with a user token.

Permissions required :

User permissions required for this API call: Access all records and Update issues.

Example :
curl -k https://maia.example.com:7777/maia/api/public/v4/issues/update_all?age=20 --fail -X POST -H "Api-Token: Xk8FjBjQcRWdqh4kICvMEL...."
Success Response

TBD


Remove old activities

Updated:2022-11-01

Cleaning the database from old activity information. Cleaning are made within the proper scope regarding teams/users/permissions.

The API call starts a background job in the MAIA web app. The jobs stop when all activities within the scope are reviewed.

URL :
/maia/api/public/v4/activities/clean_old?age=<days> --fail -X POST --header 'Content-Type:application/json' --header Api-Token:<token-string>"
Parameters :
Method :

POST

Auth required :

YES with a user token.

Permissions required :

User permissions required for this API call: Access all records and Clean old activity/build/execution records.

Example :
curl -k https://maia.example.com:7777/maia/api/public/v4/activities/clean_old?age=80 --fail -X POST --header 'Content-Type:application/json' --header "Api-Token: Xk8FjBjQcRWdqh4kICvMEL...."
Success Response

TBD

Remove old artifacts

Updated:2022-11-01

Cleaning the database from old artifact information. Cleaning are made within the proper scope regarding teams/users/permissions.

The API call starts a background job in the MAIA web app. The jobs stop when all artifacts within the scope are reviewed.

URL :
/maia/api/public/v4/artifacts/clean_old?age=<days> --fail -X POST --header 'Content-Type:application/json' --header Api-Token:<token-string>"
Parameters :
Method :

POST

Auth required :

YES with a user token.

Permissions required :

User permissions required for this API call: Access all records and Clean old activity/build/execution records.

Example :
curl -k https://maia.example.com:7777/maia/api/public/v4/artifacts/clean_old?age=80 --fail -X POST --header 'Content-Type:application/json' --header "Api-Token: Xk8FjBjQcRWdqh4kICvMEL...."
Success Response

TBD

Remove old tests

Updated:2022-11-01

Cleaning the database from old test execution data. Cleaning are made within the proper scope regarding teams/users/permissions.

The API call starts a background job in the MAIA web app. The jobs stop when all tests within the scope are reviewed.

URL :
/maia/api/public/v4/executions/clean_old?age=<days> --fail -X POST --header 'Content-Type:application/json' --header Api-Token:<token-string>"
Parameters :
Method :

POST

Auth required :

YES with a user token.

Permissions required :

User permissions required for this API call: Access all records and Clean old activity/build/execution records.

Example :
curl -k https://maia.example.com:7777/maia/api/public/v4/executions/clean_old?age=80 --fail -X POST --header 'Content-Type:application/json' --header "Api-Token: Xk8FjBjQcRWdqh4kICvMEL...."
Success Response

TBD

Remove unreferenced data

Updated:2022-11-01

Cleaning the database from unreferenced data. Cleaning are made within the proper scope regarding teams/users/permissions.

The API call starts a background job in the MAIA web app. The jobs stop when all data within the scope are reviewed.

URL :
/maia/api/public/v4/status/clean_unreferenced --fail -X POST --header 'Content-Type:application/json' --header Api-Token:<token-string>"
Parameters :
Method :

POST

Auth required :

YES with a user token.

Permissions required :

User permissions required for this API call: Access all records and Clean old activity/build/execution records.

Example :
curl -k https://maia.example.com:7777/maia/api/public/v4/status/clean_unreferenced --fail -X POST --header 'Content-Type:application/json' --header "Api-Token: Xk8FjBjQcRWdqh4kICvMEL...."
Success Response

TBD

Results