671 B
671 B
Validate the .gitlab-ci.yaml
Check whether your .gitlab-ci.yml file is valid.
POST ci/lint
Attribute | Type | Required | Description |
---|---|---|---|
content |
hash | yes | the .gitlab-ci.yaml content |
curl --request POST "https://gitlab.example.com/api/v3/ci/lint?content=YAML+Content"
Example response:
- valid content
{
"status": "valid",
"errors": []
}
- invalid content
{
"status": "invalid",
"errors": [
"variables config should be a hash of key value pairs"
]
}
- without the content attribute
{
"error": "content is missing"
}