# Validate Projects (with Validation API)
> Learn how to leverage Holistics Validation API to set up Project Validation in CI/CD Workflow
## 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](/docs/continuous-integration/auto-publish) 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](/api) to set up the API correctly.
:::info Note
- For a simple and straightforward integration with your Git workflow, use the [GitHub Action](#using-github-action).
- For more customization and programmatic control over your validation flow, use the [Validation and Job API](#using-validation-api).
:::
### Using GitHub Action
In addition to the Validation API, we offer a [GitHub Action](https://github.com/holistics/validate-project) 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:
```yaml
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](/api/v2/reference/jobs) until finished.

### Validation API
Start the Validation Flow by submitting this API
:::info
POST `/api/v2/aml_studio/projects/submit_validate`
Request Body
- `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.
```json
{
"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//result`
:::
- If the validation process hasn’t been finished, it returns the status
```json
{
"status": "running"
}
```
- If the validation process is complete, it returns the validation result
## Validation Result
### Success
```json
{
"status": "success"
}
```
### Error
```json
{
"status": "error",
"result": {
"type": "Validation",
"data": {
"status": "error",
"errors": //List of Errors
}
}
}
```