Galileo Technologies stage API
The stage API from Galileo Technologies — 2 operation(s) for stage.
The stage API from Galileo Technologies — 2 operation(s) for stage.
openapi: 3.1.0
info:
title: Galileo API Server annotation stage API
version: 1.1085.0
servers:
- url: https://api.galileo.ai
description: Galileo API Server - galileo-v2
tags:
- name: stage
paths:
/projects/{project_id}/stages:
post:
tags:
- stage
summary: Create Stage
operationId: create_stage_projects__project_id__stages_post
security:
- ClassicAPIKeyHeader: []
- APIKeyHeader: []
- OAuth2PasswordBearer: []
- HTTPBasic: []
parameters:
- name: project_id
in: path
required: true
schema:
type: string
format: uuid4
title: Project Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/StageWithRulesets'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/StageDB'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
get:
tags:
- stage
summary: Get Stage
operationId: get_stage_projects__project_id__stages_get
security:
- ClassicAPIKeyHeader: []
- APIKeyHeader: []
- OAuth2PasswordBearer: []
- HTTPBasic: []
parameters:
- name: project_id
in: path
required: true
schema:
type: string
format: uuid4
title: Project Id
- name: stage_name
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Stage Name
- name: stage_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid4
- type: 'null'
title: Stage Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/StageDB'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/projects/{project_id}/stages/{stage_id}:
post:
tags:
- stage
summary: Update Stage
operationId: update_stage_projects__project_id__stages__stage_id__post
security:
- ClassicAPIKeyHeader: []
- APIKeyHeader: []
- OAuth2PasswordBearer: []
- HTTPBasic: []
parameters:
- name: project_id
in: path
required: true
schema:
type: string
format: uuid4
title: Project Id
- name: stage_id
in: path
required: true
schema:
type: string
format: uuid4
title: Stage Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RulesetsMixin'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/StageDB'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
put:
tags:
- stage
summary: Pause Stage
operationId: pause_stage_projects__project_id__stages__stage_id__put
security:
- ClassicAPIKeyHeader: []
- APIKeyHeader: []
- OAuth2PasswordBearer: []
- HTTPBasic: []
parameters:
- name: stage_id
in: path
required: true
schema:
type: string
format: uuid4
title: Stage Id
- name: project_id
in: path
required: true
schema:
type: string
format: uuid4
title: Project Id
- name: pause
in: query
required: false
schema:
type: boolean
default: false
title: Pause
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/StageDB'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
SubscriptionConfig:
properties:
statuses:
items:
$ref: '#/components/schemas/ExecutionStatus'
type: array
title: Statuses
description: List of statuses that will cause a notification to be sent to the configured URL.
default:
- triggered
url:
type: string
minLength: 1
format: uri
title: Url
description: URL to send the event to. This can be a webhook URL, a message queue URL, an event bus or a custom endpoint that can receive an HTTP POST request.
type: object
required:
- url
title: SubscriptionConfig
ExecutionStatus:
type: string
enum:
- triggered
- failed
- error
- timeout
- paused
- not_triggered
- skipped
title: ExecutionStatus
description: Status of the execution.
OverrideAction:
properties:
type:
type: string
const: OVERRIDE
title: Type
default: OVERRIDE
subscriptions:
items:
$ref: '#/components/schemas/SubscriptionConfig'
type: array
title: Subscriptions
description: List of subscriptions to send a notification to when this action is applied and the ruleset status matches any of the configured statuses.
choices:
items:
type: string
type: array
minItems: 1
title: Choices
description: List of choices to override the response with. If there are multiple choices, one will be chosen at random when applying this action.
type: object
required:
- choices
title: OverrideAction
RuleOperator:
type: string
enum:
- gt
- lt
- gte
- lte
- eq
- neq
- contains
- all
- any
- empty
- not_empty
title: RuleOperator
PassthroughAction:
properties:
type:
type: string
const: PASSTHROUGH
title: Type
default: PASSTHROUGH
subscriptions:
items:
$ref: '#/components/schemas/SubscriptionConfig'
type: array
title: Subscriptions
description: List of subscriptions to send a notification to when this action is applied and the ruleset status matches any of the configured statuses.
type: object
title: PassthroughAction
StageType:
type: string
enum:
- local
- central
title: StageType
Rule:
properties:
metric:
type: string
title: Metric
description: Name of the metric.
operator:
$ref: '#/components/schemas/RuleOperator'
description: Operator to use for comparison.
target_value:
anyOf:
- type: string
- type: number
- type: integer
- items: {}
type: array
- type: 'null'
title: Target Value
description: Value to compare with for this metric (right hand side).
type: object
required:
- metric
- operator
- target_value
title: Rule
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
RulesetsMixin:
properties:
prioritized_rulesets:
items:
$ref: '#/components/schemas/Ruleset'
type: array
title: Prioritized Rulesets
description: Rulesets to be applied to the payload.
type: object
title: RulesetsMixin
Ruleset:
properties:
rules:
items:
$ref: '#/components/schemas/Rule'
type: array
minItems: 1
title: Rules
description: List of rules to evaluate. Atleast 1 rule is required.
action:
oneOf:
- $ref: '#/components/schemas/OverrideAction'
- $ref: '#/components/schemas/PassthroughAction'
title: Action
description: Action to take if all the rules are met.
discriminator:
propertyName: type
mapping:
OVERRIDE: '#/components/schemas/OverrideAction'
PASSTHROUGH: '#/components/schemas/PassthroughAction'
description:
anyOf:
- type: string
- type: 'null'
title: Description
description: Description of the ruleset.
type: object
title: Ruleset
StageWithRulesets:
properties:
prioritized_rulesets:
items:
$ref: '#/components/schemas/Ruleset'
type: array
title: Prioritized Rulesets
description: Rulesets to be applied to the payload.
name:
type: string
title: Name
description: Name of the stage. Must be unique within the project.
project_id:
type: string
format: uuid4
title: Project Id
description: ID of the project to which this stage belongs.
description:
anyOf:
- type: string
- type: 'null'
title: Description
description: Optional human-readable description of the goals of this guardrail.
type:
$ref: '#/components/schemas/StageType'
description: Type of the stage.
default: local
paused:
type: boolean
title: Paused
description: Whether the action is enabled. If False, the action will not be applied.
default: false
type: object
required:
- name
- project_id
title: StageWithRulesets
StageDB:
properties:
name:
type: string
title: Name
description: Name of the stage. Must be unique within the project.
project_id:
type: string
format: uuid4
title: Project Id
description: ID of the project to which this stage belongs.
description:
anyOf:
- type: string
- type: 'null'
title: Description
description: Optional human-readable description of the goals of this guardrail.
type:
$ref: '#/components/schemas/StageType'
description: Type of the stage.
default: local
paused:
type: boolean
title: Paused
description: Whether the action is enabled. If False, the action will not be applied.
default: false
created_by:
type: string
format: uuid4
title: Created By
id:
type: string
format: uuid4
title: Id
version:
anyOf:
- type: integer
- type: 'null'
title: Version
type: object
required:
- name
- project_id
- created_by
- id
title: StageDB
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
securitySchemes:
ClassicAPIKeyHeader:
type: apiKey
in: header
name: Galileo-API-Key
APIKeyHeader:
type: apiKey
in: header
name: Splunk-AO-API-Key
OAuth2PasswordBearer:
type: oauth2
flows:
password:
scopes: {}
tokenUrl: https://api.galileo.ai/login
HTTPBasic:
type: http
scheme: basic