Skip to main content

View Your Project's Artifacts

important

Projects are assigned artifacts in two ways:

  1. You can manually add an artifact to a project by adding it to the project's .yaml file in oss-directory.
  2. OSO discovers downstream artifacts linked to projects. For instance, if a project owns a GitHub organization, OSO will discover all the GitHub repositories owned by that organization and link them as project artifacts.

Lookup All Artifacts for a Project

You can look up your project's artifacts from pyoso or using our GraphQL API. It's always safer to query on the project_id field rather than the name or display_name fields.

query = """
SELECT
artifact_id,
artifact_name,
artifact_namespace
FROM artifacts_by_project_v1
WHERE project_name = 'opensource-observer'
"""
df = client.to_pandas(query)

Lookup a Specific Artifact

You can lookup a specific artifact by its artifact_name and/or artifact_namespace using either SQL or our API:

query = """
SELECT
artifact_id,
artifact_name,
artifact_namespace
FROM artifacts_by_project_v1
WHERE artifact_name = 'oso' AND artifact_namespace = 'opensource-observer'
"""
df = client.to_pandas(query)

Lookup Artifacts by Data Source

You can lookup artifacts by their data source using either SQL or our API:

query = """
SELECT
artifact_id,
artifact_name,
artifact_namespace
FROM artifacts_by_project_v1
WHERE artifact_source = 'GITHUB'
"""
df = client.to_pandas(query)