---
title: "Test the connection of a stored source"
method: POST
path: "/gitops/sources/{id}/test"
tags: ["gitops"]
---

# Test the connection of a stored source

`POST /gitops/sources/{id}/test`

Tests connectivity for a GitOps source, applying optional overrides to the stored configuration.
**Access policy**: authenticated

## Path parameters

- `id` integer, required

## Request body

- SourcesGitSourceUpdatePayload
  - `authentication` SourcesGitAuthenticationUpdatePayload
    - `password` string
    - `username` string
  - `interval` string
  - `name` string
  - `tlsSkipVerify` boolean
  - `url` string

## Response `200`

Connection test result

- SourcesConnectionTestResult
  - `error` string
  - `success` boolean

## Other responses

- `400` — Invalid request payload
- `403` — Access denied
- `404` — Source not found
- `500` — Server error

---

[API](https://skmtc.net/portainer/apis/portainerce-api.md) · [All operations](https://skmtc.net/portainer/apis/portainerce-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portainer/portainerce-api/versions/c0b0975cd11b/schema)
