Skip to main content

Validate Projects (with Validation API)

Coming Soon

This feature is under development and will be coming soon!

Introduction

The Validation API allows you to validate your projects outside of Holistics, enabling smooth integration with CI/CD workflows. This feature is particularly useful in scenarios such as:

  • Validating updates before merging a pull request into the master branch by incorporating the Validation API within the CI/CD pipeline.
  • Validating changes immediately after updates are pushed to the master branch.
  • Running validations prior to using the Publish API to ensure a successful publish.

Setting up

Prerequisite - Set up the Holistics API

To use our Validate API or GitHub Action, you need to set up the Holistics API first. See Holistics API to set up the API correctly.

Note
  • For a simple and straightforward integration with your Git workflow, use the GitHub Action.
  • For more customization and programmatic control over your validation flow, use the Validation and Job API.

Using GitHub Action

In addition to the Validation API, we offer a GitHub Action that simplifies the integration of the validating process into your workflow.

The setup is quite simple, use the @holistics/validate-project action in your GitHub Action config.

Here is an example:

name: Validate Project

on:
push:
branches:
- '**'

jobs:
validate-project:
runs-on: ubuntu-latest

env:
HOLISTICS_API_KEY: ${{ secrets.HOLISTICS_API_KEY }}
HOLISTICS_HOST: "https://secure.holistics.io"
# https://eu.holistics.io
# https://us.holistics.io

steps:
- name: Validate Project
uses: holistics/validate-project

Using Validation API

To submit and retrieve the result of the Validation API

  1. Submit the Validation API and receive a Job.
  2. Poll the Job result using Job API until finished.

Validation API

Start the Validation Flow by submitting this API

info

POST <holistics domain>/api/v2/aml_studio/projects/submit_validate

Params

  • commit_oid: commit to run the validation
  • branch_name: branch name to run the validation

This API triggers the validation process in Holistics at the specified commit and branch name - both are required - and returns a Job.

{
"job_id": number,
"status": "string"
}

Retrieve Validation Results

The validation results can be retrieved via Job API. Keep polling until you receive the result.

info

GET jobs/<job_id>/result

  • If the validation process hasn’t been finished, it returns the status
    {
    "status": "running"
    }

  • If the validation process is complete, it returns the validation result

Validation Result

Success

{
"status": "success"
}

Error

{
"status": "error",
"result": {
"type": "Validation",
"data": {
"status": "error",
"errors": //List of Errors
}
}
}

Let us know what you think about this document :)