Aller au contenu principal

Gates

Choisissez votre langage :

A gate is the pass/fail rule attached to an agent.

client.gates.get(agentId)

Read the gate configuration attached to an agent.

SDKclient.gates.get(agent_id)
RetourneAgentGate | null

Parameters:

EmplacementParamètreTypeRequisDescription
Pathagent_idstringRequisAgent UUID.

client.gates.update(agentId, gate)

Update the gate configuration attached to an agent. This does not create an agent and does not configure a CI provider by itself.

SDKclient.gates.update(agent_id, gate)
RetourneAgentGate

Parameters:

EmplacementParamètreTypeRequisDéfautDescription
Pathagent_idstringRequisAgent UUID.
Bodyoverall_score_minfloatOptionnel0.8Minimum overall score, between 0 and 1.
Bodydimensions_must_passlist[str]OptionnelDimensions that must individually pass.
Bodymax_failed_criteriaintegerOptionnelMaximum number of failed criteria allowed. Minimum 0.
Bodywarning_band_minfloatOptionnelWarning floor between 0 and 1.

The SDK sends the request body as { "gate": gate }. The backend stores that value under agent.config["gate"] and leaves the rest of the agent config intact.

Example:

client.gates.update(agent["id"], {
"overall_score_min": 0.85,
"dimensions_must_pass": ["security", "privacy"],
"max_failed_criteria": 0,
"warning_band_min": 0.75,
})

For pipeline wiring, secrets and provider snippets, use the CI/CD docs.