SnapGPT standards APIs
Use these APIs to work with the pipeline standards that an Environment admin has published
for SnapGPT, without opening SnapGPT. List and read the standards. Check a pipeline against
them from a script or a continuous integration and continuous delivery (CI/CD) job. The
check returns pass, fail, or error, with
one finding for each rule that the pipeline breaks.
These APIs don't create or change standards. To create or change a standard, refer to Standards in SnapGPT settings.
| List standards | GET https://{controlplane_path}/api/1/rest/public/snapgpt/standards/{env_org} |
| Get a standard | GET https://{controlplane_path}/api/1/rest/public/snapgpt/standards/{env_org}/{name} |
| Check pipeline standards | POST https://{controlplane_path}/api/1/rest/public/snapgpt/check_pipeline_standards/{env_org}/{project_space}/{project}/{pipeline} |
This check is different from Check pipeline quality, which runs only the built-in rules. The standards check applies the rules that your organization wrote, and it also returns the built-in rule warnings. The same check is available to AI agents through the Model Context Protocol (MCP). Refer to the pipeline standards MCP tools.
Prerequisites
These APIs have the following prerequisites:
- You must be a member of the environment (Org) that you specify. Environment names are case-sensitive.
- SnapGPT is enabled for the environment.
- To check a pipeline, you must have access to read it.
- To get findings from a check, an Environment admin has published at least one standard and set How it applies to Always. List standards and Get a standard don't require this. Refer to Standards in SnapGPT settings.
How the check works
These points apply to every check:
- The check uses only Always standards. Optional standards aren't applied. Refer to SnapGPT pipeline standards for the difference.
- The result is
failif the pipeline has at least oneCriticalorWarningfinding. Lower-severity findings, such asInfo, are listed innotesand never fail the check. - Warnings from the built-in rules are returned in
linter. They never change the result. Refer to Check pipeline quality. - If the environment has no Always standards, the result is
passandmessageexplains that no standards were checked. - SnapGPT caches the standards for 120 seconds. A new or changed standard can take up to 2 minutes to apply.
- The API runs with your own login and permissions. You see only the standards of your environment and check only the pipelines that you have access to.
- A check can take several seconds. Set the timeout of your client or CI/CD job accordingly.
Request header and body
The three APIs use the same headers. Authenticate with Basic authentication or a JSON Web Token (JWT), as described in Authentication. If an Environment admin disables Basic authentication, requests that use it return HTTP 403. Use a JWT instead.
Basic authentication
Specify Basic for authorization with your credentials (email and
password for your SnapLogic user or service account).
Authorization: Basic {base64_encoded email:password}
JWT authentication
Specify Bearer for authorization with your JWT.
Authorization: Bearer {token}
To set up and generate a JWT, refer to Authenticate using JSON Web Token (JWT).
Request body
None.
List standards
GET https://{controlplane_path}/api/1/rest/public/snapgpt/standards/{env_org}
Lists the pipeline standards published for an environment, with the enforcement level of each.
Path parameters
| Key | Description |
|---|---|
controlplane_path |
Required. The SnapLogic control plane host:
elastic.snaplogic.com (US) or
emea.snaplogic.com (EU). |
env_org |
Required. The name of the SnapLogic environment/Org. For example,
My-Dev-Env |
Query parameters
None.
Response
{
"response_map": {
"count": 2,
"standards": [
{
"name": "naming-conventions.md",
"required": true,
"size": 152,
"updated": "2026-12-01T16:20:41.500000+00:00"
},
{
"name": "error-handling.md",
"required": false,
"size": 418,
"updated": "2026-11-20T09:05:12.250000+00:00"
}
]
}
}
| Key | Type | Description |
|---|---|---|
count |
integer | The number of standards in the environment. |
standards |
array | One entry for each standard. Each entry contains the fields in the following table. |
Each entry in standards contains the following fields:
| Key | Type | Description |
|---|---|---|
name |
string | The file name of the standard, for example,
naming-conventions.md. |
required |
boolean | true if the standard is set to Always.
false if it is set to Optional. |
size |
integer | The size of the standard's content. |
updated |
string | When the standard was last updated. Format: UTC |
Get a standard
GET https://{controlplane_path}/api/1/rest/public/snapgpt/standards/{env_org}/{name}
Returns one standard, including the Markdown text of its rules.
Path parameters
| Key | Description |
|---|---|
controlplane_path |
Required. The SnapLogic control plane host:
elastic.snaplogic.com (US) or
emea.snaplogic.com (EU). |
env_org |
Required. The name of the SnapLogic environment/Org. For example,
My-Dev-Env |
name |
Required. The name of the standard, for example,
naming-conventions. The .md extension is
optional. |
Query parameters
None.
Response
{
"response_map": {
"name": "naming-conventions.md",
"required": true,
"size": 152,
"updated": "2026-12-01T16:20:41.500000+00:00",
"content": "# Snap label naming\n\nEvery Snap label MUST be UPPER_SNAKE_CASE, for example READ_ORDERS or LOAD_ORDERS.\nNo spaces and no lower-case letters in a label.\n"
}
}
The response contains the same fields as an entry in List standards, plus the following field:
| Key | Type | Description |
|---|---|---|
content |
string | The Markdown text of the standard. |
Check pipeline standards
POST https://{controlplane_path}/api/1/rest/public/snapgpt/check_pipeline_standards/{env_org}/{project_space}/{project}/{pipeline}
Checks a pipeline against the Always standards of an environment and returns pass, fail, or error, with one finding for each broken rule.
Path parameters
| Key | Description |
|---|---|
controlplane_path |
Required. The SnapLogic control plane host:
elastic.snaplogic.com (US) or
emea.snaplogic.com (EU). |
env_org |
Required. The name of the SnapLogic environment/Org. For example,
My-Dev-Env |
project_space |
Required. The name of the Project space that contains the pipeline. |
project |
Required. The name of the Project that contains the pipeline. |
pipeline |
Required. The name of the pipeline to check. |
Query parameters
None.
Response
The result is in the response object of response_map.
Always read result, not only the HTTP status. Some failures inside the
check are returned as "result": "error" with an explanation in
message.
{
"response_map": {
"response": {
"result": "fail",
"pipeline": "...",
"standards_checked": ["..."],
"violations": [ { ... } ],
"notes": [ { ... } ],
"linter": [ { ... } ],
"message": ""
}
}
}
| Key | Type | Description |
|---|---|---|
result |
string | The outcome of the check:
|
pipeline |
string | The pipeline that was checked. |
standards_checked |
array | The names of the Always standards that the pipeline was checked against. Empty if no standards were checked. |
violations |
array | The Critical and Warning findings. Each
finding contains the fields in Finding
fields. Empty if the result is pass or
error. |
notes |
array | Findings of lower severity, such as Info. Each finding
contains the same fields as a violation. Notes never change the result. |
linter |
array | Warnings from the built-in pipeline quality rules. Each entry contains the fields in Linter fields. Linter warnings never change the result. |
message |
string | Empty if standards were checked. Otherwise, explains why no standards were
checked or why the result is error. |
Finding fields
Each finding in violations and notes contains the
following fields:
| Key | Type | Description |
|---|---|---|
standard |
string | The file name of the standard that the finding comes from. |
standard_ref |
string | The reference of the rule within the standard. |
level |
string | The severity of the finding: Critical,
Warning, or Info. |
pipeline |
string | The pipeline that the finding applies to. |
snap |
string | The label of the Snap that the finding applies to. |
snap_id |
string | The ID of the Snap that the finding applies to. |
reason |
string | Why the pipeline or Snap breaks the rule. |
rule |
string | The text of the rule, quoted from the standard. |
fix |
string | How to fix the finding. |
Linter fields
Each entry in linter contains the following fields:
| Key | Type | Description |
|---|---|---|
level |
string | The severity of the warning. |
scope |
string | Pipeline if the warning applies to the pipeline.
Snap if it applies to a Snap. |
rule |
string | The name of the built-in rule that produced the warning. |
message |
string | The description of the warning. |
Examples
Check a pipeline that breaks a standard
This example uses Basic authentication. For a JWT example, refer to Authentication.
The environment has an Always standard named
naming-conventions.md, which requires Snap labels in
UPPER_SNAKE_CASE.
curl -X 'POST' \
'https://elastic.snaplogic.com/api/1/rest/public/snapgpt/check_pipeline_standards/my-environment/projects/Sales/Load_Orders' \
-H 'Authorization: Basic {base64_encoded email:password}'
Response:
{
"response_map": {
"response": {
"result": "fail",
"pipeline": "/my-environment/projects/Sales/Load_Orders",
"standards_checked": ["naming-conventions.md"],
"violations": [
{
"standard": "naming-conventions.md",
"standard_ref": "NC-1",
"level": "Critical",
"pipeline": "/my-environment/projects/Sales/Load_Orders",
"snap": "Enrich orders",
"snap_id": "a1b2c3d4-0000-4000-8000-000000000001",
"reason": "The Snap label is not in UPPER_SNAKE_CASE.",
"rule": "Every Snap label MUST be UPPER_SNAKE_CASE.",
"fix": "Rename the Snap label to ENRICH_ORDERS."
}
],
"notes": [],
"linter": [
{
"level": "Warning",
"scope": "Pipeline",
"rule": "No Notes",
"message": "Pipeline does not have notes"
}
],
"message": ""
}
}
}
Check a pipeline that follows the standards
The built-in rule warnings are returned, but they don't change the result.
{
"response_map": {
"response": {
"result": "pass",
"pipeline": "/my-environment/projects/Sales/Load_Customers",
"standards_checked": ["naming-conventions.md"],
"violations": [],
"notes": [],
"linter": [
{
"level": "Warning",
"scope": "Pipeline",
"rule": "No Notes",
"message": "Pipeline does not have notes"
}
],
"message": ""
}
}
}
Stop a CI/CD job when the check doesn't pass
The following shell commands stop the job unless the result is pass. They
read result rather than the HTTP status, so an error
result also stops the job.
AUTH=$(printf '%s' 'email:password' | base64)
result=$(curl -s -X POST \
-H "Authorization: Basic $AUTH" \
"https://elastic.snaplogic.com/api/1/rest/public/snapgpt/check_pipeline_standards/my-environment/projects/Sales/Load_Orders" \
| jq -r '.response_map.response.result')
[ "$result" = "pass" ] || { echo "Standards check result: $result"; exit 1; }
List the standards
curl -X 'GET' \
'https://elastic.snaplogic.com/api/1/rest/public/snapgpt/standards/my-environment' \
-H 'Authorization: Basic {base64_encoded email:password}'
The response is the one shown in List standards.
Read one standard
curl -X 'GET' \
'https://elastic.snaplogic.com/api/1/rest/public/snapgpt/standards/my-environment/naming-conventions' \
-H 'Authorization: Basic {base64_encoded email:password}'
The response is the one shown in Get a standard.
Error handling
| HTTP status code | Status | Description | Resolution |
|---|---|---|---|
200 |
successful |
The request completed. For a check, read result, which can be
pass, fail, or error. |
For error, refer to message and Troubleshooting. |
400 |
Bad request |
The pipeline path points to a folder, such as a Project, instead of a pipeline. | Specify the full path of a pipeline. |
401 |
Unauthorized |
The credentials are missing, incorrect, or expired. | Log in again and retry once. Repeated failed logins lock the account. |
403 |
Forbidden |
You aren't a member of the environment, SnapGPT is turned off for it, or Basic authentication is disabled. | Use the exact name of the environment. Confirm with your Environment admin that you're a member and that SnapGPT is enabled. If Basic authentication is disabled, authenticate with a JWT. Refer to Authenticate using JSON Web Token (JWT). |
404 |
Not found |
The pipeline or standard doesn't exist, or you don't have access to it. | Check the path or name, and confirm that you have access. |
Troubleshooting
The check returns pass after a standard was added or changed
SnapGPT caches the standards for 120 seconds, or the standard is set to Optional.
The check uses the cached copy of the standards, and it uses only Always standards.
Wait 2 minutes and run the check again. In Standards, confirm that How it applies is set to Always.
The result is pass and message says "No standards were checked"
The message is one of the following:
No standards were checked: the org has no Always standards.No standards were checked: org standards are switched off in this environment.No standards were checked: the standards check is switched off in this environment.
A pass in this case doesn't mean that the
pipeline follows your standards. Nothing was checked.
For the first message, set at least one standard to Always in Standards. For the other two messages, contact SnapLogic Support to turn the feature on for the environment.
The result is error and the message says the pipeline can't be found or opened
The message is one of the following:
No pipeline at this path.You do not have access to this pipeline.The pipeline could not be read.The pipeline is not in the org this request is for.pipeline_path is required, as /org/space/project/pipeline.
The path is incomplete or incorrect, the pipeline belongs to a different environment than the one in the URL, or you don't have access to it.
Specify the environment, Project space, Project, and pipeline in the URL. Confirm that the pipeline is in that environment and opens in Designer.
The result is error and the message says to try again later
The message is one of the following:
The org's standards could not be read. Try again later.The pipeline could not be analyzed: the platform linter did not answer.The standards check could not run. Try again later.The standards check was cut short. Try again later.
A part of the check didn't finish. This is usually temporary.
Run the check again. If the message persists, contact SnapLogic Support.
The CI/CD job passes even though the pipeline has problems
The job checks only the HTTP status.
A check that completes returns HTTP 200 for both
pass and fail, and some failures inside the check
return HTTP 200 with "result": "error".
Read response_map.response.result and stop the job
unless it is pass. Refer to the CI/CD example in Examples.