Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/GingerlyData247/SOTeam4-P2/llms.txt

Use this file to discover all available pages before exploring further.

Introduction

The Trustworthy Model Registry provides a comprehensive REST API for managing AI/ML artifacts including models, datasets, and code repositories. The API enables you to ingest artifacts, compute trustworthiness metrics, track lineage, and perform license compatibility checks.

Base URL

Production

https://c1r52eygxi.execute-api.us-east-2.amazonaws.com

API Documentation

Interactive API documentation is available at:
https://c1r52eygxi.execute-api.us-east-2.amazonaws.com/docs

API Standards

The API follows RESTful principles and is designed to be:
  • OpenAPI Compliant: Fully documented using OpenAPI 3.0 specification
  • JSON-based: All request and response bodies use JSON format
  • Type-safe: Strict schema validation using Pydantic models
  • HTTP Standards: Proper use of HTTP methods, status codes, and headers

API Structure

All API endpoints are prefixed with /api and organized into the following functional areas:

Artifact Management

Core CRUD operations for models, datasets, and code artifacts:
  • Create: POST /api/artifact/{artifact_type}
  • Retrieve: GET /api/artifacts/{artifact_type}/{id}
  • Update: PUT /api/artifacts/{artifact_type}/{id}
  • Delete: DELETE /api/artifacts/{artifact_type}/{id}
  • List: POST /api/artifacts

Artifact Discovery

Search and query capabilities:
  • By Name: GET /api/artifact/byName/{name}
  • By Regex: POST /api/artifact/byRegEx

Model Analytics

Trustworthiness metrics and analysis:
  • Rate Model: GET /api/artifact/model/{id}/rate
  • Lineage Graph: GET /api/artifact/model/{id}/lineage
  • Cost Analysis: GET /api/artifact/{artifact_type}/{id}/cost
  • License Check: POST /api/artifact/model/{id}/license-check

System Management

  • Health Check: GET /api/health
  • System Reset: DELETE /api/reset
  • Planned Tracks: GET /api/tracks

Supported Artifact Types

The API supports three artifact types:
{
  "type": "model",
  "description": "Machine learning models from Hugging Face"
}

Response Format

Successful Responses

All successful responses return JSON with appropriate HTTP status codes:
  • 200 OK: Successful GET, PUT, DELETE operations
  • 201 Created: Successful POST operations creating new resources
  • 204 No Content: Successful OPTIONS preflight requests

Artifact Structure

{
  "metadata": {
    "name": "bert-base-uncased",
    "id": "12345",
    "type": "model"
  },
  "data": {
    "url": "https://huggingface.co/bert-base-uncased",
    "download_url": "https://s3.amazonaws.com/..."
  }
}

Error Handling

The API uses standard HTTP status codes to indicate errors:
Status CodeMeaningWhen Used
400Bad RequestInvalid input, malformed JSON, type mismatch
404Not FoundArtifact does not exist, no regex matches
413Payload Too LargeURL exceeds maximum length (2048 chars)
424Failed DependencyReviewedness score too low (less than 0.5)
500Internal Server ErrorUnexpected server errors
502Bad GatewayExternal service unavailable (HF, GitHub API)

Error Response Format

{
  "detail": "Artifact does not exist."
}

Pagination

The /api/artifacts endpoint supports pagination:
  • Default page size: 1000 items
  • Use the offset query parameter to navigate pages
  • Response includes offset header for next page when available
POST /api/artifacts?offset=1000

CORS Support

The API includes CORS middleware configured for the production frontend:
  • Allowed Origin: http://sot4-model-registry-dev.s3-website.us-east-2.amazonaws.com
  • Allowed Methods: GET, POST, PUT, DELETE, OPTIONS
  • Allowed Headers: content-type, authorization

Rate Limiting

Currently, the API does not enforce rate limiting. However, please be mindful of:
  • External API dependencies (Hugging Face, GitHub) have their own rate limits
  • Large artifact ingestion may take several seconds to complete
  • Lineage graph computation scales with dependency depth

Metrics Computation

When creating model artifacts, the following trustworthiness metrics are automatically computed:
  • Net Score: Overall trustworthiness rating (0-1)
  • Ramp Up Time: Ease of getting started with the model
  • Bus Factor: Risk of contributor loss
  • Performance Claims: Validation of performance assertions
  • License: License compliance score
  • Dataset and Code Score: Quality of training data and code
  • Reproducibility: Ability to reproduce results
  • Reviewedness: Code review coverage (must be ≥0.5 for ingestion)
  • Tree Score: Dependency quality assessment
  • Size Score: Platform-specific deployment feasibility
Each metric includes a latency measurement indicating computation time.

Lineage Tracking

The API automatically extracts and tracks artifact dependencies:
  • Nodes: Individual artifacts in the dependency graph
  • Edges: Parent-child relationships between artifacts
  • Cost Analysis: Aggregate cost computation across dependencies
Access lineage data via:
GET /api/artifact/model/{id}/lineage

OpenAPI Specification

The complete OpenAPI specification is available at the /docs endpoint, providing:
  • Interactive API explorer
  • Request/response schema definitions
  • Example requests and responses
  • Authentication requirements
  • Detailed parameter descriptions
Visit the interactive documentation to explore the full API specification.

Next Steps

Authentication

Learn how to authenticate API requests

Artifacts API

Manage models, datasets, and code artifacts

Build docs developers (and LLMs) love