Datafold CI API
The CI API from Datafold — 3 operation(s) for ci.
The CI API from Datafold — 3 operation(s) for ci.
openapi: 3.1.0
info:
contact:
email: support@datafold.com
name: API Support
description: "The Datafold API reference is a guide to our available endpoints and authentication methods.\nIf you're just getting started with Datafold, we recommend first checking out our [documentation](https://docs.datafold.com).\n\n:::info\n To use the Datafold API, you should first create a Datafold API Key,\n which should be stored as a local environment variable named DATAFOLD_API_KEY.\n This can be set in your Datafold Cloud's Settings under the Account page.\n:::"
title: Datafold Audit Logs CI API
version: latest
servers:
- description: Default server
url: https://app.datafold.com
security:
- ApiKeyAuth: []
tags:
- name: CI
paths:
/api/v1/ci/{ci_config_id}/runs:
get:
operationId: get_ci_api_v1_ci__ci_config_id__runs_get
parameters:
- in: path
name: ci_config_id
required: true
schema:
title: CI config id
type: integer
- in: query
name: pr_sha
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Pr Sha
- in: query
name: pr_num
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Pr Num
- in: query
name: limit
required: false
schema:
default: 100
title: Limit
type: integer
- in: query
name: offset
required: false
schema:
default: 0
title: Offset
type: integer
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/ApiCiRun'
title: Response Get Ci Api V1 Ci Ci Config Id Runs Get
type: array
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: List CI runs
tags:
- CI
/api/v1/ci/{ci_config_id}/trigger:
post:
operationId: trigger_ci_api_v1_ci__ci_config_id__trigger_post
parameters:
- in: path
name: ci_config_id
required: true
schema:
title: CI config id
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/APIPrDetails'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SubmitCiJob'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Trigger a PR/MR run
tags:
- CI
/api/v1/ci/{ci_config_id}/{pr_num}:
post:
operationId: upload_changes_api_v1_ci__ci_config_id___pr_num__post
parameters:
- in: path
name: ci_config_id
required: true
schema:
title: CI config id
type: integer
- in: path
name: pr_num
required: true
schema:
title: Pull request/Merge request number
type: integer
requestBody:
content:
application/json:
schema:
items:
$ref: '#/components/schemas/CiDiff'
title: Diffs
type: array
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SubmitCiJob'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Upload PR/MR changes
tags:
- CI
components:
schemas:
ApiCiRun:
properties:
base_branch:
title: Base Branch
type: string
base_sha:
title: Base Sha
type: string
id:
title: Id
type: integer
pr_branch:
title: Pr Branch
type: string
pr_num:
title: Pr Num
type: string
pr_sha:
title: Pr Sha
type: string
source:
title: Source
type: string
status:
title: Status
type: string
required:
- id
- base_branch
- base_sha
- pr_branch
- pr_sha
- pr_num
- status
- source
title: ApiCiRun
type: object
SubmitCiJob:
properties:
ci_run_id:
anyOf:
- type: integer
- type: 'null'
title: Ci Run Id
run_id:
anyOf:
- type: integer
- type: 'null'
title: Run Id
title: SubmitCiJob
type: object
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
title: Location
type: array
msg:
title: Message
type: string
type:
title: Error Type
type: string
required:
- loc
- msg
- type
title: ValidationError
type: object
APIPrDetails:
properties:
base_branch:
title: Base Branch
type: string
base_sha:
title: Base Sha
type: string
pr_branch:
title: Pr Branch
type: string
pr_number:
title: Pr Number
type: integer
pr_sha:
title: Pr Sha
type: string
required:
- pr_number
- pr_branch
- base_branch
- pr_sha
- base_sha
title: APIPrDetails
type: object
CiDiff:
properties:
exclude_columns:
default: []
items:
type: string
title: Exclude Columns
type: array
include_columns:
default: []
items:
type: string
title: Include Columns
type: array
pk:
anyOf:
- items:
type: string
type: array
uniqueItems: true
- type: 'null'
title: Pk
pr:
title: Pr
type: string
prod:
title: Prod
type: string
required:
- prod
- pr
title: CiDiff
type: object
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
title: Detail
type: array
title: HTTPValidationError
type: object
securitySchemes:
ApiKeyAuth:
description: Use the 'Authorization' header with the format 'Key <api-key>'
in: header
name: Authorization
type: apiKey