Skip to content
  • Auto
  • Light
  • Dark
Get Started

Validate Cel

Validate Cel
client.Policies.Validate.ValidateCel(ctx, body) (*MarkersarrayPolicyValidateValidateCelResponse, error)
post/api/v1/policies/validate/cel

Validate policies

Parameters
Hide ParametersShow Parameters
Textfield
optional
param.Field[string]

The text field.

Returns
PolicyValidateValidateCelResponsestruct

The EditorValidateResponse message.

Hide ParametersShow Parameters
Markersarray
optional
[]EndColumnint64EndLineNumberint64MessagestringSeverityC1APIEditorV1EditorMarkerSeverityStartColumnint64StartLineNumberint64C1APIEditorV1EditorMarker

The markers field.

Hide ParametersShow Parameters
EndColumnint64
optional

The endColumn field.

formatint32
EndLineNumberint64
optional

The endLineNumber field.

formatint32
Messagestring
optional

The message field.

SeverityC1APIEditorV1EditorMarkerSeverityUnknownC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityHintC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityInfoC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityWarningC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityErrorC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverity
optional

The severity field.

Hide ParametersShow Parameters
C1APIEditorV1EditorMarkerSeverityUnknownconst
C1APIEditorV1EditorMarkerSeverityUnknownC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityHintC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityInfoC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityWarningC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityErrorC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverity
"UNKNOWN"
C1APIEditorV1EditorMarkerSeverityHintconst
C1APIEditorV1EditorMarkerSeverityUnknownC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityHintC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityInfoC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityWarningC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityErrorC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverity
"HINT"
C1APIEditorV1EditorMarkerSeverityInfoconst
C1APIEditorV1EditorMarkerSeverityUnknownC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityHintC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityInfoC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityWarningC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityErrorC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverity
"INFO"
C1APIEditorV1EditorMarkerSeverityWarningconst
C1APIEditorV1EditorMarkerSeverityUnknownC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityHintC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityInfoC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityWarningC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityErrorC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverity
"WARNING"
C1APIEditorV1EditorMarkerSeverityErrorconst
C1APIEditorV1EditorMarkerSeverityUnknownC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityHintC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityInfoC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityWarningC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverityErrorC1APIEditorV1EditorMarkerSeverityC1APIEditorV1EditorMarkerSeverity
"ERROR"
StartColumnint64
optional

The startColumn field.

formatint32
StartLineNumberint64
optional

The startLineNumber field.

formatint32
Request example Go
package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := conductoronesdk.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Policies.Validate.ValidateCel(context.TODO(), conductoronesdk.PolicyValidateValidateCelParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Markers)
}
200 Example
{
  "markers": [
    {
      "endColumn": 0,
      "endLineNumber": 0,
      "message": "message",
      "severity": "UNKNOWN",
      "startColumn": 0,
      "startLineNumber": 0
    }
  ]
}