Skip to main content
POST
/
githubs
Python
import os
from qaip import Qaip

client = Qaip(
    api_key=os.environ.get("QAIP_API_KEY"),  # This is the default and can be omitted
)
github = client.githubs.create(
    name="name",
    repository="repository",
)
print(github.id)
{
  "id": "<string>",
  "ingestion_setting_id": "<string>",
  "name": "<string>",
  "repository": "<string>",
  "reference_type": "default",
  "status": "unknown",
  "path_filters": [
    "<string>"
  ],
  "reference_param": "<string>",
  "creation_time": 123,
  "start_time": 123,
  "end_time": 123,
  "error": {
    "title": "<string>",
    "message": "<string>"
  },
  "metadata": {
    "records": [
      {
        "key": "<string>",
        "val": "<string>",
        "type": "string"
      }
    ]
  }
}

Authorizations

x-api-key
string
header
required

API key for authentication

Body

application/json
name
string
required

Name of the GitHub data source

Maximum string length: 200
repository
string
required

GitHub repository in owner/repo format (e.g. "octocat/Hello-World")

Maximum string length: 2000
path_filters
string[]

Path filters patterns. The total number of characters across all elements in the array must be 2000 or fewer.

Maximum array length: 2000
github_token
string

One-time GitHub personal access token (mutually exclusive with secret_id)

secret_id
string

ID of a stored secret to use (mutually exclusive with github_token)

reference_type
enum<string>
default:default

Git reference type

Available options:
default,
branch,
tag,
commit
reference_param
string

Reference parameter (branch name, tag name, or commit hash)

rrule
string

Recurrence rule (RFC 5545 RRULE). Requires secret_id (not one-time token).

metadata
object

(reserved for future use) Additional metadata for the GitHub data source

Response

Successfully created GitHub data source

id
string
required

GitHub data source ID

ingestion_setting_id
string
required

GitHub ingestion setting ID

name
string
required

Name of the GitHub ingestion setting

repository
string
required

GitHub repository in owner/repo format (e.g. "octocat/Hello-World")

reference_type
enum<string>
required

Git reference type

Available options:
default,
branch,
tag,
commit
status
enum<string>
required

Job status

Available options:
unknown,
queued,
not_started,
managed,
starting,
started,
success,
failure,
canceling,
canceled,
deleting,
delete_job_failure
path_filters
string[]

Path filter patterns

reference_param
string

Reference parameter (branch name, tag name, or commit hash)

creation_time
integer<int64>

Creation time (Unix timestamp in seconds)

start_time
integer<int64>

Job start time (Unix timestamp in seconds)

end_time
integer<int64>

Job end time (Unix timestamp in seconds)

error
object
metadata
object

(reserved for future use) Additional metadata for the GitHub data source