Validate a CI/CD configuration
POST
/api/v4/projects/{id}/ci/lint
Validates a provided CI/CD configuration in the context of a specified project.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Request Body required
Section titled “ Request Body required ” Media type application/json
object
content
required
Content of .gitlab-ci.yml
string
dry_run
Run pipeline creation simulation, or only do static check. This is false by default
boolean
include_jobs
If the list of jobs that would exist in a static check or pipeline simulation should be included in the response. This is false by default
boolean
ref
When dry_run is true, sets the branch or tag to use. Defaults to the project’s default branch when not set
string
Example generated
{ "content": "example", "dry_run": true, "include_jobs": true, "ref": "example"}Responses
Section titled “ Responses ”OK
Media type application/json
object
valid
boolean
errors
Array<string>
warnings
Array<string>
merged_yaml
string
includes
Array<object>
object
type
string
location
string
blob
string
raw
string
extra
object
context_project
string
context_sha
string
jobs
Array<object>
object
Example
{ "errors": [ "variables config should be a hash of key value pairs" ], "warnings": [ "jobs:job may allow multiple pipelines ..." ], "merged_yaml": "---\\n:another_test:\\n :stage: test\\n\n :script: echo 2\\n:test:\\n :stage: test\\n :script: echo 1\\n", "includes": [ { "blob": "https://gitlab.com/root/example-project/-/blob/..." } ], "jobs": [ { "name": "test", "script": [ "ls" ] } ]}Bad Request
Not Found