Created
March 20, 2026 13:54
-
-
Save 0x7466/5636a60649b7e8788e0bb470f2b4337f to your computer and use it in GitHub Desktop.
Hugging Face OpenAPI spec
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "openapi": "3.1.0", | |
| "info": { | |
| "title": "Hub API Endpoints", | |
| "version": "0.0.1", | |
| "description": "We have open endpoints that you can use to retrieve information from the Hub as well as perform certain actions such as creating model, dataset or Space repos. We offer a wrapper Python client, [`huggingface_hub`](https://github.com/huggingface/huggingface_hub), and a JS client, [`huggingface.js`](https://github.com/huggingface/huggingface.js), that allow easy access to these endpoints. We also provide [webhooks](https://huggingface.co/docs/hub/webhooks) to receive real-time incremental info about repos. Enjoy!\n\nThe base URL for those endpoints below is `https://huggingface.co`. For example, to construct the `/api/models` call below, one can call the URL [https://huggingface.co/api/models](https://huggingface.co/api/models).\n\nIf you're an Agent, you might prefer the [markdown version OpenAPI spec](https://huggingface.co/.well-known/openapi.md).\n" | |
| }, | |
| "servers": [ | |
| { | |
| "url": "https://huggingface.co", | |
| "description": "Hub" | |
| } | |
| ], | |
| "components": { | |
| "securitySchemes": { | |
| "bearerAuth": { | |
| "type": "http", | |
| "scheme": "bearer" | |
| } | |
| }, | |
| "schemas": { | |
| "RepoId": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "examples": [ | |
| "deepseek-ai/DeepSeek-R1", | |
| "black-forest-labs/FLUX.1-dev" | |
| ], | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "dataset", | |
| "model", | |
| "space", | |
| "bucket", | |
| "kernel" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "type" | |
| ], | |
| "additionalProperties": false, | |
| "id": "RepoId" | |
| }, | |
| "Job": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "owner": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "spaceId": { | |
| "type": "string" | |
| }, | |
| "dockerImage": { | |
| "type": "string" | |
| }, | |
| "timeout": { | |
| "type": "number" | |
| }, | |
| "environment": { | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string" | |
| }, | |
| "additionalProperties": { | |
| "type": "string" | |
| } | |
| }, | |
| "secrets": { | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string" | |
| }, | |
| "additionalProperties": { | |
| "type": "null" | |
| } | |
| }, | |
| "command": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "arguments": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "arch": { | |
| "enum": [ | |
| "amd64", | |
| "arm64" | |
| ] | |
| }, | |
| "flavor": { | |
| "enum": [ | |
| "cpu-basic", | |
| "cpu-upgrade", | |
| "cpu-performance", | |
| "cpu-xl", | |
| "sprx8", | |
| "zero-a10g", | |
| "t4-small", | |
| "t4-medium", | |
| "l4x1", | |
| "l4x4", | |
| "l40sx1", | |
| "l40sx4", | |
| "l40sx8", | |
| "a10g-small", | |
| "a10g-large", | |
| "a10g-largex2", | |
| "a10g-largex4", | |
| "a100-large", | |
| "a100x4", | |
| "a100x8", | |
| "h200", | |
| "h200x2", | |
| "h200x4", | |
| "h200x8", | |
| "inf2x6" | |
| ] | |
| }, | |
| "status": { | |
| "type": "object", | |
| "properties": { | |
| "stage": { | |
| "enum": [ | |
| "COMPLETED", | |
| "CANCELED", | |
| "ERROR", | |
| "DELETED", | |
| "RUNNING" | |
| ] | |
| }, | |
| "message": { | |
| "anyOf": [ | |
| { | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "failureCount": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "stage", | |
| "message" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "createdBy": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "tags": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "retry": { | |
| "type": "number" | |
| }, | |
| "volumes": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "type": "string" | |
| }, | |
| "source": { | |
| "type": "string" | |
| }, | |
| "mountPath": { | |
| "type": "string" | |
| }, | |
| "revision": { | |
| "type": "string" | |
| }, | |
| "readOnly": { | |
| "type": "boolean" | |
| }, | |
| "path": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "source", | |
| "mountPath" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "createdAt", | |
| "owner", | |
| "environment", | |
| "flavor", | |
| "status", | |
| "createdBy" | |
| ], | |
| "additionalProperties": false, | |
| "id": "Job" | |
| } | |
| } | |
| }, | |
| "security": [ | |
| { | |
| "bearerAuth": [] | |
| } | |
| ], | |
| "tags": [ | |
| { | |
| "name": "auth", | |
| "x-displayName": "Auth", | |
| "description": "The following endpoints get information about your currently used user based on the passed token." | |
| }, | |
| { | |
| "name": "models", | |
| "x-displayName": "Models", | |
| "description": "Get information from all models on the Hub." | |
| }, | |
| { | |
| "name": "kernels", | |
| "x-displayName": "Kernels", | |
| "description": "Get information from all kernels on the Hub." | |
| }, | |
| { | |
| "name": "datasets", | |
| "x-displayName": "Datasets", | |
| "description": "Get information from all datasets on the Hub." | |
| }, | |
| { | |
| "name": "sql-console", | |
| "x-displayName": "SQL Console", | |
| "description": "Get information from SQL Console embeds from a dataset." | |
| }, | |
| { | |
| "name": "discussions", | |
| "x-displayName": "Discussions", | |
| "description": "The following endpoints manage discussions." | |
| }, | |
| { | |
| "name": "spaces", | |
| "x-displayName": "Spaces", | |
| "description": "Get information from all Spaces on the Hub." | |
| }, | |
| { | |
| "name": "repo-search", | |
| "x-displayName": "Repository Search", | |
| "description": "The following endpoints help get information about models, datasets, and Spaces stored on the Hub." | |
| }, | |
| { | |
| "name": "repos", | |
| "x-displayName": "Repositories", | |
| "description": "The following endpoints manage repository settings like creating and deleting a repository." | |
| }, | |
| { | |
| "name": "users", | |
| "x-displayName": "Users", | |
| "description": "User accounts are the base authoring entity on the Hub" | |
| }, | |
| { | |
| "name": "orgs", | |
| "x-displayName": "Organizations", | |
| "description": "The following endpoints let you interact with Hub Organizations and their members." | |
| }, | |
| { | |
| "name": "jobs", | |
| "x-displayName": "Jobs", | |
| "description": "The following endpoints manage jobs." | |
| }, | |
| { | |
| "name": "resource-groups", | |
| "x-displayName": "Resource groups", | |
| "description": "The following endpoints manage resource groups. Resource groups are a Team or Enterprise feature." | |
| }, | |
| { | |
| "name": "papers", | |
| "x-displayName": "Paper pages", | |
| "description": "The following endpoint gets information about papers." | |
| }, | |
| { | |
| "name": "collections", | |
| "x-displayName": "Collections", | |
| "description": "Use Collections to group repositories from the Hub (Models, Datasets, Spaces and Papers) on a dedicated page.\n\nYou can learn more about it in the Collections [guide](https://huggingface.co/docs/hub/collections). Collections can also be managed using the Python client (see [guide](https://huggingface.co/docs/huggingface_hub/main/en/guides/collections))." | |
| }, | |
| { | |
| "name": "buckets", | |
| "x-displayName": "Buckets", | |
| "description": "Git-free storage buckets for files, powered by Xet. Buckets provide simple file storage without git versioning." | |
| }, | |
| { | |
| "name": "notifications", | |
| "x-displayName": "Notifications", | |
| "description": "The following endpoints fetch Hub notifications." | |
| }, | |
| { | |
| "name": "inference-providers", | |
| "x-displayName": "Inference Providers", | |
| "description": "Run inference from one of our inference providers." | |
| }, | |
| { | |
| "name": "inference-endpoints", | |
| "x-displayName": "Inference Endpoints", | |
| "description": "Manage inference endpoints." | |
| }, | |
| { | |
| "name": "mcp", | |
| "x-displayName": "MCP", | |
| "description": "The following endpoints are for use with the MCP server." | |
| }, | |
| { | |
| "name": "oauth", | |
| "x-displayName": "OAuth", | |
| "description": "The following endpoints are for use with OAuth." | |
| }, | |
| { | |
| "name": "docs", | |
| "x-displayName": "Documentation", | |
| "description": "The following endpoints are for interacting with the Hub's documentation." | |
| }, | |
| { | |
| "name": "webhooks", | |
| "x-displayName": "Webhooks", | |
| "description": "The following endpoints are for use with webhooks." | |
| }, | |
| { | |
| "name": "scim", | |
| "x-displayName": "SCIM", | |
| "description": "Use the SCIM API to control and manage your hub Enterprise organization manage members' access.\n## Authentication\n\n- Must be organization owner\n- Use Access token with write permission on organization\n- Organization must be Enterprise Plus\n\n## Key Attribute Matching\n\n- Microsoft Entra ID (Azure AD)\n\t* SAML: `http://schemas.microsoft.com/identity/claims/objectidentifier`\n\t* SCIM: `externalId`\n- Other Identity Providers\n\t* SAML: `NameID` or `unique identifier`\n\t* SCIM: `externalId`\n\n## Supported SCIM User Attributes\n\n| Attribute | Description |\n|---|---|\n| `userName` | Username for the user |\n| `name.givenName` | First name |\n| `name.familyName` | Last name |\n| `emails` | Array of user emails; we don't support email types |\n| `externalId` | IDP provider's unique identifier |\n| `id` | Hugging Face SCIM endpoint identifier |\n| `active` | Boolean for provisioning status |\n\n" | |
| } | |
| ], | |
| "paths": { | |
| "/api/notifications": { | |
| "get": { | |
| "description": "List notifications for the user", | |
| "summary": "List notifications", | |
| "tags": [ | |
| "notifications" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "notifications": { | |
| "type": "array", | |
| "items": { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "const": "paper" | |
| }, | |
| "updatedAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "read": { | |
| "type": "boolean" | |
| }, | |
| "discussionEventId": { | |
| "type": "string" | |
| }, | |
| "paper": { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "title": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "title" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "paperDiscussion": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "participating": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatar": { | |
| "type": "string" | |
| }, | |
| "user": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatar", | |
| "user" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "paperId": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "participating", | |
| "paperId" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "updatedAt", | |
| "read", | |
| "paper", | |
| "paperDiscussion" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "const": "repo" | |
| }, | |
| "updatedAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "read": { | |
| "type": "boolean" | |
| }, | |
| "discussionEventId": { | |
| "type": "string" | |
| }, | |
| "repo": { | |
| "$ref": "#/components/schemas/RepoId" | |
| }, | |
| "discussion": { | |
| "type": "object", | |
| "properties": { | |
| "num": { | |
| "type": "number" | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "status": { | |
| "enum": [ | |
| "draft", | |
| "open", | |
| "closed", | |
| "merged" | |
| ] | |
| }, | |
| "id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "isPullRequest": { | |
| "type": "boolean" | |
| }, | |
| "participating": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatar": { | |
| "type": "string" | |
| }, | |
| "user": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatar", | |
| "user" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "num", | |
| "title", | |
| "status", | |
| "id", | |
| "isPullRequest", | |
| "participating" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "updatedAt", | |
| "read", | |
| "repo", | |
| "discussion" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "const": "post" | |
| }, | |
| "updatedAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "read": { | |
| "type": "boolean" | |
| }, | |
| "discussionEventId": { | |
| "type": "string" | |
| }, | |
| "post": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "slug": { | |
| "type": "string" | |
| }, | |
| "authorName": { | |
| "type": "string" | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "participating": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatar": { | |
| "type": "string" | |
| }, | |
| "user": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatar", | |
| "user" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "slug", | |
| "authorName", | |
| "title", | |
| "participating" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "updatedAt", | |
| "read", | |
| "post" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "const": "community_blog" | |
| }, | |
| "updatedAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "read": { | |
| "type": "boolean" | |
| }, | |
| "discussionEventId": { | |
| "type": "string" | |
| }, | |
| "blog": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "slug": { | |
| "type": "string" | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "canonical": { | |
| "type": "boolean" | |
| }, | |
| "authorName": { | |
| "type": "string" | |
| }, | |
| "participating": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatar": { | |
| "type": "string" | |
| }, | |
| "user": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatar", | |
| "user" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "slug", | |
| "title", | |
| "canonical", | |
| "participating" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "updatedAt", | |
| "read", | |
| "blog" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| } | |
| }, | |
| "count": { | |
| "type": "object", | |
| "properties": { | |
| "view": { | |
| "type": "number" | |
| }, | |
| "unread": { | |
| "type": "number" | |
| }, | |
| "all": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "view", | |
| "unread", | |
| "all" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "start": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "notifications", | |
| "count", | |
| "start" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The notifications for the user" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "p", | |
| "in": "query", | |
| "schema": { | |
| "default": 0, | |
| "type": "integer", | |
| "minimum": 0, | |
| "maximum": 9007199254740991 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "readStatus", | |
| "in": "query", | |
| "schema": { | |
| "default": "all", | |
| "enum": [ | |
| "all", | |
| "unread" | |
| ] | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "repoType", | |
| "in": "query", | |
| "schema": { | |
| "enum": [ | |
| "dataset", | |
| "model", | |
| "space", | |
| "bucket", | |
| "kernel" | |
| ] | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "repoName", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "postAuthor", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "paperId", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "articleId", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "mention", | |
| "in": "query", | |
| "schema": { | |
| "default": "all", | |
| "enum": [ | |
| "all", | |
| "participating", | |
| "mentions" | |
| ] | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "lastUpdate", | |
| "in": "query", | |
| "schema": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "required": false | |
| } | |
| ] | |
| }, | |
| "delete": { | |
| "description": "Delete notifications, either by specifying discussionIds or by applying to all notifications with search parameters", | |
| "summary": "Delete notifications", | |
| "tags": [ | |
| "notifications" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "discussionIds": { | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "p", | |
| "in": "query", | |
| "schema": { | |
| "default": 0, | |
| "type": "integer", | |
| "minimum": 0, | |
| "maximum": 9007199254740991 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "readStatus", | |
| "in": "query", | |
| "schema": { | |
| "default": "all", | |
| "enum": [ | |
| "all", | |
| "unread" | |
| ] | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "repoType", | |
| "in": "query", | |
| "schema": { | |
| "enum": [ | |
| "dataset", | |
| "model", | |
| "space", | |
| "bucket", | |
| "kernel" | |
| ] | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "repoName", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "postAuthor", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "paperId", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "articleId", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "mention", | |
| "in": "query", | |
| "schema": { | |
| "default": "all", | |
| "enum": [ | |
| "all", | |
| "participating", | |
| "mentions" | |
| ] | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "lastUpdate", | |
| "in": "query", | |
| "schema": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "applyToAll", | |
| "in": "query", | |
| "schema": { | |
| "default": false | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/settings/mcp": { | |
| "get": { | |
| "description": "Get the MCP tools for the current user", | |
| "summary": "Get MCP tools", | |
| "tags": [ | |
| "users" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "builtInTools": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "spaceTools": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "emoji": { | |
| "type": "string" | |
| }, | |
| "subdomain": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "name", | |
| "emoji", | |
| "subdomain" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "builtInTools", | |
| "spaceTools" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The MCP tools for the current user" | |
| } | |
| } | |
| } | |
| }, | |
| "/api/settings/notifications": { | |
| "patch": { | |
| "description": "Update notification settings for the user", | |
| "summary": "Update notification settings", | |
| "tags": [ | |
| "notifications" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "notifications": { | |
| "type": "object", | |
| "properties": { | |
| "announcements": { | |
| "type": "boolean" | |
| }, | |
| "arxiv_paper_activity": { | |
| "type": "boolean" | |
| }, | |
| "daily_papers_digest": { | |
| "type": "boolean" | |
| }, | |
| "discussions_participating": { | |
| "type": "boolean" | |
| }, | |
| "discussions_watched": { | |
| "type": "boolean" | |
| }, | |
| "gated_user_access_request": { | |
| "type": "boolean" | |
| }, | |
| "inference_endpoint_status": { | |
| "type": "boolean" | |
| }, | |
| "launch_autonlp": { | |
| "type": "boolean" | |
| }, | |
| "launch_spaces": { | |
| "type": "boolean" | |
| }, | |
| "launch_prepaid_credits": { | |
| "type": "boolean" | |
| }, | |
| "launch_training_cluster": { | |
| "type": "boolean" | |
| }, | |
| "org_request": { | |
| "type": "boolean" | |
| }, | |
| "org_suggestions": { | |
| "type": "boolean" | |
| }, | |
| "org_verified_suggestions": { | |
| "type": "boolean" | |
| }, | |
| "org_suggestions_to_create": { | |
| "type": "boolean" | |
| }, | |
| "posts_participating": { | |
| "type": "boolean" | |
| }, | |
| "user_follows": { | |
| "type": "boolean" | |
| }, | |
| "secret_detected": { | |
| "type": "boolean" | |
| }, | |
| "web_discussions_participating": { | |
| "type": "boolean" | |
| }, | |
| "web_discussions_watched": { | |
| "type": "boolean" | |
| }, | |
| "web_posts_participating": { | |
| "type": "boolean" | |
| }, | |
| "product_updates_after": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "api_inference_sunset": { | |
| "type": "boolean" | |
| }, | |
| "locked_out": { | |
| "type": "boolean" | |
| } | |
| } | |
| }, | |
| "prepaidAmount": { | |
| "description": "To be provided when enabling launch_prepaid_credits", | |
| "type": "string", | |
| "maxLength": 24 | |
| } | |
| }, | |
| "required": [ | |
| "notifications" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/api/settings/watch": { | |
| "patch": { | |
| "description": "Update watch settings for the user. Get notified when discussions happen on your watched items.", | |
| "summary": "Update watch settings", | |
| "tags": [ | |
| "notifications" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "delete": { | |
| "default": [], | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "org", | |
| "user", | |
| "repo" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "type" | |
| ] | |
| } | |
| }, | |
| "add": { | |
| "default": [], | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "org", | |
| "user", | |
| "repo" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "type" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/api/settings/webhooks": { | |
| "get": { | |
| "summary": "List webhooks", | |
| "tags": [ | |
| "webhooks" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "url": { | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "job": { | |
| "type": "object", | |
| "properties": { | |
| "dockerImage": { | |
| "type": "string" | |
| }, | |
| "spaceId": { | |
| "type": "string" | |
| }, | |
| "environment": { | |
| "default": {}, | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string", | |
| "pattern": "^[a-zA-Z][_a-zA-Z0-9]+$" | |
| }, | |
| "additionalProperties": { | |
| "type": "string" | |
| } | |
| }, | |
| "arguments": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "command": { | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "minLength": 1 | |
| } | |
| }, | |
| "flavor": { | |
| "enum": [ | |
| "cpu-basic", | |
| "cpu-upgrade", | |
| "cpu-performance", | |
| "cpu-xl", | |
| "sprx8", | |
| "zero-a10g", | |
| "t4-small", | |
| "t4-medium", | |
| "l4x1", | |
| "l4x4", | |
| "l40sx1", | |
| "l40sx4", | |
| "l40sx8", | |
| "a10g-small", | |
| "a10g-large", | |
| "a10g-largex2", | |
| "a10g-largex4", | |
| "a100-large", | |
| "a100x4", | |
| "a100x8", | |
| "h200", | |
| "h200x2", | |
| "h200x4", | |
| "h200x8", | |
| "inf2x6" | |
| ] | |
| }, | |
| "timeoutSeconds": { | |
| "default": null, | |
| "anyOf": [ | |
| { | |
| "type": "integer", | |
| "exclusiveMinimum": 0, | |
| "maximum": 9007199254740991 | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "labels": { | |
| "description": "Labels for the job as key-value pairs. Both keys and values must be max 100 characters and contain only alphanumeric characters, dots, dashes, and underscores.", | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string", | |
| "maxLength": 100, | |
| "pattern": "^[a-zA-Z0-9._-]+$" | |
| }, | |
| "additionalProperties": { | |
| "type": "string", | |
| "maxLength": 100, | |
| "pattern": "^[a-zA-Z0-9._-]*$" | |
| } | |
| }, | |
| "secrets": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "environment", | |
| "flavor", | |
| "timeoutSeconds" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "jobSourceId": { | |
| "type": "string" | |
| }, | |
| "disabled": { | |
| "anyOf": [ | |
| { | |
| "type": "boolean" | |
| }, | |
| { | |
| "const": "suspended-after-failure" | |
| } | |
| ] | |
| }, | |
| "watched": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "dataset", | |
| "model", | |
| "space", | |
| "bucket", | |
| "kernel", | |
| "user", | |
| "org" | |
| ] | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "secret": { | |
| "type": "string" | |
| }, | |
| "domains": { | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "repo", | |
| "discussion" | |
| ] | |
| } | |
| }, | |
| "lastTriggerAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "disabled", | |
| "watched", | |
| "domains" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "Webhooks" | |
| } | |
| } | |
| }, | |
| "post": { | |
| "summary": "Create webhook", | |
| "tags": [ | |
| "webhooks" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "watched": { | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "enum": [ | |
| "dataset", | |
| "model", | |
| "space", | |
| "bucket", | |
| "kernel", | |
| "user", | |
| "org" | |
| ] | |
| }, | |
| "name": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "name" | |
| ] | |
| } | |
| }, | |
| "url": { | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "job": { | |
| "type": "object", | |
| "properties": { | |
| "spaceId": { | |
| "type": "string" | |
| }, | |
| "dockerImage": { | |
| "type": "string" | |
| }, | |
| "arguments": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "command": { | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "minLength": 1 | |
| } | |
| }, | |
| "environment": { | |
| "default": {}, | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string", | |
| "pattern": "^[a-zA-Z][_a-zA-Z0-9]+$" | |
| }, | |
| "additionalProperties": { | |
| "type": "string" | |
| } | |
| }, | |
| "secrets": { | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string", | |
| "pattern": "^[a-zA-Z][_a-zA-Z0-9]*$" | |
| }, | |
| "additionalProperties": { | |
| "type": "string" | |
| } | |
| }, | |
| "flavor": { | |
| "enum": [ | |
| "cpu-basic", | |
| "cpu-upgrade", | |
| "cpu-performance", | |
| "cpu-xl", | |
| "sprx8", | |
| "zero-a10g", | |
| "t4-small", | |
| "t4-medium", | |
| "l4x1", | |
| "l4x4", | |
| "l40sx1", | |
| "l40sx4", | |
| "l40sx8", | |
| "a10g-small", | |
| "a10g-large", | |
| "a10g-largex2", | |
| "a10g-largex4", | |
| "a100-large", | |
| "a100x4", | |
| "a100x8", | |
| "h200", | |
| "h200x2", | |
| "h200x4", | |
| "h200x8", | |
| "inf2x6" | |
| ] | |
| }, | |
| "arch": { | |
| "enum": [ | |
| "amd64", | |
| "arm64" | |
| ] | |
| }, | |
| "timeoutSeconds": { | |
| "default": null, | |
| "anyOf": [ | |
| { | |
| "type": "integer", | |
| "exclusiveMinimum": 0, | |
| "maximum": 9007199254740991 | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "attempts": { | |
| "description": "Max number of attempts to make. For example, if you set this to 3, the job will be retried up to 2 times if it fails.", | |
| "default": 1, | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 9007199254740991 | |
| }, | |
| "labels": { | |
| "description": "Labels for the job as key-value pairs. Both keys and values must be max 100 characters and contain only alphanumeric characters, dots, dashes, and underscores.", | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string", | |
| "maxLength": 100, | |
| "pattern": "^[a-zA-Z0-9._-]+$" | |
| }, | |
| "additionalProperties": { | |
| "type": "string", | |
| "maxLength": 100, | |
| "pattern": "^[a-zA-Z0-9._-]*$" | |
| } | |
| }, | |
| "volumes": { | |
| "description": "HuggingFace Buckets or Repos to mount as volumes in the job container.", | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "enum": [ | |
| "bucket", | |
| "model", | |
| "dataset", | |
| "space" | |
| ] | |
| }, | |
| "source": { | |
| "description": "Source identifier, e.g. 'username/my-bucket' or 'username/my-model'", | |
| "type": "string" | |
| }, | |
| "mountPath": { | |
| "description": "Mount path inside the container, e.g. '/data'", | |
| "type": "string", | |
| "pattern": "^\\/.*" | |
| }, | |
| "revision": { | |
| "description": "Git revision (only for repos, defaults to 'main')", | |
| "type": "string" | |
| }, | |
| "readOnly": { | |
| "description": "Read-only mount (forced true for repos, defaults to false for buckets)", | |
| "type": "boolean" | |
| }, | |
| "path": { | |
| "description": "Subfolder prefix inside the bucket/repo to mount, e.g. 'path/to/dir'", | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "source", | |
| "mountPath" | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "flavor" | |
| ] | |
| }, | |
| "jobSourceId": { | |
| "type": "string" | |
| }, | |
| "domains": { | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "repo", | |
| "discussion" | |
| ] | |
| } | |
| }, | |
| "secret": { | |
| "type": "string", | |
| "pattern": "^[\\x20-\\x7F]*$" | |
| } | |
| }, | |
| "required": [ | |
| "watched", | |
| "domains" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "webhook": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "url": { | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "job": { | |
| "type": "object", | |
| "properties": { | |
| "dockerImage": { | |
| "type": "string" | |
| }, | |
| "spaceId": { | |
| "type": "string" | |
| }, | |
| "environment": { | |
| "default": {}, | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string", | |
| "pattern": "^[a-zA-Z][_a-zA-Z0-9]+$" | |
| }, | |
| "additionalProperties": { | |
| "type": "string" | |
| } | |
| }, | |
| "arguments": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "command": { | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "minLength": 1 | |
| } | |
| }, | |
| "flavor": { | |
| "enum": [ | |
| "cpu-basic", | |
| "cpu-upgrade", | |
| "cpu-performance", | |
| "cpu-xl", | |
| "sprx8", | |
| "zero-a10g", | |
| "t4-small", | |
| "t4-medium", | |
| "l4x1", | |
| "l4x4", | |
| "l40sx1", | |
| "l40sx4", | |
| "l40sx8", | |
| "a10g-small", | |
| "a10g-large", | |
| "a10g-largex2", | |
| "a10g-largex4", | |
| "a100-large", | |
| "a100x4", | |
| "a100x8", | |
| "h200", | |
| "h200x2", | |
| "h200x4", | |
| "h200x8", | |
| "inf2x6" | |
| ] | |
| }, | |
| "timeoutSeconds": { | |
| "default": null, | |
| "anyOf": [ | |
| { | |
| "type": "integer", | |
| "exclusiveMinimum": 0, | |
| "maximum": 9007199254740991 | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "labels": { | |
| "description": "Labels for the job as key-value pairs. Both keys and values must be max 100 characters and contain only alphanumeric characters, dots, dashes, and underscores.", | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string", | |
| "maxLength": 100, | |
| "pattern": "^[a-zA-Z0-9._-]+$" | |
| }, | |
| "additionalProperties": { | |
| "type": "string", | |
| "maxLength": 100, | |
| "pattern": "^[a-zA-Z0-9._-]*$" | |
| } | |
| }, | |
| "secrets": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "environment", | |
| "flavor", | |
| "timeoutSeconds" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "jobSourceId": { | |
| "type": "string" | |
| }, | |
| "disabled": { | |
| "anyOf": [ | |
| { | |
| "type": "boolean" | |
| }, | |
| { | |
| "const": "suspended-after-failure" | |
| } | |
| ] | |
| }, | |
| "watched": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "dataset", | |
| "model", | |
| "space", | |
| "bucket", | |
| "kernel", | |
| "user", | |
| "org" | |
| ] | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "secret": { | |
| "type": "string" | |
| }, | |
| "domains": { | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "repo", | |
| "discussion" | |
| ] | |
| } | |
| }, | |
| "lastTriggerAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "disabled", | |
| "watched", | |
| "domains" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "webhook" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Created webhook" | |
| } | |
| } | |
| } | |
| }, | |
| "/api/settings/webhooks/{webhookId}": { | |
| "get": { | |
| "summary": "Get webhook", | |
| "tags": [ | |
| "webhooks" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "webhook": { | |
| "description": "Webhook", | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "url": { | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "job": { | |
| "type": "object", | |
| "properties": { | |
| "dockerImage": { | |
| "type": "string" | |
| }, | |
| "spaceId": { | |
| "type": "string" | |
| }, | |
| "environment": { | |
| "default": {}, | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string", | |
| "pattern": "^[a-zA-Z][_a-zA-Z0-9]+$" | |
| }, | |
| "additionalProperties": { | |
| "type": "string" | |
| } | |
| }, | |
| "arguments": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "command": { | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "minLength": 1 | |
| } | |
| }, | |
| "flavor": { | |
| "enum": [ | |
| "cpu-basic", | |
| "cpu-upgrade", | |
| "cpu-performance", | |
| "cpu-xl", | |
| "sprx8", | |
| "zero-a10g", | |
| "t4-small", | |
| "t4-medium", | |
| "l4x1", | |
| "l4x4", | |
| "l40sx1", | |
| "l40sx4", | |
| "l40sx8", | |
| "a10g-small", | |
| "a10g-large", | |
| "a10g-largex2", | |
| "a10g-largex4", | |
| "a100-large", | |
| "a100x4", | |
| "a100x8", | |
| "h200", | |
| "h200x2", | |
| "h200x4", | |
| "h200x8", | |
| "inf2x6" | |
| ] | |
| }, | |
| "timeoutSeconds": { | |
| "default": null, | |
| "anyOf": [ | |
| { | |
| "type": "integer", | |
| "exclusiveMinimum": 0, | |
| "maximum": 9007199254740991 | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "labels": { | |
| "description": "Labels for the job as key-value pairs. Both keys and values must be max 100 characters and contain only alphanumeric characters, dots, dashes, and underscores.", | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string", | |
| "maxLength": 100, | |
| "pattern": "^[a-zA-Z0-9._-]+$" | |
| }, | |
| "additionalProperties": { | |
| "type": "string", | |
| "maxLength": 100, | |
| "pattern": "^[a-zA-Z0-9._-]*$" | |
| } | |
| }, | |
| "secrets": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "environment", | |
| "flavor", | |
| "timeoutSeconds" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "jobSourceId": { | |
| "type": "string" | |
| }, | |
| "disabled": { | |
| "anyOf": [ | |
| { | |
| "type": "boolean" | |
| }, | |
| { | |
| "const": "suspended-after-failure" | |
| } | |
| ] | |
| }, | |
| "watched": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "dataset", | |
| "model", | |
| "space", | |
| "bucket", | |
| "kernel", | |
| "user", | |
| "org" | |
| ] | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "secret": { | |
| "type": "string" | |
| }, | |
| "domains": { | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "repo", | |
| "discussion" | |
| ] | |
| } | |
| }, | |
| "lastTriggerAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "disabled", | |
| "watched", | |
| "domains" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "webhook" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Webhook" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "webhookId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "post": { | |
| "summary": "Update webhook", | |
| "tags": [ | |
| "webhooks" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "watched": { | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "enum": [ | |
| "dataset", | |
| "model", | |
| "space", | |
| "bucket", | |
| "kernel", | |
| "user", | |
| "org" | |
| ] | |
| }, | |
| "name": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "name" | |
| ] | |
| } | |
| }, | |
| "url": { | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "job": { | |
| "type": "object", | |
| "properties": { | |
| "spaceId": { | |
| "type": "string" | |
| }, | |
| "dockerImage": { | |
| "type": "string" | |
| }, | |
| "arguments": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "command": { | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "minLength": 1 | |
| } | |
| }, | |
| "environment": { | |
| "default": {}, | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string", | |
| "pattern": "^[a-zA-Z][_a-zA-Z0-9]+$" | |
| }, | |
| "additionalProperties": { | |
| "type": "string" | |
| } | |
| }, | |
| "secrets": { | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string", | |
| "pattern": "^[a-zA-Z][_a-zA-Z0-9]*$" | |
| }, | |
| "additionalProperties": { | |
| "type": "string" | |
| } | |
| }, | |
| "flavor": { | |
| "enum": [ | |
| "cpu-basic", | |
| "cpu-upgrade", | |
| "cpu-performance", | |
| "cpu-xl", | |
| "sprx8", | |
| "zero-a10g", | |
| "t4-small", | |
| "t4-medium", | |
| "l4x1", | |
| "l4x4", | |
| "l40sx1", | |
| "l40sx4", | |
| "l40sx8", | |
| "a10g-small", | |
| "a10g-large", | |
| "a10g-largex2", | |
| "a10g-largex4", | |
| "a100-large", | |
| "a100x4", | |
| "a100x8", | |
| "h200", | |
| "h200x2", | |
| "h200x4", | |
| "h200x8", | |
| "inf2x6" | |
| ] | |
| }, | |
| "arch": { | |
| "enum": [ | |
| "amd64", | |
| "arm64" | |
| ] | |
| }, | |
| "timeoutSeconds": { | |
| "default": null, | |
| "anyOf": [ | |
| { | |
| "type": "integer", | |
| "exclusiveMinimum": 0, | |
| "maximum": 9007199254740991 | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "attempts": { | |
| "description": "Max number of attempts to make. For example, if you set this to 3, the job will be retried up to 2 times if it fails.", | |
| "default": 1, | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 9007199254740991 | |
| }, | |
| "labels": { | |
| "description": "Labels for the job as key-value pairs. Both keys and values must be max 100 characters and contain only alphanumeric characters, dots, dashes, and underscores.", | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string", | |
| "maxLength": 100, | |
| "pattern": "^[a-zA-Z0-9._-]+$" | |
| }, | |
| "additionalProperties": { | |
| "type": "string", | |
| "maxLength": 100, | |
| "pattern": "^[a-zA-Z0-9._-]*$" | |
| } | |
| }, | |
| "volumes": { | |
| "description": "HuggingFace Buckets or Repos to mount as volumes in the job container.", | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "enum": [ | |
| "bucket", | |
| "model", | |
| "dataset", | |
| "space" | |
| ] | |
| }, | |
| "source": { | |
| "description": "Source identifier, e.g. 'username/my-bucket' or 'username/my-model'", | |
| "type": "string" | |
| }, | |
| "mountPath": { | |
| "description": "Mount path inside the container, e.g. '/data'", | |
| "type": "string", | |
| "pattern": "^\\/.*" | |
| }, | |
| "revision": { | |
| "description": "Git revision (only for repos, defaults to 'main')", | |
| "type": "string" | |
| }, | |
| "readOnly": { | |
| "description": "Read-only mount (forced true for repos, defaults to false for buckets)", | |
| "type": "boolean" | |
| }, | |
| "path": { | |
| "description": "Subfolder prefix inside the bucket/repo to mount, e.g. 'path/to/dir'", | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "source", | |
| "mountPath" | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "flavor" | |
| ] | |
| }, | |
| "jobSourceId": { | |
| "type": "string" | |
| }, | |
| "domains": { | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "repo", | |
| "discussion" | |
| ] | |
| } | |
| }, | |
| "secret": { | |
| "type": "string", | |
| "pattern": "^[\\x20-\\x7F]*$" | |
| } | |
| }, | |
| "required": [ | |
| "watched", | |
| "domains" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "webhook": { | |
| "description": "Webhook", | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "url": { | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "job": { | |
| "type": "object", | |
| "properties": { | |
| "dockerImage": { | |
| "type": "string" | |
| }, | |
| "spaceId": { | |
| "type": "string" | |
| }, | |
| "environment": { | |
| "default": {}, | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string", | |
| "pattern": "^[a-zA-Z][_a-zA-Z0-9]+$" | |
| }, | |
| "additionalProperties": { | |
| "type": "string" | |
| } | |
| }, | |
| "arguments": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "command": { | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "minLength": 1 | |
| } | |
| }, | |
| "flavor": { | |
| "enum": [ | |
| "cpu-basic", | |
| "cpu-upgrade", | |
| "cpu-performance", | |
| "cpu-xl", | |
| "sprx8", | |
| "zero-a10g", | |
| "t4-small", | |
| "t4-medium", | |
| "l4x1", | |
| "l4x4", | |
| "l40sx1", | |
| "l40sx4", | |
| "l40sx8", | |
| "a10g-small", | |
| "a10g-large", | |
| "a10g-largex2", | |
| "a10g-largex4", | |
| "a100-large", | |
| "a100x4", | |
| "a100x8", | |
| "h200", | |
| "h200x2", | |
| "h200x4", | |
| "h200x8", | |
| "inf2x6" | |
| ] | |
| }, | |
| "timeoutSeconds": { | |
| "default": null, | |
| "anyOf": [ | |
| { | |
| "type": "integer", | |
| "exclusiveMinimum": 0, | |
| "maximum": 9007199254740991 | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "labels": { | |
| "description": "Labels for the job as key-value pairs. Both keys and values must be max 100 characters and contain only alphanumeric characters, dots, dashes, and underscores.", | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string", | |
| "maxLength": 100, | |
| "pattern": "^[a-zA-Z0-9._-]+$" | |
| }, | |
| "additionalProperties": { | |
| "type": "string", | |
| "maxLength": 100, | |
| "pattern": "^[a-zA-Z0-9._-]*$" | |
| } | |
| }, | |
| "secrets": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "environment", | |
| "flavor", | |
| "timeoutSeconds" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "jobSourceId": { | |
| "type": "string" | |
| }, | |
| "disabled": { | |
| "anyOf": [ | |
| { | |
| "type": "boolean" | |
| }, | |
| { | |
| "const": "suspended-after-failure" | |
| } | |
| ] | |
| }, | |
| "watched": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "dataset", | |
| "model", | |
| "space", | |
| "bucket", | |
| "kernel", | |
| "user", | |
| "org" | |
| ] | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "secret": { | |
| "type": "string" | |
| }, | |
| "domains": { | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "repo", | |
| "discussion" | |
| ] | |
| } | |
| }, | |
| "lastTriggerAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "disabled", | |
| "watched", | |
| "domains" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "webhook" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Updated webhook" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "webhookId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "delete": { | |
| "summary": "Delete webhook", | |
| "tags": [ | |
| "webhooks" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": {}, | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Deleted webhook" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "webhookId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/settings/webhooks/{webhookId}/{action}": { | |
| "post": { | |
| "summary": "Enable/disable webhook", | |
| "tags": [ | |
| "webhooks" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "webhook": { | |
| "description": "Webhook", | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "url": { | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "job": { | |
| "type": "object", | |
| "properties": { | |
| "dockerImage": { | |
| "type": "string" | |
| }, | |
| "spaceId": { | |
| "type": "string" | |
| }, | |
| "environment": { | |
| "default": {}, | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string", | |
| "pattern": "^[a-zA-Z][_a-zA-Z0-9]+$" | |
| }, | |
| "additionalProperties": { | |
| "type": "string" | |
| } | |
| }, | |
| "arguments": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "command": { | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "minLength": 1 | |
| } | |
| }, | |
| "flavor": { | |
| "enum": [ | |
| "cpu-basic", | |
| "cpu-upgrade", | |
| "cpu-performance", | |
| "cpu-xl", | |
| "sprx8", | |
| "zero-a10g", | |
| "t4-small", | |
| "t4-medium", | |
| "l4x1", | |
| "l4x4", | |
| "l40sx1", | |
| "l40sx4", | |
| "l40sx8", | |
| "a10g-small", | |
| "a10g-large", | |
| "a10g-largex2", | |
| "a10g-largex4", | |
| "a100-large", | |
| "a100x4", | |
| "a100x8", | |
| "h200", | |
| "h200x2", | |
| "h200x4", | |
| "h200x8", | |
| "inf2x6" | |
| ] | |
| }, | |
| "timeoutSeconds": { | |
| "default": null, | |
| "anyOf": [ | |
| { | |
| "type": "integer", | |
| "exclusiveMinimum": 0, | |
| "maximum": 9007199254740991 | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "labels": { | |
| "description": "Labels for the job as key-value pairs. Both keys and values must be max 100 characters and contain only alphanumeric characters, dots, dashes, and underscores.", | |
| "type": "object", | |
| "propertyNames": { | |
| "type": "string", | |
| "maxLength": 100, | |
| "pattern": "^[a-zA-Z0-9._-]+$" | |
| }, | |
| "additionalProperties": { | |
| "type": "string", | |
| "maxLength": 100, | |
| "pattern": "^[a-zA-Z0-9._-]*$" | |
| } | |
| }, | |
| "secrets": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "environment", | |
| "flavor", | |
| "timeoutSeconds" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "jobSourceId": { | |
| "type": "string" | |
| }, | |
| "disabled": { | |
| "anyOf": [ | |
| { | |
| "type": "boolean" | |
| }, | |
| { | |
| "const": "suspended-after-failure" | |
| } | |
| ] | |
| }, | |
| "watched": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "dataset", | |
| "model", | |
| "space", | |
| "bucket", | |
| "kernel", | |
| "user", | |
| "org" | |
| ] | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "secret": { | |
| "type": "string" | |
| }, | |
| "domains": { | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "repo", | |
| "discussion" | |
| ] | |
| } | |
| }, | |
| "lastTriggerAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "disabled", | |
| "watched", | |
| "domains" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "webhook" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Updated webhook" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "webhookId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "action", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "enable", | |
| "disable" | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/settings/webhooks/{webhookId}/replay/{logId}": { | |
| "post": { | |
| "summary": "Replay webhook log", | |
| "tags": [ | |
| "webhooks" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "description": "Replay HTTP status", | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Replay response" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "webhookId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "logId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/settings/papers/claim": { | |
| "post": { | |
| "summary": "Claim paper authorship", | |
| "tags": [ | |
| "papers" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "paperId": { | |
| "description": "ArXiv paper identifier being claimed.", | |
| "type": "string" | |
| }, | |
| "claimAuthorId": { | |
| "description": "Author entry on the paper being claimed.", | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-fA-F]{24}$" | |
| }, | |
| "targetUserId": { | |
| "description": "HF user who should receive the claim.", | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-fA-F]{24}$" | |
| } | |
| }, | |
| "required": [ | |
| "paperId" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "ok": { | |
| "type": "boolean" | |
| }, | |
| "claimedPaperId": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "ok", | |
| "claimedPaperId" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Paper authorship claim result, including the claimed paper id" | |
| } | |
| } | |
| } | |
| }, | |
| "/api/organizations/{name}/settings/tokens/revoke": { | |
| "post": { | |
| "description": "An org admin can revoke a token's access to the org. The token itself isn't deleted, it still works outside the org. Requires the raw token value. Enterprise only.", | |
| "summary": "Revoke a member's access token from the organization", | |
| "tags": [ | |
| "orgs" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "token": { | |
| "type": "string", | |
| "pattern": "^hf_.*" | |
| } | |
| }, | |
| "required": [ | |
| "token" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/audit-log/export": { | |
| "get": { | |
| "description": "Export the audit log events in JSON format for a Team or Enterprise organization. The export is limited to the last 100,000 events.", | |
| "summary": "Export the audit log", | |
| "tags": [ | |
| "orgs" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "billing.update_payment_method", | |
| "billing.create_customer", | |
| "billing.remove_payment_method", | |
| "billing.aws_add", | |
| "billing.aws_remove", | |
| "billing.gcp_add", | |
| "billing.gcp_remove", | |
| "billing.marketplace_approve", | |
| "billing.cancel_subscription", | |
| "billing.renew_subscription", | |
| "billing.start_subscription", | |
| "billing.un_cancel_subscription", | |
| "billing.update_subscription", | |
| "billing.update_subscription_plan", | |
| "billing.update_subscription_contract_details", | |
| "collection.create", | |
| "collection.delete", | |
| "org.add_user", | |
| "org.change_role", | |
| "org.create", | |
| "org.delete", | |
| "org.restore", | |
| "org.invite_user", | |
| "org.invite.accept", | |
| "org.invite.email", | |
| "org.join.from_domain", | |
| "org.join.automatic", | |
| "org.leave", | |
| "org.remove_user", | |
| "org.rename", | |
| "org.rotate_token", | |
| "org.sso_login", | |
| "org.sso_join", | |
| "org.update_join_settings", | |
| "org.update_settings", | |
| "org.token_approval.enabled", | |
| "org.token_approval.disabled", | |
| "org.token_approval.authorization_request", | |
| "org.token_approval.authorization_request.authorized", | |
| "org.token_approval.authorization_request.revoked", | |
| "org.token_approval.authorization_request.denied", | |
| "repo.add_secrets", | |
| "repo.remove_secrets", | |
| "repo.add_secret", | |
| "repo.update_secret", | |
| "repo.remove_secret", | |
| "repo.create", | |
| "repo.delete", | |
| "repo.disable", | |
| "repo.removeDisable", | |
| "repo.duplication", | |
| "repo.delete_doi", | |
| "repo.move", | |
| "repo.update_resource_group", | |
| "repo.update_settings", | |
| "repo.add_variable", | |
| "repo.update_variable", | |
| "repo.remove_variable", | |
| "repo.add_variables", | |
| "repo.remove_variables", | |
| "repo.delete_lfs_file", | |
| "spaces.add_storage", | |
| "spaces.remove_storage", | |
| "spaces.update_hardware", | |
| "spaces.update_sleep_time", | |
| "resource_group.create", | |
| "resource_group.add_users", | |
| "resource_group.remove_users", | |
| "resource_group.change_role", | |
| "resource_group.settings", | |
| "resource_group.delete", | |
| "jobs.create", | |
| "jobs.cancel", | |
| "scheduled_job.create", | |
| "scheduled_job.delete", | |
| "scheduled_job.resume", | |
| "scheduled_job.suspend", | |
| "scheduled_job.run", | |
| "scheduled_job.update_schedule", | |
| "oauth.token" | |
| ] | |
| }, | |
| "data": {}, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "ip": { | |
| "type": "string" | |
| }, | |
| "location": { | |
| "type": "object", | |
| "properties": { | |
| "formatted": { | |
| "type": "string" | |
| }, | |
| "country": { | |
| "type": "string" | |
| }, | |
| "city": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "formatted" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "userAgent": { | |
| "type": "string" | |
| }, | |
| "author": { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "user": { | |
| "type": "string" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "user", | |
| "system" | |
| ] | |
| }, | |
| "deleted": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "user", | |
| "avatarUrl", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "token": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "const": "access_token" | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "role": { | |
| "enum": [ | |
| "read", | |
| "write", | |
| "fineGrained" | |
| ] | |
| }, | |
| "last4": { | |
| "type": "string" | |
| }, | |
| "deleted": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "id", | |
| "deleted" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "oauth": { | |
| "type": "object", | |
| "properties": { | |
| "clientId": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "clientId" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "createdAt", | |
| "type", | |
| "message", | |
| "author" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "Array of audit log events", | |
| "headers": { | |
| "Content-Disposition": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| }, | |
| "description": "The filename of the exported audit log" | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "q", | |
| "in": "query", | |
| "schema": { | |
| "examples": [ | |
| "author:huggingface", | |
| "ip:127.0.0.0", | |
| "type:repo.create" | |
| ], | |
| "type": "string" | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/resource-groups": { | |
| "get": { | |
| "description": "Retrieve accessible resource groups. Get all resource groups the user has access to.\n\nRequires the org to be Enterprise", | |
| "summary": "Get resource groups", | |
| "tags": [ | |
| "resource-groups" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "description": { | |
| "anyOf": [ | |
| { | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "autoJoin": { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "enabled": { | |
| "const": true | |
| }, | |
| "role": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "enabled", | |
| "role" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "enabled": { | |
| "const": false | |
| } | |
| }, | |
| "required": [ | |
| "enabled" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| "users": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "const": "user" | |
| }, | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "role": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "addedBy": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "_id", | |
| "fullname", | |
| "name", | |
| "avatarUrl", | |
| "role" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "repos": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "dataset", | |
| "model", | |
| "space", | |
| "bucket", | |
| "kernel" | |
| ] | |
| }, | |
| "addedBy": { | |
| "type": "string" | |
| }, | |
| "private": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "type", | |
| "private" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name", | |
| "users", | |
| "repos" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "Resource groups the user has access to" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "post": { | |
| "description": "Create a new resource group in the organization.\n\nRequires the org to be Enterprise", | |
| "summary": "Create a resource group", | |
| "tags": [ | |
| "resource-groups" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string", | |
| "minLength": 1, | |
| "maxLength": 200 | |
| }, | |
| "description": { | |
| "type": "string", | |
| "maxLength": 500 | |
| }, | |
| "users": { | |
| "default": [], | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "user": { | |
| "type": "string" | |
| }, | |
| "role": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "user", | |
| "role" | |
| ] | |
| } | |
| }, | |
| "repos": { | |
| "default": [], | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/RepoId" | |
| } | |
| }, | |
| "autoJoin": { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "enabled": { | |
| "const": true | |
| }, | |
| "role": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "enabled", | |
| "role" | |
| ] | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "enabled": { | |
| "const": false | |
| } | |
| }, | |
| "required": [ | |
| "enabled" | |
| ] | |
| } | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "name" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "description": { | |
| "anyOf": [ | |
| { | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "autoJoin": { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "enabled": { | |
| "const": true | |
| }, | |
| "role": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "enabled", | |
| "role" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "enabled": { | |
| "const": false | |
| } | |
| }, | |
| "required": [ | |
| "enabled" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| "users": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "const": "user" | |
| }, | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "role": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "addedBy": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "_id", | |
| "fullname", | |
| "name", | |
| "avatarUrl", | |
| "role" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "repos": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "dataset", | |
| "model", | |
| "space", | |
| "bucket", | |
| "kernel" | |
| ] | |
| }, | |
| "addedBy": { | |
| "type": "string" | |
| }, | |
| "private": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "type", | |
| "private" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name", | |
| "users", | |
| "repos" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The created resource group" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/avatar": { | |
| "get": { | |
| "description": "Retrieve organization avatar. This endpoint returns a JSON with the avatar URL for the organization.\n\nIf called with the `Sec-Fetch-Dest: image` header, it instead redirects to the avatar URL", | |
| "summary": "Get avatar", | |
| "tags": [ | |
| "orgs" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string", | |
| "format": "uri" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Avatar URL" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "redirect", | |
| "in": "query", | |
| "schema": { | |
| "description": "Redirect to the avatar url instead of returning it" | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/members": { | |
| "get": { | |
| "description": "Get a list of members for the organization with optional search and pagination.", | |
| "summary": "Get organization members", | |
| "tags": [ | |
| "orgs" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "user": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "role": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "resourceGroups": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| }, | |
| "role": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "id", | |
| "numUsers", | |
| "role" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "twoFaEnabled": { | |
| "type": "boolean" | |
| }, | |
| "verifiedEmail": { | |
| "description": "The user's SSO email, if the org has a Team or Enterprise plan and the requester is an admin", | |
| "anyOf": [ | |
| { | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "isExternalCollaborator": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "isPro", | |
| "user", | |
| "type", | |
| "_id" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "Array of organization members", | |
| "headers": { | |
| "Link": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| }, | |
| "description": "Link header for pagination, can contain a `rel=\"next\"` link" | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "search", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "email", | |
| "in": "query", | |
| "schema": { | |
| "type": "string", | |
| "format": "email", | |
| "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "cursor", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "limit", | |
| "in": "query", | |
| "schema": { | |
| "default": 500, | |
| "type": "integer", | |
| "minimum": 10, | |
| "maximum": 10000 | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/members/{username}/role": { | |
| "put": { | |
| "description": "Change the role of a member in the organization. Need a paid plan.", | |
| "summary": "Change member role", | |
| "tags": [ | |
| "orgs" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "role": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "resourceGroups": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-fA-F]{24}$" | |
| }, | |
| "role": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "role" | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "role" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "username", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/scim/v2/ServiceProviderConfig": { | |
| "get": { | |
| "description": "Returns the SCIM 2.0 Service Provider configuration, describing the server's capabilities and supported authentication schemes.", | |
| "summary": "Get SCIM Service Provider Configuration", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "documentationUri": { | |
| "type": "string" | |
| }, | |
| "patch": { | |
| "type": "object", | |
| "properties": { | |
| "supported": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "supported" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "bulk": { | |
| "type": "object", | |
| "properties": { | |
| "supported": { | |
| "type": "boolean" | |
| }, | |
| "maxOperations": { | |
| "type": "number" | |
| }, | |
| "maxPayloadSize": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "supported", | |
| "maxOperations", | |
| "maxPayloadSize" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "filter": { | |
| "type": "object", | |
| "properties": { | |
| "supported": { | |
| "type": "boolean" | |
| }, | |
| "maxResults": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "supported", | |
| "maxResults" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "changePassword": { | |
| "type": "object", | |
| "properties": { | |
| "supported": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "supported" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "sort": { | |
| "type": "object", | |
| "properties": { | |
| "supported": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "supported" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "etag": { | |
| "type": "object", | |
| "properties": { | |
| "supported": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "supported" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "authenticationSchemes": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "description": { | |
| "type": "string" | |
| }, | |
| "specUri": { | |
| "type": "string" | |
| }, | |
| "documentationUri": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "name", | |
| "description", | |
| "specUri", | |
| "documentationUri" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "type": "string" | |
| }, | |
| "location": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "documentationUri", | |
| "patch", | |
| "bulk", | |
| "filter", | |
| "changePassword", | |
| "sort", | |
| "etag", | |
| "authenticationSchemes", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM Service Provider Configuration" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/scim/v2/ResourceTypes": { | |
| "get": { | |
| "description": "Returns the list of SCIM 2.0 resource types supported by this server (User and Group).", | |
| "summary": "Get SCIM Resource Types", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "description": { | |
| "type": "string" | |
| }, | |
| "endpoint": { | |
| "type": "string" | |
| }, | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "type": "string" | |
| }, | |
| "location": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "name", | |
| "description", | |
| "endpoint", | |
| "schema", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "SCIM Resource Types" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/scim/v2/Schemas": { | |
| "get": { | |
| "description": "Returns the SCIM 2.0 schema definitions for User and Group resources.", | |
| "summary": "Get SCIM Schemas", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "description": { | |
| "type": "string" | |
| }, | |
| "attributes": { | |
| "type": "array", | |
| "items": {} | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "type": "string" | |
| }, | |
| "location": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "name", | |
| "description", | |
| "attributes", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "SCIM Schema Definitions" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/scim/v2/Schemas/{schemaId}": { | |
| "get": { | |
| "description": "Returns a single SCIM 2.0 schema definition by its schema URI.", | |
| "summary": "Get SCIM Schema by ID", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "description": { | |
| "type": "string" | |
| }, | |
| "attributes": { | |
| "type": "array", | |
| "items": {} | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "type": "string" | |
| }, | |
| "location": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "name", | |
| "description", | |
| "attributes", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM Schema Definition" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "schemaId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/scim/v2/Users": { | |
| "get": { | |
| "description": "Retrieves a paginated list of all organization members who have been set up, including disabled users. If you provide the filter parameter, the resources for all matching members are returned.", | |
| "summary": "List SCIM users", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:api:messages:2.0:ListResponse" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:api:messages:2.0:ListResponse" | |
| ] | |
| } | |
| }, | |
| "totalResults": { | |
| "examples": [ | |
| 100 | |
| ], | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "itemsPerPage": { | |
| "examples": [ | |
| 100 | |
| ], | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "startIndex": { | |
| "examples": [ | |
| 1 | |
| ], | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "Resources": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "userName": { | |
| "examples": [ | |
| "username" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "username (equals to userName)" | |
| ], | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "object", | |
| "properties": { | |
| "givenName": { | |
| "examples": [ | |
| "John" | |
| ], | |
| "type": "string" | |
| }, | |
| "familyName": { | |
| "examples": [ | |
| "Doe" | |
| ], | |
| "type": "string" | |
| }, | |
| "formatted": { | |
| "examples": [ | |
| "John Doe" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "givenName", | |
| "familyName", | |
| "formatted" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "emails": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "examples": [ | |
| "john.doe@example.com" | |
| ], | |
| "type": "string" | |
| }, | |
| "primary": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "type": { | |
| "examples": [ | |
| "work" | |
| ], | |
| "description": "We only support work emails, other types are converted to work", | |
| "enum": [ | |
| "work" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "value", | |
| "primary" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "active": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "User" | |
| ], | |
| "enum": [ | |
| "User" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Users/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "externalId", | |
| "userName", | |
| "displayName", | |
| "name", | |
| "emails", | |
| "active", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "totalResults", | |
| "itemsPerPage", | |
| "startIndex", | |
| "Resources" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM User List" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "startIndex", | |
| "in": "query", | |
| "schema": { | |
| "default": 1, | |
| "type": "number", | |
| "minimum": 1 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "count", | |
| "in": "query", | |
| "schema": { | |
| "default": 1000, | |
| "type": "number", | |
| "minimum": 1, | |
| "maximum": 1000 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "filter", | |
| "in": "query", | |
| "schema": { | |
| "description": "You can filter results using the equals operator (eq) to find items that match specific values like `id`, `userName`, `emails`, and `externalId`. For example, to find a user named Bob, use this search: `?filter=userName%20eq%20Bob`", | |
| "default": "", | |
| "type": "string" | |
| }, | |
| "required": false | |
| } | |
| ] | |
| }, | |
| "post": { | |
| "description": "Creates a new user in the organization. If the user already exists, only `active` field will be updated to provision the user.", | |
| "summary": "Create a SCIM user", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "userName": { | |
| "description": "Username for the user, it should respect the hub rules: No consecutive dashes, No digit-only, Does not start or end with a dash, Only dashes, letters or numbers, Not 24 chars hex string", | |
| "type": "string", | |
| "minLength": 2, | |
| "maxLength": 42, | |
| "pattern": "^\\b(?!\\d+$)(?![0-9a-fA-F]{24}$)([a-zA-Z0-9]|-(?!-))+\\b$" | |
| }, | |
| "emails": { | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string", | |
| "format": "email", | |
| "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ] | |
| } | |
| }, | |
| "name": { | |
| "type": "object", | |
| "properties": { | |
| "givenName": { | |
| "type": "string", | |
| "minLength": 1 | |
| }, | |
| "familyName": { | |
| "type": "string", | |
| "minLength": 1 | |
| } | |
| }, | |
| "required": [ | |
| "givenName", | |
| "familyName" | |
| ] | |
| }, | |
| "active": { | |
| "default": true, | |
| "type": "boolean" | |
| }, | |
| "externalId": { | |
| "description": "External ID for the user, it must be unique within the organization and is required for managed users", | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "userName", | |
| "emails", | |
| "name", | |
| "externalId" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "201": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "userName": { | |
| "examples": [ | |
| "username" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "username (equals to userName)" | |
| ], | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "object", | |
| "properties": { | |
| "givenName": { | |
| "examples": [ | |
| "John" | |
| ], | |
| "type": "string" | |
| }, | |
| "familyName": { | |
| "examples": [ | |
| "Doe" | |
| ], | |
| "type": "string" | |
| }, | |
| "formatted": { | |
| "examples": [ | |
| "John Doe" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "givenName", | |
| "familyName", | |
| "formatted" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "emails": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "examples": [ | |
| "john.doe@example.com" | |
| ], | |
| "type": "string" | |
| }, | |
| "primary": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "type": { | |
| "examples": [ | |
| "work" | |
| ], | |
| "description": "We only support work emails, other types are converted to work", | |
| "enum": [ | |
| "work" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "value", | |
| "primary" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "active": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "User" | |
| ], | |
| "enum": [ | |
| "User" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Users/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "externalId", | |
| "userName", | |
| "displayName", | |
| "name", | |
| "emails", | |
| "active", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM User" | |
| }, | |
| "409": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema" | |
| } | |
| } | |
| }, | |
| "description": "SCIM User already exists" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/scim/v2/Users/{userId}": { | |
| "get": { | |
| "description": "Retrieves a SCIM user by their ID.", | |
| "summary": "Get a SCIM user", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "userName": { | |
| "examples": [ | |
| "username" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "username (equals to userName)" | |
| ], | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "object", | |
| "properties": { | |
| "givenName": { | |
| "examples": [ | |
| "John" | |
| ], | |
| "type": "string" | |
| }, | |
| "familyName": { | |
| "examples": [ | |
| "Doe" | |
| ], | |
| "type": "string" | |
| }, | |
| "formatted": { | |
| "examples": [ | |
| "John Doe" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "givenName", | |
| "familyName", | |
| "formatted" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "emails": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "examples": [ | |
| "john.doe@example.com" | |
| ], | |
| "type": "string" | |
| }, | |
| "primary": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "type": { | |
| "examples": [ | |
| "work" | |
| ], | |
| "description": "We only support work emails, other types are converted to work", | |
| "enum": [ | |
| "work" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "value", | |
| "primary" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "active": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "User" | |
| ], | |
| "enum": [ | |
| "User" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Users/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "externalId", | |
| "userName", | |
| "displayName", | |
| "name", | |
| "emails", | |
| "active", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM User" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "userId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "patch": { | |
| "description": "Update an attribute of a SCIM user. Modify individual attributes using Operations format. Just provide the changes you want to make using add, remove (only `externalId` is supported), or replace operations.\n If you set `active` to `false`, the user will be deprovisioned from the organization. \nComplicated SCIM `path` values are not supported like `emails[type eq 'work'].value`.", | |
| "summary": "Update SCIM user", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:api:messages:2.0:PatchOp" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "const": "urn:ietf:params:scim:api:messages:2.0:PatchOp" | |
| } | |
| }, | |
| "Operations": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "op": { | |
| "type": "string" | |
| }, | |
| "path": { | |
| "enum": [ | |
| "active", | |
| "externalId", | |
| "userName", | |
| "emails[type eq \"work\"].value", | |
| "name.givenName", | |
| "name.familyName" | |
| ] | |
| }, | |
| "value": {} | |
| }, | |
| "required": [ | |
| "op", | |
| "value" | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "Operations" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "userName": { | |
| "examples": [ | |
| "username" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "username (equals to userName)" | |
| ], | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "object", | |
| "properties": { | |
| "givenName": { | |
| "examples": [ | |
| "John" | |
| ], | |
| "type": "string" | |
| }, | |
| "familyName": { | |
| "examples": [ | |
| "Doe" | |
| ], | |
| "type": "string" | |
| }, | |
| "formatted": { | |
| "examples": [ | |
| "John Doe" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "givenName", | |
| "familyName", | |
| "formatted" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "emails": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "examples": [ | |
| "john.doe@example.com" | |
| ], | |
| "type": "string" | |
| }, | |
| "primary": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "type": { | |
| "examples": [ | |
| "work" | |
| ], | |
| "description": "We only support work emails, other types are converted to work", | |
| "enum": [ | |
| "work" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "value", | |
| "primary" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "active": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "User" | |
| ], | |
| "enum": [ | |
| "User" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Users/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "externalId", | |
| "userName", | |
| "displayName", | |
| "name", | |
| "emails", | |
| "active", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM User" | |
| }, | |
| "409": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema" | |
| } | |
| } | |
| }, | |
| "description": "User already exists" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "userId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "put": { | |
| "description": "Updates a provisioned user, you'll need to provide all their information fresh - just like setting them up for the first time. Any details you don't include will be automatically removed, so make sure to include everything they need to keep their account running smoothly. Setting `active` to `false` will deprovision the user from the organization.", | |
| "summary": "Update a SCIM user", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "userName": { | |
| "description": "Username for the user, it should respect the hub rules: No consecutive dashes, No digit-only, Does not start or end with a dash, Only dashes, letters or numbers, Not 24 chars hex string", | |
| "type": "string", | |
| "minLength": 2, | |
| "maxLength": 42, | |
| "pattern": "^\\b(?!\\d+$)(?![0-9a-fA-F]{24}$)([a-zA-Z0-9]|-(?!-))+\\b$" | |
| }, | |
| "emails": { | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string", | |
| "format": "email", | |
| "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ] | |
| } | |
| }, | |
| "name": { | |
| "type": "object", | |
| "properties": { | |
| "givenName": { | |
| "type": "string", | |
| "minLength": 1 | |
| }, | |
| "familyName": { | |
| "type": "string", | |
| "minLength": 1 | |
| } | |
| }, | |
| "required": [ | |
| "givenName", | |
| "familyName" | |
| ] | |
| }, | |
| "active": { | |
| "default": true, | |
| "type": "boolean" | |
| }, | |
| "externalId": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "userName", | |
| "emails", | |
| "name", | |
| "externalId" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "userName": { | |
| "examples": [ | |
| "username" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "username (equals to userName)" | |
| ], | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "object", | |
| "properties": { | |
| "givenName": { | |
| "examples": [ | |
| "John" | |
| ], | |
| "type": "string" | |
| }, | |
| "familyName": { | |
| "examples": [ | |
| "Doe" | |
| ], | |
| "type": "string" | |
| }, | |
| "formatted": { | |
| "examples": [ | |
| "John Doe" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "givenName", | |
| "familyName", | |
| "formatted" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "emails": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "examples": [ | |
| "john.doe@example.com" | |
| ], | |
| "type": "string" | |
| }, | |
| "primary": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "type": { | |
| "examples": [ | |
| "work" | |
| ], | |
| "description": "We only support work emails, other types are converted to work", | |
| "enum": [ | |
| "work" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "value", | |
| "primary" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "active": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "User" | |
| ], | |
| "enum": [ | |
| "User" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Users/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "externalId", | |
| "userName", | |
| "displayName", | |
| "name", | |
| "emails", | |
| "active", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM User" | |
| }, | |
| "409": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema" | |
| } | |
| } | |
| }, | |
| "description": "User already exists" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "userId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "delete": { | |
| "summary": "Delete a SCIM user", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "responses": { | |
| "204": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema" | |
| } | |
| } | |
| }, | |
| "description": "User deleted" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "userId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/scim/v2/Groups": { | |
| "get": { | |
| "description": "Get a list of SCIM groups. Retrieves a paginated list of all organization groups. If you provide the filter parameter, the resources for all matching groups are returned.", | |
| "summary": "List SCIM groups", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:api:messages:2.0:ListResponse" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:api:messages:2.0:ListResponse" | |
| ] | |
| } | |
| }, | |
| "totalResults": { | |
| "examples": [ | |
| 100 | |
| ], | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "itemsPerPage": { | |
| "examples": [ | |
| 100 | |
| ], | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "startIndex": { | |
| "examples": [ | |
| 1 | |
| ], | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "Resources": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "Group 1" | |
| ], | |
| "type": "string" | |
| }, | |
| "members": { | |
| "examples": [ | |
| [ | |
| { | |
| "value": "john" | |
| } | |
| ] | |
| ], | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "Group" | |
| ], | |
| "enum": [ | |
| "Group" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Groups/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "displayName", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "totalResults", | |
| "itemsPerPage", | |
| "startIndex", | |
| "Resources" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM Group List" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "startIndex", | |
| "in": "query", | |
| "schema": { | |
| "default": 1, | |
| "type": "number", | |
| "minimum": 1 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "count", | |
| "in": "query", | |
| "schema": { | |
| "default": 1000, | |
| "type": "number", | |
| "minimum": 1, | |
| "maximum": 1000 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "filter", | |
| "in": "query", | |
| "schema": { | |
| "default": "", | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "excludedAttributes", | |
| "in": "query", | |
| "schema": { | |
| "const": "members" | |
| }, | |
| "required": false | |
| } | |
| ] | |
| }, | |
| "post": { | |
| "description": "Creates a new group in the organization. The group name must be unique within the organization.", | |
| "summary": "Create a SCIM group", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "displayName": { | |
| "type": "string" | |
| }, | |
| "externalId": { | |
| "type": "string" | |
| }, | |
| "members": { | |
| "description": "Array of SCIM user ids", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-fA-F]{24}$" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "displayName", | |
| "members" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "201": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "Group 1" | |
| ], | |
| "type": "string" | |
| }, | |
| "members": { | |
| "examples": [ | |
| [ | |
| { | |
| "value": "john" | |
| } | |
| ] | |
| ], | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "Group" | |
| ], | |
| "enum": [ | |
| "Group" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Groups/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "displayName", | |
| "members", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM Group" | |
| }, | |
| "409": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema" | |
| } | |
| } | |
| }, | |
| "description": "Group already exists" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/scim/v2/Groups/{groupId}": { | |
| "get": { | |
| "description": "Retrieves a group by its ID. If you provide the `excludedAttributes` parameter, the `members` attribute is not returned.", | |
| "summary": "Get a SCIM group", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "Group 1" | |
| ], | |
| "type": "string" | |
| }, | |
| "members": { | |
| "examples": [ | |
| [ | |
| { | |
| "value": "john" | |
| } | |
| ] | |
| ], | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "Group" | |
| ], | |
| "enum": [ | |
| "Group" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Groups/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "displayName", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM Group" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "groupId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "excludedAttributes", | |
| "in": "query", | |
| "schema": { | |
| "const": "members" | |
| }, | |
| "required": false | |
| } | |
| ] | |
| }, | |
| "put": { | |
| "description": "Updates a group by its ID. The group name must be unique within the organization.", | |
| "summary": "Update a SCIM group", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "const": "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| } | |
| }, | |
| "displayName": { | |
| "type": "string" | |
| }, | |
| "externalId": { | |
| "type": "string" | |
| }, | |
| "members": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-fA-F]{24}$" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "displayName", | |
| "members" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "Group 1" | |
| ], | |
| "type": "string" | |
| }, | |
| "members": { | |
| "examples": [ | |
| [ | |
| { | |
| "value": "john" | |
| } | |
| ] | |
| ], | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "Group" | |
| ], | |
| "enum": [ | |
| "Group" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Groups/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "displayName", | |
| "members", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM Group" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "groupId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "patch": { | |
| "description": "Update attributes of a SCIM group. Updates individual attributes using Operations format. Just provide the changes you want to make using add, remove (only `members` is supported), or replace operations.", | |
| "summary": "Update SCIM group", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:api:messages:2.0:PatchOp" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "const": "urn:ietf:params:scim:api:messages:2.0:PatchOp" | |
| } | |
| }, | |
| "Operations": { | |
| "type": "array", | |
| "items": { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "op": { | |
| "type": "string" | |
| }, | |
| "path": { | |
| "type": "string" | |
| }, | |
| "value": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "op", | |
| "path" | |
| ] | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "op": { | |
| "type": "string" | |
| }, | |
| "path": { | |
| "type": "string" | |
| }, | |
| "value": {} | |
| }, | |
| "required": [ | |
| "op", | |
| "value" | |
| ] | |
| } | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "Operations" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "Group 1" | |
| ], | |
| "type": "string" | |
| }, | |
| "members": { | |
| "examples": [ | |
| [ | |
| { | |
| "value": "john" | |
| } | |
| ] | |
| ], | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "Group" | |
| ], | |
| "enum": [ | |
| "Group" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Groups/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "displayName", | |
| "members", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM Group" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "groupId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "delete": { | |
| "summary": "Delete a SCIM group", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "responses": { | |
| "204": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema" | |
| } | |
| } | |
| }, | |
| "description": "SCIM Group deleted" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "groupId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/scim-provisioning/v2/Users": { | |
| "get": { | |
| "description": "Retrieves a paginated list of organization members and pending invitations managed by SCIM for non-managed organizations.", | |
| "summary": "List SCIM-managed users", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:api:messages:2.0:ListResponse" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:api:messages:2.0:ListResponse" | |
| ] | |
| } | |
| }, | |
| "totalResults": { | |
| "examples": [ | |
| 100 | |
| ], | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "itemsPerPage": { | |
| "examples": [ | |
| 100 | |
| ], | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "startIndex": { | |
| "examples": [ | |
| 1 | |
| ], | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "Resources": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "userName": { | |
| "examples": [ | |
| "username" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "username (equals to userName)" | |
| ], | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "object", | |
| "properties": { | |
| "givenName": { | |
| "examples": [ | |
| "John" | |
| ], | |
| "type": "string" | |
| }, | |
| "familyName": { | |
| "examples": [ | |
| "Doe" | |
| ], | |
| "type": "string" | |
| }, | |
| "formatted": { | |
| "examples": [ | |
| "John Doe" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "givenName", | |
| "familyName", | |
| "formatted" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "emails": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "examples": [ | |
| "john.doe@example.com" | |
| ], | |
| "type": "string" | |
| }, | |
| "primary": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "type": { | |
| "examples": [ | |
| "work" | |
| ], | |
| "description": "We only support work emails, other types are converted to work", | |
| "enum": [ | |
| "work" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "value", | |
| "primary" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "active": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "User" | |
| ], | |
| "enum": [ | |
| "User" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Users/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "externalId", | |
| "userName", | |
| "displayName", | |
| "name", | |
| "emails", | |
| "active", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "totalResults", | |
| "itemsPerPage", | |
| "startIndex", | |
| "Resources" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM User List" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "startIndex", | |
| "in": "query", | |
| "schema": { | |
| "default": 1, | |
| "type": "number", | |
| "minimum": 1 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "count", | |
| "in": "query", | |
| "schema": { | |
| "default": 1000, | |
| "type": "number", | |
| "minimum": 1, | |
| "maximum": 1000 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "filter", | |
| "in": "query", | |
| "schema": { | |
| "description": "You can filter results using the equals operator (eq) to find items that match specific values like `id`, `userName`, `emails`, and `externalId`. For example, to find a user named Bob, use this search: `?filter=userName%20eq%20Bob`", | |
| "default": "", | |
| "type": "string" | |
| }, | |
| "required": false | |
| } | |
| ] | |
| }, | |
| "post": { | |
| "description": "Creates an invitation for a user to join the organization. The user must have an existing Hugging Face account.", | |
| "summary": "Create a SCIM provisioning user invitation", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "userName": { | |
| "description": "Username of the existing Hugging Face user", | |
| "type": "string", | |
| "minLength": 2, | |
| "maxLength": 42, | |
| "pattern": "^\\b(?!\\d+$)(?![0-9a-fA-F]{24}$)([a-zA-Z0-9]|-(?!-))+\\b$" | |
| }, | |
| "emails": { | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string", | |
| "format": "email", | |
| "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ] | |
| } | |
| }, | |
| "active": { | |
| "default": true, | |
| "type": "boolean" | |
| }, | |
| "externalId": { | |
| "description": "SSO unique identifier (SAML nameid or OIDC sub claim) - required for SSO login", | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "userName", | |
| "emails", | |
| "externalId" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "201": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "userName": { | |
| "examples": [ | |
| "username" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "username (equals to userName)" | |
| ], | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "object", | |
| "properties": { | |
| "givenName": { | |
| "examples": [ | |
| "John" | |
| ], | |
| "type": "string" | |
| }, | |
| "familyName": { | |
| "examples": [ | |
| "Doe" | |
| ], | |
| "type": "string" | |
| }, | |
| "formatted": { | |
| "examples": [ | |
| "John Doe" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "givenName", | |
| "familyName", | |
| "formatted" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "emails": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "examples": [ | |
| "john.doe@example.com" | |
| ], | |
| "type": "string" | |
| }, | |
| "primary": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "type": { | |
| "examples": [ | |
| "work" | |
| ], | |
| "description": "We only support work emails, other types are converted to work", | |
| "enum": [ | |
| "work" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "value", | |
| "primary" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "active": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "User" | |
| ], | |
| "enum": [ | |
| "User" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Users/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "externalId", | |
| "userName", | |
| "displayName", | |
| "name", | |
| "emails", | |
| "active", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM User" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/scim-provisioning/v2/Users/{userId}": { | |
| "get": { | |
| "description": "Retrieves a SCIM user by their ID for non-managed organizations.", | |
| "summary": "Get a SCIM provisioning user", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "userName": { | |
| "examples": [ | |
| "username" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "username (equals to userName)" | |
| ], | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "object", | |
| "properties": { | |
| "givenName": { | |
| "examples": [ | |
| "John" | |
| ], | |
| "type": "string" | |
| }, | |
| "familyName": { | |
| "examples": [ | |
| "Doe" | |
| ], | |
| "type": "string" | |
| }, | |
| "formatted": { | |
| "examples": [ | |
| "John Doe" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "givenName", | |
| "familyName", | |
| "formatted" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "emails": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "examples": [ | |
| "john.doe@example.com" | |
| ], | |
| "type": "string" | |
| }, | |
| "primary": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "type": { | |
| "examples": [ | |
| "work" | |
| ], | |
| "description": "We only support work emails, other types are converted to work", | |
| "enum": [ | |
| "work" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "value", | |
| "primary" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "active": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "User" | |
| ], | |
| "enum": [ | |
| "User" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Users/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "externalId", | |
| "userName", | |
| "displayName", | |
| "name", | |
| "emails", | |
| "active", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM User" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "userId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "patch": { | |
| "description": "Modify individual attributes for non-managed organizations. Only the `active` field can be modified. User profile fields are not editable via SCIM.", | |
| "summary": "Update an attribute of a SCIM provisioning user", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:api:messages:2.0:PatchOp" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "const": "urn:ietf:params:scim:api:messages:2.0:PatchOp" | |
| } | |
| }, | |
| "Operations": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "op": { | |
| "description": "`remove` operation is not supported for non-managed organizations", | |
| "enum": [ | |
| "add", | |
| "remove", | |
| "replace" | |
| ] | |
| }, | |
| "path": { | |
| "enum": [ | |
| "active", | |
| "externalId", | |
| "userName", | |
| "emails[type eq \"work\"].value", | |
| "name.givenName", | |
| "name.familyName" | |
| ] | |
| }, | |
| "value": {} | |
| }, | |
| "required": [ | |
| "op", | |
| "value" | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "Operations" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "userName": { | |
| "examples": [ | |
| "username" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "username (equals to userName)" | |
| ], | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "object", | |
| "properties": { | |
| "givenName": { | |
| "examples": [ | |
| "John" | |
| ], | |
| "type": "string" | |
| }, | |
| "familyName": { | |
| "examples": [ | |
| "Doe" | |
| ], | |
| "type": "string" | |
| }, | |
| "formatted": { | |
| "examples": [ | |
| "John Doe" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "givenName", | |
| "familyName", | |
| "formatted" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "emails": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "examples": [ | |
| "john.doe@example.com" | |
| ], | |
| "type": "string" | |
| }, | |
| "primary": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "type": { | |
| "examples": [ | |
| "work" | |
| ], | |
| "description": "We only support work emails, other types are converted to work", | |
| "enum": [ | |
| "work" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "value", | |
| "primary" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "active": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "User" | |
| ], | |
| "enum": [ | |
| "User" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Users/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "externalId", | |
| "userName", | |
| "displayName", | |
| "name", | |
| "emails", | |
| "active", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM User" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "userId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "put": { | |
| "description": "Updates a provisioned user's invitation for non-managed organizations. User profile fields are not editable via SCIM for non-managed organizations.", | |
| "summary": "Update a SCIM provisioning user", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "active": { | |
| "default": true, | |
| "type": "boolean" | |
| }, | |
| "externalId": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "externalId" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:User" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "userName": { | |
| "examples": [ | |
| "username" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "username (equals to userName)" | |
| ], | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "object", | |
| "properties": { | |
| "givenName": { | |
| "examples": [ | |
| "John" | |
| ], | |
| "type": "string" | |
| }, | |
| "familyName": { | |
| "examples": [ | |
| "Doe" | |
| ], | |
| "type": "string" | |
| }, | |
| "formatted": { | |
| "examples": [ | |
| "John Doe" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "givenName", | |
| "familyName", | |
| "formatted" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "emails": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "examples": [ | |
| "john.doe@example.com" | |
| ], | |
| "type": "string" | |
| }, | |
| "primary": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "type": { | |
| "examples": [ | |
| "work" | |
| ], | |
| "description": "We only support work emails, other types are converted to work", | |
| "enum": [ | |
| "work" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "value", | |
| "primary" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "active": { | |
| "examples": [ | |
| true | |
| ], | |
| "type": "boolean" | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "User" | |
| ], | |
| "enum": [ | |
| "User" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Users/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "externalId", | |
| "userName", | |
| "displayName", | |
| "name", | |
| "emails", | |
| "active", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM User" | |
| }, | |
| "409": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema" | |
| } | |
| } | |
| }, | |
| "description": "User already exists" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "userId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "delete": { | |
| "description": "Removes a user from the organization and deletes any pending invitations for non-managed organizations.", | |
| "summary": "Delete a SCIM provisioning user", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "responses": { | |
| "204": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema" | |
| } | |
| } | |
| }, | |
| "description": "User removed from organization" | |
| }, | |
| "404": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema" | |
| } | |
| } | |
| }, | |
| "description": "User not found or not provisioned" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "userId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/scim-provisioning/v2/Groups": { | |
| "get": { | |
| "description": "Get a list of SCIM groups. Retrieves a paginated list of all organization groups. If you provide the filter parameter, the resources for all matching groups are returned.", | |
| "summary": "List SCIM groups", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:api:messages:2.0:ListResponse" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:api:messages:2.0:ListResponse" | |
| ] | |
| } | |
| }, | |
| "totalResults": { | |
| "examples": [ | |
| 100 | |
| ], | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "itemsPerPage": { | |
| "examples": [ | |
| 100 | |
| ], | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "startIndex": { | |
| "examples": [ | |
| 1 | |
| ], | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "Resources": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "Group 1" | |
| ], | |
| "type": "string" | |
| }, | |
| "members": { | |
| "examples": [ | |
| [ | |
| { | |
| "value": "john" | |
| } | |
| ] | |
| ], | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "Group" | |
| ], | |
| "enum": [ | |
| "Group" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Groups/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "displayName", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "totalResults", | |
| "itemsPerPage", | |
| "startIndex", | |
| "Resources" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM Group List" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "startIndex", | |
| "in": "query", | |
| "schema": { | |
| "default": 1, | |
| "type": "number", | |
| "minimum": 1 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "count", | |
| "in": "query", | |
| "schema": { | |
| "default": 1000, | |
| "type": "number", | |
| "minimum": 1, | |
| "maximum": 1000 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "filter", | |
| "in": "query", | |
| "schema": { | |
| "default": "", | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "excludedAttributes", | |
| "in": "query", | |
| "schema": { | |
| "const": "members" | |
| }, | |
| "required": false | |
| } | |
| ] | |
| }, | |
| "post": { | |
| "description": "Creates a new group in the organization. The group name must be unique within the organization.", | |
| "summary": "Create a SCIM group", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "displayName": { | |
| "type": "string" | |
| }, | |
| "externalId": { | |
| "type": "string" | |
| }, | |
| "members": { | |
| "description": "Array of SCIM user ids", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-fA-F]{24}$" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "displayName", | |
| "members" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "201": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "Group 1" | |
| ], | |
| "type": "string" | |
| }, | |
| "members": { | |
| "examples": [ | |
| [ | |
| { | |
| "value": "john" | |
| } | |
| ] | |
| ], | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "Group" | |
| ], | |
| "enum": [ | |
| "Group" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Groups/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "displayName", | |
| "members", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM Group" | |
| }, | |
| "409": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema" | |
| } | |
| } | |
| }, | |
| "description": "Group already exists" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/scim-provisioning/v2/Groups/{groupId}": { | |
| "get": { | |
| "description": "Retrieves a group by its ID. If you provide the `excludedAttributes` parameter, the `members` attribute is not returned.", | |
| "summary": "Get a SCIM group", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "Group 1" | |
| ], | |
| "type": "string" | |
| }, | |
| "members": { | |
| "examples": [ | |
| [ | |
| { | |
| "value": "john" | |
| } | |
| ] | |
| ], | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "Group" | |
| ], | |
| "enum": [ | |
| "Group" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Groups/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "displayName", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM Group" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "groupId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "excludedAttributes", | |
| "in": "query", | |
| "schema": { | |
| "const": "members" | |
| }, | |
| "required": false | |
| } | |
| ] | |
| }, | |
| "put": { | |
| "description": "Updates a group by its ID. The group name must be unique within the organization.", | |
| "summary": "Update a SCIM group", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "const": "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| } | |
| }, | |
| "displayName": { | |
| "type": "string" | |
| }, | |
| "externalId": { | |
| "type": "string" | |
| }, | |
| "members": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-fA-F]{24}$" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "displayName", | |
| "members" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "Group 1" | |
| ], | |
| "type": "string" | |
| }, | |
| "members": { | |
| "examples": [ | |
| [ | |
| { | |
| "value": "john" | |
| } | |
| ] | |
| ], | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "Group" | |
| ], | |
| "enum": [ | |
| "Group" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Groups/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "displayName", | |
| "members", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM Group" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "groupId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "patch": { | |
| "description": "Update attributes of a SCIM group. Updates individual attributes using Operations format. Just provide the changes you want to make using add, remove (only `members` is supported), or replace operations.", | |
| "summary": "Update SCIM group", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:api:messages:2.0:PatchOp" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "type": "array", | |
| "items": { | |
| "const": "urn:ietf:params:scim:api:messages:2.0:PatchOp" | |
| } | |
| }, | |
| "Operations": { | |
| "type": "array", | |
| "items": { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "op": { | |
| "type": "string" | |
| }, | |
| "path": { | |
| "type": "string" | |
| }, | |
| "value": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "op", | |
| "path" | |
| ] | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "op": { | |
| "type": "string" | |
| }, | |
| "path": { | |
| "type": "string" | |
| }, | |
| "value": {} | |
| }, | |
| "required": [ | |
| "op", | |
| "value" | |
| ] | |
| } | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "Operations" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "schemas": { | |
| "examples": [ | |
| [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| ], | |
| "minItems": 1, | |
| "maxItems": 1, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:scim:schemas:core:2.0:Group" | |
| ] | |
| } | |
| }, | |
| "id": { | |
| "examples": [ | |
| "123" | |
| ], | |
| "type": "string" | |
| }, | |
| "displayName": { | |
| "examples": [ | |
| "Group 1" | |
| ], | |
| "type": "string" | |
| }, | |
| "members": { | |
| "examples": [ | |
| [ | |
| { | |
| "value": "john" | |
| } | |
| ] | |
| ], | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "value": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "value" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "externalId": { | |
| "anyOf": [ | |
| { | |
| "examples": [ | |
| "unique-identifier" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "properties": { | |
| "resourceType": { | |
| "examples": [ | |
| "Group" | |
| ], | |
| "enum": [ | |
| "Group" | |
| ] | |
| }, | |
| "location": { | |
| "examples": [ | |
| "https://huggingface.co/api/organizations/:name/scim/v2/Groups/:id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "resourceType", | |
| "location" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "schemas", | |
| "id", | |
| "displayName", | |
| "members", | |
| "meta" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "SCIM Group" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "groupId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "delete": { | |
| "summary": "Delete a SCIM group", | |
| "tags": [ | |
| "scim" | |
| ], | |
| "responses": { | |
| "204": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema" | |
| } | |
| } | |
| }, | |
| "description": "SCIM Group deleted" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "groupId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/oauth/register": { | |
| "post": { | |
| "summary": "Register a new OAuth app", | |
| "tags": [ | |
| "oauth" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "redirect_uris": { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "format": "uri" | |
| } | |
| }, | |
| "client_name": { | |
| "type": "string" | |
| }, | |
| "client_uri": { | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "logo_uri": { | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "scope": { | |
| "type": "string" | |
| }, | |
| "contacts": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "token_endpoint_auth_method": { | |
| "enum": [ | |
| "client_secret_basic", | |
| "none", | |
| "client_secret_post" | |
| ] | |
| }, | |
| "software_id": { | |
| "type": "string" | |
| }, | |
| "software_version": { | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "201": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "client_id": { | |
| "type": "string" | |
| }, | |
| "client_secret": { | |
| "type": "string" | |
| }, | |
| "client_id_issued_at": { | |
| "type": "number" | |
| }, | |
| "client_secret_expires_at": { | |
| "type": "number" | |
| }, | |
| "redirect_uris": { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "format": "uri" | |
| } | |
| }, | |
| "client_name": { | |
| "type": "string" | |
| }, | |
| "client_uri": { | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "logo_uri": { | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "scope": { | |
| "type": "string" | |
| }, | |
| "grant_types": { | |
| "readOnly": true, | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "urn:ietf:params:oauth:grant-type:token-exchange", | |
| "urn:ietf:params:oauth:grant-type:device_code", | |
| "authorization_code", | |
| "refresh_token" | |
| ] | |
| } | |
| }, | |
| "contacts": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "token_endpoint_auth_method": { | |
| "enum": [ | |
| "client_secret_basic", | |
| "none", | |
| "client_secret_post" | |
| ] | |
| }, | |
| "software_id": { | |
| "type": "string" | |
| }, | |
| "software_version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "client_id", | |
| "client_id_issued_at", | |
| "client_secret_expires_at", | |
| "redirect_uris", | |
| "scope", | |
| "grant_types" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Details of the OAuth app that was created" | |
| } | |
| } | |
| } | |
| }, | |
| "/oauth/device": { | |
| "post": { | |
| "summary": "Initiate device authorization", | |
| "tags": [ | |
| "oauth" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "description": "Initiate device authorization as per https://datatracker.ietf.org/doc/html/rfc8628#section-3.1", | |
| "type": "object", | |
| "properties": { | |
| "client_id": { | |
| "type": "string" | |
| }, | |
| "scope": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "client_id" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "device_code": { | |
| "type": "string" | |
| }, | |
| "user_code": { | |
| "type": "string" | |
| }, | |
| "verification_uri": { | |
| "type": "string" | |
| }, | |
| "expires_in": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "device_code", | |
| "user_code", | |
| "verification_uri", | |
| "expires_in" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Details of the device code that was created as per https://datatracker.ietf.org/doc/html/rfc8628#section-3.2" | |
| } | |
| } | |
| } | |
| }, | |
| "/oauth/userinfo": { | |
| "get": { | |
| "description": "Get information about the user. Only available through oauth access tokens. Information varies depending on the scope of the oauth app and what permissions the user granted to the oauth app.", | |
| "summary": "Get user info", | |
| "tags": [ | |
| "oauth" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "sub": { | |
| "description": "ID of the user", | |
| "type": "string" | |
| }, | |
| "name": { | |
| "description": "Full name of the user", | |
| "type": "string" | |
| }, | |
| "preferred_username": { | |
| "description": "Username of the user", | |
| "type": "string" | |
| }, | |
| "profile": { | |
| "description": "Profile URL of the user", | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "picture": { | |
| "description": "Avatar URL of the user", | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "website": { | |
| "description": "Website of the user", | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "email": { | |
| "description": "Email of the user", | |
| "type": "string" | |
| }, | |
| "email_verified": { | |
| "description": "Whether the email is verified", | |
| "type": "boolean" | |
| }, | |
| "isPro": { | |
| "description": "Whether the user is a Pro user", | |
| "type": "boolean" | |
| }, | |
| "canPay": { | |
| "description": "Whether the user has access to billing. You should check `canPay` first.", | |
| "type": "boolean" | |
| }, | |
| "billingMode": { | |
| "description": "Whether the user is on prepaid or postpaid billing", | |
| "enum": [ | |
| "prepaid", | |
| "postpaid" | |
| ] | |
| }, | |
| "orgs": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "sub": { | |
| "description": "ID of the organization", | |
| "type": "string" | |
| }, | |
| "name": { | |
| "description": "Name of the organization", | |
| "type": "string" | |
| }, | |
| "picture": { | |
| "description": "Avatar URL of the organization", | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "preferred_username": { | |
| "description": "Username of the organization", | |
| "type": "string" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "canPay": { | |
| "type": "boolean" | |
| }, | |
| "billingMode": { | |
| "enum": [ | |
| "prepaid", | |
| "postpaid" | |
| ] | |
| }, | |
| "roleInOrg": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "pendingSSO": { | |
| "deprecated": true, | |
| "type": "boolean" | |
| }, | |
| "missingMFA": { | |
| "deprecated": true, | |
| "type": "boolean" | |
| }, | |
| "securityRestrictions": { | |
| "description": "Current security restrictions for accessing data in this organization with current authentication method", | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "mfa", | |
| "token-policy", | |
| "sso", | |
| "ip" | |
| ] | |
| } | |
| }, | |
| "resourceGroups": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "sub": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "role": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "sub", | |
| "name", | |
| "role" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "sub", | |
| "name", | |
| "picture", | |
| "preferred_username" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "sub", | |
| "isPro", | |
| "orgs" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "User info" | |
| } | |
| } | |
| }, | |
| "post": { | |
| "description": "Get information about the user. Only available through oauth access tokens. Information varies depending on the scope of the oauth app and what permissions the user granted to the oauth app.", | |
| "summary": "Get user info", | |
| "tags": [ | |
| "oauth" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "sub": { | |
| "description": "ID of the user", | |
| "type": "string" | |
| }, | |
| "name": { | |
| "description": "Full name of the user", | |
| "type": "string" | |
| }, | |
| "preferred_username": { | |
| "description": "Username of the user", | |
| "type": "string" | |
| }, | |
| "profile": { | |
| "description": "Profile URL of the user", | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "picture": { | |
| "description": "Avatar URL of the user", | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "website": { | |
| "description": "Website of the user", | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "email": { | |
| "description": "Email of the user", | |
| "type": "string" | |
| }, | |
| "email_verified": { | |
| "description": "Whether the email is verified", | |
| "type": "boolean" | |
| }, | |
| "isPro": { | |
| "description": "Whether the user is a Pro user", | |
| "type": "boolean" | |
| }, | |
| "canPay": { | |
| "description": "Whether the user has access to billing. You should check `canPay` first.", | |
| "type": "boolean" | |
| }, | |
| "billingMode": { | |
| "description": "Whether the user is on prepaid or postpaid billing", | |
| "enum": [ | |
| "prepaid", | |
| "postpaid" | |
| ] | |
| }, | |
| "orgs": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "sub": { | |
| "description": "ID of the organization", | |
| "type": "string" | |
| }, | |
| "name": { | |
| "description": "Name of the organization", | |
| "type": "string" | |
| }, | |
| "picture": { | |
| "description": "Avatar URL of the organization", | |
| "type": "string", | |
| "format": "uri" | |
| }, | |
| "preferred_username": { | |
| "description": "Username of the organization", | |
| "type": "string" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "canPay": { | |
| "type": "boolean" | |
| }, | |
| "billingMode": { | |
| "enum": [ | |
| "prepaid", | |
| "postpaid" | |
| ] | |
| }, | |
| "roleInOrg": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "pendingSSO": { | |
| "deprecated": true, | |
| "type": "boolean" | |
| }, | |
| "missingMFA": { | |
| "deprecated": true, | |
| "type": "boolean" | |
| }, | |
| "securityRestrictions": { | |
| "description": "Current security restrictions for accessing data in this organization with current authentication method", | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "mfa", | |
| "token-policy", | |
| "sso", | |
| "ip" | |
| ] | |
| } | |
| }, | |
| "resourceGroups": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "sub": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "role": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "sub", | |
| "name", | |
| "role" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "sub", | |
| "name", | |
| "picture", | |
| "preferred_username" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "sub", | |
| "isPro", | |
| "orgs" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "User info" | |
| } | |
| } | |
| } | |
| }, | |
| "/api/blog/{slug}/comment": { | |
| "post": { | |
| "summary": "Create a new comment", | |
| "tags": [ | |
| "discussions" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "comment": { | |
| "type": "string", | |
| "minLength": 1, | |
| "maxLength": 65536 | |
| } | |
| }, | |
| "required": [ | |
| "comment" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "201": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "newMessage": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "author": { | |
| "allOf": [ | |
| { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| }, | |
| "primaryOrg": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "hasPrivateMembersList": { | |
| "type": "boolean" | |
| }, | |
| "userRole": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "type", | |
| "isHf" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type", | |
| "isPro" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "isOwner": { | |
| "type": "boolean" | |
| }, | |
| "isOrgMember": { | |
| "type": "boolean" | |
| }, | |
| "oauthApp": { | |
| "type": "object", | |
| "properties": { | |
| "imageUrl": { | |
| "type": "string" | |
| }, | |
| "imageData": { | |
| "type": "object", | |
| "properties": { | |
| "emoji": { | |
| "type": "string" | |
| }, | |
| "colorFrom": { | |
| "type": "string" | |
| }, | |
| "colorTo": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "emoji", | |
| "colorFrom", | |
| "colorTo" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "url": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| "type": { | |
| "const": "comment" | |
| }, | |
| "data": { | |
| "type": "object", | |
| "properties": { | |
| "edited": { | |
| "type": "boolean" | |
| }, | |
| "hidden": { | |
| "type": "boolean" | |
| }, | |
| "hiddenBy": { | |
| "type": "string" | |
| }, | |
| "hiddenReason": { | |
| "enum": [ | |
| "Spam", | |
| "Abuse", | |
| "Graphic Content", | |
| "Resolved", | |
| "Off-Topic" | |
| ] | |
| }, | |
| "latest": { | |
| "type": "object", | |
| "properties": { | |
| "raw": { | |
| "type": "string" | |
| }, | |
| "html": { | |
| "type": "string" | |
| }, | |
| "updatedAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "author": { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| }, | |
| "primaryOrg": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "hasPrivateMembersList": { | |
| "type": "boolean" | |
| }, | |
| "userRole": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "type", | |
| "isHf" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type", | |
| "isPro" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "raw", | |
| "html", | |
| "updatedAt" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "numEdits": { | |
| "type": "number" | |
| }, | |
| "editors": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "editorAvatarUrls": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "reactions": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "reaction": { | |
| "enum": [ | |
| "🔥", | |
| "🚀", | |
| "👀", | |
| "❤️", | |
| "🤗", | |
| "😎", | |
| "➕", | |
| "🧠", | |
| "👍", | |
| "🤝", | |
| "😔", | |
| "🤯" | |
| ] | |
| }, | |
| "users": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "count": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "reaction", | |
| "users", | |
| "count" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "identifiedLanguage": { | |
| "type": "object", | |
| "properties": { | |
| "language": { | |
| "type": "string" | |
| }, | |
| "probability": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "language", | |
| "probability" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "relatedEventId": { | |
| "type": "string" | |
| }, | |
| "isReport": { | |
| "type": "boolean" | |
| }, | |
| "parentCommentId": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "edited", | |
| "hidden", | |
| "latest", | |
| "numEdits", | |
| "editors", | |
| "editorAvatarUrls", | |
| "reactions" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "createdAt", | |
| "type", | |
| "data" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "newMessage" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "New comment created" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "slug", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/blog/{slug}/comment/{commentId}/reply": { | |
| "post": { | |
| "summary": "Create a new comment", | |
| "tags": [ | |
| "discussions" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "comment": { | |
| "type": "string", | |
| "minLength": 1, | |
| "maxLength": 65536 | |
| } | |
| }, | |
| "required": [ | |
| "comment" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "201": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "newMessage": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "author": { | |
| "allOf": [ | |
| { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| }, | |
| "primaryOrg": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "hasPrivateMembersList": { | |
| "type": "boolean" | |
| }, | |
| "userRole": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "type", | |
| "isHf" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type", | |
| "isPro" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "isOwner": { | |
| "type": "boolean" | |
| }, | |
| "isOrgMember": { | |
| "type": "boolean" | |
| }, | |
| "oauthApp": { | |
| "type": "object", | |
| "properties": { | |
| "imageUrl": { | |
| "type": "string" | |
| }, | |
| "imageData": { | |
| "type": "object", | |
| "properties": { | |
| "emoji": { | |
| "type": "string" | |
| }, | |
| "colorFrom": { | |
| "type": "string" | |
| }, | |
| "colorTo": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "emoji", | |
| "colorFrom", | |
| "colorTo" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "url": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| "type": { | |
| "const": "comment" | |
| }, | |
| "data": { | |
| "type": "object", | |
| "properties": { | |
| "edited": { | |
| "type": "boolean" | |
| }, | |
| "hidden": { | |
| "type": "boolean" | |
| }, | |
| "hiddenBy": { | |
| "type": "string" | |
| }, | |
| "hiddenReason": { | |
| "enum": [ | |
| "Spam", | |
| "Abuse", | |
| "Graphic Content", | |
| "Resolved", | |
| "Off-Topic" | |
| ] | |
| }, | |
| "latest": { | |
| "type": "object", | |
| "properties": { | |
| "raw": { | |
| "type": "string" | |
| }, | |
| "html": { | |
| "type": "string" | |
| }, | |
| "updatedAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "author": { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| }, | |
| "primaryOrg": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "hasPrivateMembersList": { | |
| "type": "boolean" | |
| }, | |
| "userRole": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "type", | |
| "isHf" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type", | |
| "isPro" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "raw", | |
| "html", | |
| "updatedAt" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "numEdits": { | |
| "type": "number" | |
| }, | |
| "editors": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "editorAvatarUrls": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "reactions": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "reaction": { | |
| "enum": [ | |
| "🔥", | |
| "🚀", | |
| "👀", | |
| "❤️", | |
| "🤗", | |
| "😎", | |
| "➕", | |
| "🧠", | |
| "👍", | |
| "🤝", | |
| "😔", | |
| "🤯" | |
| ] | |
| }, | |
| "users": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "count": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "reaction", | |
| "users", | |
| "count" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "identifiedLanguage": { | |
| "type": "object", | |
| "properties": { | |
| "language": { | |
| "type": "string" | |
| }, | |
| "probability": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "language", | |
| "probability" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "relatedEventId": { | |
| "type": "string" | |
| }, | |
| "isReport": { | |
| "type": "boolean" | |
| }, | |
| "parentCommentId": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "edited", | |
| "hidden", | |
| "latest", | |
| "numEdits", | |
| "editors", | |
| "editorAvatarUrls", | |
| "reactions" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "createdAt", | |
| "type", | |
| "data" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "newMessage" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "New comment created" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "slug", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "commentId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/blog/{namespace}/{slug}/comment": { | |
| "post": { | |
| "summary": "Create a new comment", | |
| "tags": [ | |
| "discussions" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "comment": { | |
| "type": "string", | |
| "minLength": 1, | |
| "maxLength": 65536 | |
| } | |
| }, | |
| "required": [ | |
| "comment" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "201": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "newMessage": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "author": { | |
| "allOf": [ | |
| { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| }, | |
| "primaryOrg": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "hasPrivateMembersList": { | |
| "type": "boolean" | |
| }, | |
| "userRole": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "type", | |
| "isHf" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type", | |
| "isPro" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "isOwner": { | |
| "type": "boolean" | |
| }, | |
| "isOrgMember": { | |
| "type": "boolean" | |
| }, | |
| "oauthApp": { | |
| "type": "object", | |
| "properties": { | |
| "imageUrl": { | |
| "type": "string" | |
| }, | |
| "imageData": { | |
| "type": "object", | |
| "properties": { | |
| "emoji": { | |
| "type": "string" | |
| }, | |
| "colorFrom": { | |
| "type": "string" | |
| }, | |
| "colorTo": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "emoji", | |
| "colorFrom", | |
| "colorTo" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "url": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| "type": { | |
| "const": "comment" | |
| }, | |
| "data": { | |
| "type": "object", | |
| "properties": { | |
| "edited": { | |
| "type": "boolean" | |
| }, | |
| "hidden": { | |
| "type": "boolean" | |
| }, | |
| "hiddenBy": { | |
| "type": "string" | |
| }, | |
| "hiddenReason": { | |
| "enum": [ | |
| "Spam", | |
| "Abuse", | |
| "Graphic Content", | |
| "Resolved", | |
| "Off-Topic" | |
| ] | |
| }, | |
| "latest": { | |
| "type": "object", | |
| "properties": { | |
| "raw": { | |
| "type": "string" | |
| }, | |
| "html": { | |
| "type": "string" | |
| }, | |
| "updatedAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "author": { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| }, | |
| "primaryOrg": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "hasPrivateMembersList": { | |
| "type": "boolean" | |
| }, | |
| "userRole": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "type", | |
| "isHf" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type", | |
| "isPro" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "raw", | |
| "html", | |
| "updatedAt" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "numEdits": { | |
| "type": "number" | |
| }, | |
| "editors": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "editorAvatarUrls": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "reactions": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "reaction": { | |
| "enum": [ | |
| "🔥", | |
| "🚀", | |
| "👀", | |
| "❤️", | |
| "🤗", | |
| "😎", | |
| "➕", | |
| "🧠", | |
| "👍", | |
| "🤝", | |
| "😔", | |
| "🤯" | |
| ] | |
| }, | |
| "users": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "count": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "reaction", | |
| "users", | |
| "count" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "identifiedLanguage": { | |
| "type": "object", | |
| "properties": { | |
| "language": { | |
| "type": "string" | |
| }, | |
| "probability": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "language", | |
| "probability" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "relatedEventId": { | |
| "type": "string" | |
| }, | |
| "isReport": { | |
| "type": "boolean" | |
| }, | |
| "parentCommentId": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "edited", | |
| "hidden", | |
| "latest", | |
| "numEdits", | |
| "editors", | |
| "editorAvatarUrls", | |
| "reactions" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "createdAt", | |
| "type", | |
| "data" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "newMessage" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "New comment created" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "slug", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/blog/{namespace}/{slug}/comment/{commentId}/reply": { | |
| "post": { | |
| "summary": "Create a new comment", | |
| "tags": [ | |
| "discussions" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "comment": { | |
| "type": "string", | |
| "minLength": 1, | |
| "maxLength": 65536 | |
| } | |
| }, | |
| "required": [ | |
| "comment" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "201": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "newMessage": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "author": { | |
| "allOf": [ | |
| { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| }, | |
| "primaryOrg": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "hasPrivateMembersList": { | |
| "type": "boolean" | |
| }, | |
| "userRole": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "type", | |
| "isHf" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type", | |
| "isPro" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "isOwner": { | |
| "type": "boolean" | |
| }, | |
| "isOrgMember": { | |
| "type": "boolean" | |
| }, | |
| "oauthApp": { | |
| "type": "object", | |
| "properties": { | |
| "imageUrl": { | |
| "type": "string" | |
| }, | |
| "imageData": { | |
| "type": "object", | |
| "properties": { | |
| "emoji": { | |
| "type": "string" | |
| }, | |
| "colorFrom": { | |
| "type": "string" | |
| }, | |
| "colorTo": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "emoji", | |
| "colorFrom", | |
| "colorTo" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "url": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| "type": { | |
| "const": "comment" | |
| }, | |
| "data": { | |
| "type": "object", | |
| "properties": { | |
| "edited": { | |
| "type": "boolean" | |
| }, | |
| "hidden": { | |
| "type": "boolean" | |
| }, | |
| "hiddenBy": { | |
| "type": "string" | |
| }, | |
| "hiddenReason": { | |
| "enum": [ | |
| "Spam", | |
| "Abuse", | |
| "Graphic Content", | |
| "Resolved", | |
| "Off-Topic" | |
| ] | |
| }, | |
| "latest": { | |
| "type": "object", | |
| "properties": { | |
| "raw": { | |
| "type": "string" | |
| }, | |
| "html": { | |
| "type": "string" | |
| }, | |
| "updatedAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "author": { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| }, | |
| "primaryOrg": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "hasPrivateMembersList": { | |
| "type": "boolean" | |
| }, | |
| "userRole": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "type", | |
| "isHf" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type", | |
| "isPro" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "raw", | |
| "html", | |
| "updatedAt" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "numEdits": { | |
| "type": "number" | |
| }, | |
| "editors": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "editorAvatarUrls": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "reactions": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "reaction": { | |
| "enum": [ | |
| "🔥", | |
| "🚀", | |
| "👀", | |
| "❤️", | |
| "🤗", | |
| "😎", | |
| "➕", | |
| "🧠", | |
| "👍", | |
| "🤝", | |
| "😔", | |
| "🤯" | |
| ] | |
| }, | |
| "users": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "count": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "reaction", | |
| "users", | |
| "count" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "identifiedLanguage": { | |
| "type": "object", | |
| "properties": { | |
| "language": { | |
| "type": "string" | |
| }, | |
| "probability": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "language", | |
| "probability" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "relatedEventId": { | |
| "type": "string" | |
| }, | |
| "isReport": { | |
| "type": "boolean" | |
| }, | |
| "parentCommentId": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "edited", | |
| "hidden", | |
| "latest", | |
| "numEdits", | |
| "editors", | |
| "editorAvatarUrls", | |
| "reactions" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "createdAt", | |
| "type", | |
| "data" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "newMessage" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "New comment created" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "slug", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "commentId", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/docs": { | |
| "get": { | |
| "description": "Get list of available documentation", | |
| "summary": "List docs", | |
| "tags": [ | |
| "docs" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "url": { | |
| "type": "string" | |
| }, | |
| "category": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "url" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "List of available documentation" | |
| } | |
| } | |
| } | |
| }, | |
| "/api/docs/search": { | |
| "get": { | |
| "description": "Search any Hugging Face documentation", | |
| "summary": "Search docs", | |
| "tags": [ | |
| "docs" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "_vectors": { | |
| "type": "object", | |
| "properties": { | |
| "embeddings": { | |
| "type": "array", | |
| "items": { | |
| "type": "number" | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "embeddings" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "heading1": { | |
| "type": "string" | |
| }, | |
| "text": { | |
| "type": "string" | |
| }, | |
| "product": { | |
| "type": "string" | |
| }, | |
| "source_page_url": { | |
| "type": "string" | |
| }, | |
| "source_page_title": { | |
| "type": "string" | |
| }, | |
| "heading2": { | |
| "type": "string" | |
| }, | |
| "heading3": { | |
| "type": "string" | |
| }, | |
| "heading4": { | |
| "type": "string" | |
| }, | |
| "heading5": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "_vectors", | |
| "heading1", | |
| "text", | |
| "product", | |
| "source_page_url", | |
| "source_page_title" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "Search results" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "q", | |
| "in": "query", | |
| "schema": { | |
| "type": "string", | |
| "maxLength": 250 | |
| }, | |
| "required": true | |
| }, | |
| { | |
| "name": "product", | |
| "in": "query", | |
| "schema": { | |
| "enum": [ | |
| "hub", | |
| "transformers", | |
| "diffusers", | |
| "datasets", | |
| "gradio", | |
| "trackio", | |
| "smolagents", | |
| "huggingface_hub", | |
| "huggingface.js", | |
| "transformers.js", | |
| "inference-providers", | |
| "inference-endpoints", | |
| "peft", | |
| "accelerate", | |
| "optimum", | |
| "optimum-habana", | |
| "optimum-neuron", | |
| "optimum-intel", | |
| "optimum-executorch", | |
| "optimum-tpu", | |
| "tokenizers", | |
| "llm-course", | |
| "robotics-course", | |
| "mcp-course", | |
| "smol-course", | |
| "agents-course", | |
| "deep-rl-course", | |
| "computer-vision-course", | |
| "evaluate", | |
| "tasks", | |
| "dataset-viewer", | |
| "trl", | |
| "simulate", | |
| "sagemaker", | |
| "timm", | |
| "safetensors", | |
| "tgi", | |
| "setfit", | |
| "audio-course", | |
| "lerobot", | |
| "reachy_mini", | |
| "autotrain", | |
| "tei", | |
| "bitsandbytes", | |
| "cookbook", | |
| "sentence_transformers", | |
| "ml-games-course", | |
| "diffusion-course", | |
| "ml-for-3d-course", | |
| "chat-ui", | |
| "leaderboards", | |
| "lighteval", | |
| "argilla", | |
| "distilabel", | |
| "microsoft-azure", | |
| "kernels", | |
| "google-cloud" | |
| ] | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "limit", | |
| "in": "query", | |
| "schema": { | |
| "default": 10, | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 25 | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/docs/search/full-text": { | |
| "get": { | |
| "description": "Full-text search across Hugging Face documentation", | |
| "summary": "Full-text search docs", | |
| "tags": [ | |
| "docs" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "hits": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "url": { | |
| "type": "string" | |
| }, | |
| "hierarchy_lvl0": { | |
| "type": "string" | |
| }, | |
| "hierarchy_lvl1": { | |
| "type": "string" | |
| }, | |
| "hierarchy_lvl2": { | |
| "type": "string" | |
| }, | |
| "hierarchy_lvl3": { | |
| "type": "string" | |
| }, | |
| "hierarchy_lvl4": { | |
| "type": "string" | |
| }, | |
| "hierarchy_lvl5": { | |
| "type": "string" | |
| }, | |
| "hierarchy_lvl6": { | |
| "type": "string" | |
| }, | |
| "content": { | |
| "type": "string" | |
| }, | |
| "anchor": { | |
| "type": "string" | |
| }, | |
| "_formatted": { | |
| "type": "object", | |
| "properties": { | |
| "url": { | |
| "type": "string" | |
| }, | |
| "hierarchy_lvl0": { | |
| "type": "string" | |
| }, | |
| "hierarchy_lvl1": { | |
| "type": "string" | |
| }, | |
| "hierarchy_lvl2": { | |
| "type": "string" | |
| }, | |
| "hierarchy_lvl3": { | |
| "type": "string" | |
| }, | |
| "hierarchy_lvl4": { | |
| "type": "string" | |
| }, | |
| "hierarchy_lvl5": { | |
| "type": "string" | |
| }, | |
| "hierarchy_lvl6": { | |
| "type": "string" | |
| }, | |
| "content": { | |
| "type": "string" | |
| }, | |
| "anchor": { | |
| "type": "string" | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "url" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "hits" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Full-text search results" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "q", | |
| "in": "query", | |
| "schema": { | |
| "type": "string", | |
| "maxLength": 250 | |
| }, | |
| "required": true | |
| }, | |
| { | |
| "name": "limit", | |
| "in": "query", | |
| "schema": { | |
| "default": 9, | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 100 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "domain", | |
| "in": "query", | |
| "schema": { | |
| "type": "string", | |
| "maxLength": 100 | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/whoami-v2": { | |
| "get": { | |
| "description": "Get information about the user and auth method used", | |
| "summary": "Get user info", | |
| "tags": [ | |
| "auth" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "auth": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "type": "string" | |
| }, | |
| "accessToken": { | |
| "type": "object", | |
| "properties": { | |
| "displayName": { | |
| "type": "string" | |
| }, | |
| "role": { | |
| "enum": [ | |
| "read", | |
| "write", | |
| "god", | |
| "fineGrained" | |
| ] | |
| }, | |
| "fineGrained": { | |
| "type": "object", | |
| "properties": { | |
| "scoped": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "entity": { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "dataset", | |
| "model", | |
| "space", | |
| "bucket", | |
| "kernel", | |
| "collection", | |
| "org", | |
| "user", | |
| "resource-group", | |
| "oauth-app" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "permissions": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "entity", | |
| "permissions" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "global": { | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "discussion.write", | |
| "post.write" | |
| ] | |
| } | |
| }, | |
| "canReadGatedRepos": { | |
| "description": "Allow access to all public gated repos to which the user has access", | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "scoped" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| } | |
| }, | |
| "required": [ | |
| "displayName", | |
| "role", | |
| "createdAt" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "expiresAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "resource": { | |
| "type": "object", | |
| "properties": { | |
| "sub": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "sub" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "email": { | |
| "anyOf": [ | |
| { | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "canPay": { | |
| "type": "boolean" | |
| }, | |
| "billingMode": { | |
| "enum": [ | |
| "prepaid", | |
| "postpaid" | |
| ] | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "periodEnd": { | |
| "anyOf": [ | |
| { | |
| "type": "number" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "emailVerified": { | |
| "type": "boolean" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "orgs": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "const": "org" | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "email": { | |
| "anyOf": [ | |
| { | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "canPay": { | |
| "type": "boolean" | |
| }, | |
| "billingMode": { | |
| "enum": [ | |
| "prepaid", | |
| "postpaid" | |
| ] | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "periodEnd": { | |
| "anyOf": [ | |
| { | |
| "type": "number" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "roleInOrg": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "pendingSSO": { | |
| "deprecated": true, | |
| "type": "boolean" | |
| }, | |
| "missingMFA": { | |
| "deprecated": true, | |
| "type": "boolean" | |
| }, | |
| "securityRestrictions": { | |
| "description": "Current security restrictions for accessing data in this organization with current authentication method", | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "mfa", | |
| "token-policy", | |
| "sso", | |
| "ip" | |
| ] | |
| } | |
| }, | |
| "resourceGroups": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "role": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name", | |
| "role" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "id", | |
| "name", | |
| "fullname", | |
| "avatarUrl" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "auth", | |
| "type", | |
| "id", | |
| "name", | |
| "fullname", | |
| "avatarUrl", | |
| "isPro", | |
| "orgs" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| } | |
| } | |
| }, | |
| "description": "Auth information" | |
| } | |
| } | |
| } | |
| }, | |
| "/api/discussions/mark-as-read": { | |
| "post": { | |
| "description": "Mark discussions as read or unread. If `applyToAll` is true, all notifications for the user matching the search parameters will be marked as read or unread.", | |
| "summary": "Change read status", | |
| "tags": [ | |
| "notifications" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "discussionIds": { | |
| "default": [], | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "read": { | |
| "default": true, | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "p", | |
| "in": "query", | |
| "schema": { | |
| "default": 0, | |
| "type": "integer", | |
| "minimum": 0, | |
| "maximum": 9007199254740991 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "readStatus", | |
| "in": "query", | |
| "schema": { | |
| "default": "all", | |
| "enum": [ | |
| "all", | |
| "unread" | |
| ] | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "repoType", | |
| "in": "query", | |
| "schema": { | |
| "enum": [ | |
| "dataset", | |
| "model", | |
| "space", | |
| "bucket", | |
| "kernel" | |
| ] | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "repoName", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "postAuthor", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "paperId", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "articleId", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "mention", | |
| "in": "query", | |
| "schema": { | |
| "default": "all", | |
| "enum": [ | |
| "all", | |
| "participating", | |
| "mentions" | |
| ] | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "lastUpdate", | |
| "in": "query", | |
| "schema": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "applyToAll", | |
| "in": "query", | |
| "schema": { | |
| "default": false | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/billing/usage": { | |
| "get": { | |
| "description": "Get org usage for a given period", | |
| "summary": "Get org usage", | |
| "tags": [ | |
| "orgs" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "usage": { | |
| "type": "object", | |
| "propertyNames": { | |
| "anyOf": [ | |
| { | |
| "enum": [ | |
| "Endpoints", | |
| "Spaces" | |
| ] | |
| }, | |
| { | |
| "not": {} | |
| } | |
| ] | |
| }, | |
| "additionalProperties": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "entityId": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "label": { | |
| "anyOf": [ | |
| { | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "product": { | |
| "enum": [ | |
| "hf/repository-storage", | |
| "jobs/cpu-basic/minutes", | |
| "jobs/cpu-upgrade/minutes", | |
| "jobs/cpu-performance/minutes", | |
| "jobs/cpu-xl/minutes", | |
| "jobs/sprx8/minutes", | |
| "jobs/t4-small/minutes", | |
| "jobs/t4-medium/minutes", | |
| "jobs/a10g-small/minutes", | |
| "jobs/a10g-large/minutes", | |
| "jobs/a10g-largex2/minutes", | |
| "jobs/a10g-largex4/minutes", | |
| "jobs/a100-large/minutes", | |
| "jobs/a100x4/minutes", | |
| "jobs/a100x8/minutes", | |
| "jobs/h100/minutes", | |
| "jobs/h100x8/minutes", | |
| "jobs/h200/minutes", | |
| "jobs/h200x2/minutes", | |
| "jobs/h200x4/minutes", | |
| "jobs/h200x8/minutes", | |
| "jobs/l4x1/minutes", | |
| "jobs/l4x4/minutes", | |
| "jobs/l40sx1/minutes", | |
| "jobs/l40sx4/minutes", | |
| "jobs/l40sx8/minutes", | |
| "jobs/v5e-2x4/minutes", | |
| "jobs/v5e-2x2/minutes", | |
| "jobs/v5e-1x1/minutes", | |
| "jobs/inf2x6/minutes", | |
| "spaces/zero-a10g/minutes", | |
| "spaces/cpu-basic/minutes", | |
| "spaces/cpu-upgrade/minutes", | |
| "spaces/cpu-performance/minutes", | |
| "spaces/cpu-xl/minutes", | |
| "spaces/sprx8/minutes", | |
| "spaces/t4-small/minutes", | |
| "spaces/t4-medium/minutes", | |
| "spaces/a10g-small/minutes", | |
| "spaces/a10g-large/minutes", | |
| "spaces/a10g-largex2/minutes", | |
| "spaces/a10g-largex4/minutes", | |
| "spaces/a100-large/minutes", | |
| "spaces/a100x4/minutes", | |
| "spaces/a100x8/minutes", | |
| "spaces/h100/minutes", | |
| "spaces/h100x8/minutes", | |
| "spaces/h200/minutes", | |
| "spaces/h200x2/minutes", | |
| "spaces/h200x4/minutes", | |
| "spaces/h200x8/minutes", | |
| "spaces/l4x1/minutes", | |
| "spaces/l4x4/minutes", | |
| "spaces/l40sx1/minutes", | |
| "spaces/l40sx4/minutes", | |
| "spaces/l40sx8/minutes", | |
| "spaces/inf2x6/minutes", | |
| "spaces/v5e-2x4/minutes", | |
| "spaces/v5e-2x2/minutes", | |
| "spaces/v5e-1x1/minutes", | |
| "spaces/storage-small/minutes", | |
| "spaces/storage-medium/minutes", | |
| "spaces/storage-large/minutes", | |
| "endpoints/azure/intel-xeon/x1", | |
| "endpoints/azure/intel-xeon/x2", | |
| "endpoints/azure/intel-xeon/x4", | |
| "endpoints/azure/intel-xeon/x8", | |
| "endpoints/aws/intel-icl/x1", | |
| "endpoints/aws/intel-icl/x2", | |
| "endpoints/aws/intel-icl/x4", | |
| "endpoints/aws/intel-icl/x8", | |
| "endpoints/aws/intel-spr/x1", | |
| "endpoints/aws/intel-spr/x2", | |
| "endpoints/aws/intel-spr/x4", | |
| "endpoints/aws/intel-spr/x8", | |
| "endpoints/aws/intel-spr/x16", | |
| "endpoints/aws/intel-spr-overcommitted/x16", | |
| "endpoints/aws/nvidia-t4/x1", | |
| "endpoints/aws/nvidia-t4/x4", | |
| "endpoints/aws/nvidia-l4/x1", | |
| "endpoints/aws/nvidia-l4/x4", | |
| "endpoints/aws/nvidia-l40s/x1", | |
| "endpoints/aws/nvidia-l40s/x4", | |
| "endpoints/aws/nvidia-l40s/x8", | |
| "endpoints/aws/nvidia-a10g/x1", | |
| "endpoints/aws/nvidia-a10g/x4", | |
| "endpoints/aws/nvidia-a100/x1", | |
| "endpoints/aws/nvidia-a100/x2", | |
| "endpoints/aws/nvidia-a100/x4", | |
| "endpoints/aws/nvidia-a100/x8", | |
| "endpoints/aws/nvidia-h100/x1", | |
| "endpoints/aws/nvidia-h100/x2", | |
| "endpoints/aws/nvidia-h100/x4", | |
| "endpoints/aws/nvidia-h100/x8", | |
| "endpoints/aws/nvidia-h200/x1", | |
| "endpoints/aws/nvidia-h200/x2", | |
| "endpoints/aws/nvidia-h200/x4", | |
| "endpoints/aws/nvidia-h200/x8", | |
| "endpoints/aws/nvidia-b200/x1", | |
| "endpoints/aws/nvidia-b200/x2", | |
| "endpoints/aws/nvidia-b200/x4", | |
| "endpoints/aws/nvidia-b200/x8", | |
| "endpoints/aws/inf2/x1", | |
| "endpoints/aws/inf2/x1-large", | |
| "endpoints/aws/inf2/x12", | |
| "endpoints/gcp/intel-spr/x1", | |
| "endpoints/gcp/intel-spr/x2", | |
| "endpoints/gcp/intel-spr/x4", | |
| "endpoints/gcp/intel-spr/x8", | |
| "endpoints/gcp/nvidia-t4/x1", | |
| "endpoints/gcp/nvidia-l4/x1", | |
| "endpoints/gcp/nvidia-l4/x4", | |
| "endpoints/gcp/nvidia-a100/x1", | |
| "endpoints/gcp/nvidia-a100/x2", | |
| "endpoints/gcp/nvidia-a100/x4", | |
| "endpoints/gcp/nvidia-a100/x8", | |
| "endpoints/gcp/nvidia-h100/x1", | |
| "endpoints/gcp/nvidia-h100/x2", | |
| "endpoints/gcp/nvidia-h100/x4", | |
| "endpoints/gcp/nvidia-h100/x8", | |
| "endpoints/gcp/v5e/1x1", | |
| "endpoints/gcp/v5e/2x2", | |
| "endpoints/gcp/v5e/2x4" | |
| ] | |
| }, | |
| "quantity": { | |
| "type": "number" | |
| }, | |
| "startedAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "stoppedAt": { | |
| "anyOf": [ | |
| { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "freeGrant": { | |
| "type": "boolean" | |
| }, | |
| "productPrettyName": { | |
| "type": "string" | |
| }, | |
| "unitLabel": { | |
| "anyOf": [ | |
| { | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "totalCostMicroUSD": { | |
| "type": "number" | |
| }, | |
| "unitCostMicroUSD": { | |
| "type": "number" | |
| }, | |
| "active": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "entityId", | |
| "label", | |
| "product", | |
| "quantity", | |
| "productPrettyName", | |
| "unitLabel", | |
| "totalCostMicroUSD", | |
| "unitCostMicroUSD", | |
| "active" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "period": { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "entityId": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "entityType": { | |
| "enum": [ | |
| "user", | |
| "org" | |
| ] | |
| }, | |
| "entityName": { | |
| "type": "string" | |
| }, | |
| "periodStart": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "periodEnd": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "invoice": { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "const": "stripe" | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "amountDueCents": { | |
| "type": "number" | |
| }, | |
| "totalCents": { | |
| "type": "number" | |
| }, | |
| "status": { | |
| "enum": [ | |
| "draft", | |
| "open", | |
| "paid", | |
| "uncollectible", | |
| "void", | |
| "unpaid" | |
| ] | |
| }, | |
| "dueDate": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "collectionMethod": { | |
| "enum": [ | |
| "charge_automatically", | |
| "send_invoice" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "id", | |
| "amountDueCents", | |
| "totalCents", | |
| "status", | |
| "dueDate" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "const": "no-invoice" | |
| }, | |
| "id": { | |
| "const": "no-invoice" | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "id" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| "charges": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "dueDate": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "usageAtChargeTimeMicroUSD": { | |
| "type": "number" | |
| }, | |
| "amountCents": { | |
| "type": "number" | |
| }, | |
| "billedThrough": { | |
| "enum": [ | |
| "stripe-payment-intent" | |
| ] | |
| }, | |
| "paymentIntentId": { | |
| "type": "string" | |
| }, | |
| "paymentIntentStatus": { | |
| "enum": [ | |
| "canceled", | |
| "processing", | |
| "requires_action", | |
| "requires_capture", | |
| "requires_confirmation", | |
| "requires_payment_method", | |
| "succeeded" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "createdAt", | |
| "dueDate", | |
| "usageAtChargeTimeMicroUSD", | |
| "amountCents", | |
| "billedThrough", | |
| "paymentIntentId", | |
| "paymentIntentStatus" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "entityId", | |
| "entityType", | |
| "entityName", | |
| "periodStart", | |
| "periodEnd" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "usage", | |
| "period" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Usage and period information" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "periodId", | |
| "in": "query", | |
| "schema": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/billing/usage-v2": { | |
| "get": { | |
| "description": "Get org usage for a given period", | |
| "summary": "Get org usage", | |
| "tags": [ | |
| "orgs" | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "startDate", | |
| "in": "query", | |
| "schema": { | |
| "type": "integer", | |
| "exclusiveMinimum": 0, | |
| "maximum": 9007199254740991 | |
| }, | |
| "required": true | |
| }, | |
| { | |
| "name": "endDate", | |
| "in": "query", | |
| "schema": { | |
| "type": "integer", | |
| "exclusiveMinimum": 0, | |
| "maximum": 9007199254740991 | |
| }, | |
| "required": true | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/billing/usage/live": { | |
| "get": { | |
| "description": "Get live usage for org", | |
| "summary": "Stream usage", | |
| "tags": [ | |
| "orgs" | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/settings/billing/usage": { | |
| "get": { | |
| "description": "Get user usage for a given period", | |
| "summary": "Get user usage", | |
| "tags": [ | |
| "users" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "usage": { | |
| "type": "object", | |
| "propertyNames": { | |
| "anyOf": [ | |
| { | |
| "enum": [ | |
| "Endpoints", | |
| "Spaces" | |
| ] | |
| }, | |
| { | |
| "not": {} | |
| } | |
| ] | |
| }, | |
| "additionalProperties": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "entityId": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "label": { | |
| "anyOf": [ | |
| { | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "product": { | |
| "enum": [ | |
| "hf/repository-storage", | |
| "jobs/cpu-basic/minutes", | |
| "jobs/cpu-upgrade/minutes", | |
| "jobs/cpu-performance/minutes", | |
| "jobs/cpu-xl/minutes", | |
| "jobs/sprx8/minutes", | |
| "jobs/t4-small/minutes", | |
| "jobs/t4-medium/minutes", | |
| "jobs/a10g-small/minutes", | |
| "jobs/a10g-large/minutes", | |
| "jobs/a10g-largex2/minutes", | |
| "jobs/a10g-largex4/minutes", | |
| "jobs/a100-large/minutes", | |
| "jobs/a100x4/minutes", | |
| "jobs/a100x8/minutes", | |
| "jobs/h100/minutes", | |
| "jobs/h100x8/minutes", | |
| "jobs/h200/minutes", | |
| "jobs/h200x2/minutes", | |
| "jobs/h200x4/minutes", | |
| "jobs/h200x8/minutes", | |
| "jobs/l4x1/minutes", | |
| "jobs/l4x4/minutes", | |
| "jobs/l40sx1/minutes", | |
| "jobs/l40sx4/minutes", | |
| "jobs/l40sx8/minutes", | |
| "jobs/v5e-2x4/minutes", | |
| "jobs/v5e-2x2/minutes", | |
| "jobs/v5e-1x1/minutes", | |
| "jobs/inf2x6/minutes", | |
| "spaces/zero-a10g/minutes", | |
| "spaces/cpu-basic/minutes", | |
| "spaces/cpu-upgrade/minutes", | |
| "spaces/cpu-performance/minutes", | |
| "spaces/cpu-xl/minutes", | |
| "spaces/sprx8/minutes", | |
| "spaces/t4-small/minutes", | |
| "spaces/t4-medium/minutes", | |
| "spaces/a10g-small/minutes", | |
| "spaces/a10g-large/minutes", | |
| "spaces/a10g-largex2/minutes", | |
| "spaces/a10g-largex4/minutes", | |
| "spaces/a100-large/minutes", | |
| "spaces/a100x4/minutes", | |
| "spaces/a100x8/minutes", | |
| "spaces/h100/minutes", | |
| "spaces/h100x8/minutes", | |
| "spaces/h200/minutes", | |
| "spaces/h200x2/minutes", | |
| "spaces/h200x4/minutes", | |
| "spaces/h200x8/minutes", | |
| "spaces/l4x1/minutes", | |
| "spaces/l4x4/minutes", | |
| "spaces/l40sx1/minutes", | |
| "spaces/l40sx4/minutes", | |
| "spaces/l40sx8/minutes", | |
| "spaces/inf2x6/minutes", | |
| "spaces/v5e-2x4/minutes", | |
| "spaces/v5e-2x2/minutes", | |
| "spaces/v5e-1x1/minutes", | |
| "spaces/storage-small/minutes", | |
| "spaces/storage-medium/minutes", | |
| "spaces/storage-large/minutes", | |
| "endpoints/azure/intel-xeon/x1", | |
| "endpoints/azure/intel-xeon/x2", | |
| "endpoints/azure/intel-xeon/x4", | |
| "endpoints/azure/intel-xeon/x8", | |
| "endpoints/aws/intel-icl/x1", | |
| "endpoints/aws/intel-icl/x2", | |
| "endpoints/aws/intel-icl/x4", | |
| "endpoints/aws/intel-icl/x8", | |
| "endpoints/aws/intel-spr/x1", | |
| "endpoints/aws/intel-spr/x2", | |
| "endpoints/aws/intel-spr/x4", | |
| "endpoints/aws/intel-spr/x8", | |
| "endpoints/aws/intel-spr/x16", | |
| "endpoints/aws/intel-spr-overcommitted/x16", | |
| "endpoints/aws/nvidia-t4/x1", | |
| "endpoints/aws/nvidia-t4/x4", | |
| "endpoints/aws/nvidia-l4/x1", | |
| "endpoints/aws/nvidia-l4/x4", | |
| "endpoints/aws/nvidia-l40s/x1", | |
| "endpoints/aws/nvidia-l40s/x4", | |
| "endpoints/aws/nvidia-l40s/x8", | |
| "endpoints/aws/nvidia-a10g/x1", | |
| "endpoints/aws/nvidia-a10g/x4", | |
| "endpoints/aws/nvidia-a100/x1", | |
| "endpoints/aws/nvidia-a100/x2", | |
| "endpoints/aws/nvidia-a100/x4", | |
| "endpoints/aws/nvidia-a100/x8", | |
| "endpoints/aws/nvidia-h100/x1", | |
| "endpoints/aws/nvidia-h100/x2", | |
| "endpoints/aws/nvidia-h100/x4", | |
| "endpoints/aws/nvidia-h100/x8", | |
| "endpoints/aws/nvidia-h200/x1", | |
| "endpoints/aws/nvidia-h200/x2", | |
| "endpoints/aws/nvidia-h200/x4", | |
| "endpoints/aws/nvidia-h200/x8", | |
| "endpoints/aws/nvidia-b200/x1", | |
| "endpoints/aws/nvidia-b200/x2", | |
| "endpoints/aws/nvidia-b200/x4", | |
| "endpoints/aws/nvidia-b200/x8", | |
| "endpoints/aws/inf2/x1", | |
| "endpoints/aws/inf2/x1-large", | |
| "endpoints/aws/inf2/x12", | |
| "endpoints/gcp/intel-spr/x1", | |
| "endpoints/gcp/intel-spr/x2", | |
| "endpoints/gcp/intel-spr/x4", | |
| "endpoints/gcp/intel-spr/x8", | |
| "endpoints/gcp/nvidia-t4/x1", | |
| "endpoints/gcp/nvidia-l4/x1", | |
| "endpoints/gcp/nvidia-l4/x4", | |
| "endpoints/gcp/nvidia-a100/x1", | |
| "endpoints/gcp/nvidia-a100/x2", | |
| "endpoints/gcp/nvidia-a100/x4", | |
| "endpoints/gcp/nvidia-a100/x8", | |
| "endpoints/gcp/nvidia-h100/x1", | |
| "endpoints/gcp/nvidia-h100/x2", | |
| "endpoints/gcp/nvidia-h100/x4", | |
| "endpoints/gcp/nvidia-h100/x8", | |
| "endpoints/gcp/v5e/1x1", | |
| "endpoints/gcp/v5e/2x2", | |
| "endpoints/gcp/v5e/2x4" | |
| ] | |
| }, | |
| "quantity": { | |
| "type": "number" | |
| }, | |
| "startedAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "stoppedAt": { | |
| "anyOf": [ | |
| { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "freeGrant": { | |
| "type": "boolean" | |
| }, | |
| "productPrettyName": { | |
| "type": "string" | |
| }, | |
| "unitLabel": { | |
| "anyOf": [ | |
| { | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "totalCostMicroUSD": { | |
| "type": "number" | |
| }, | |
| "unitCostMicroUSD": { | |
| "type": "number" | |
| }, | |
| "active": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "entityId", | |
| "label", | |
| "product", | |
| "quantity", | |
| "productPrettyName", | |
| "unitLabel", | |
| "totalCostMicroUSD", | |
| "unitCostMicroUSD", | |
| "active" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "period": { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "entityId": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "entityType": { | |
| "enum": [ | |
| "user", | |
| "org" | |
| ] | |
| }, | |
| "entityName": { | |
| "type": "string" | |
| }, | |
| "periodStart": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "periodEnd": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "invoice": { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "const": "stripe" | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "amountDueCents": { | |
| "type": "number" | |
| }, | |
| "totalCents": { | |
| "type": "number" | |
| }, | |
| "status": { | |
| "enum": [ | |
| "draft", | |
| "open", | |
| "paid", | |
| "uncollectible", | |
| "void", | |
| "unpaid" | |
| ] | |
| }, | |
| "dueDate": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "collectionMethod": { | |
| "enum": [ | |
| "charge_automatically", | |
| "send_invoice" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "id", | |
| "amountDueCents", | |
| "totalCents", | |
| "status", | |
| "dueDate" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "const": "no-invoice" | |
| }, | |
| "id": { | |
| "const": "no-invoice" | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "id" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| "charges": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "dueDate": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "usageAtChargeTimeMicroUSD": { | |
| "type": "number" | |
| }, | |
| "amountCents": { | |
| "type": "number" | |
| }, | |
| "billedThrough": { | |
| "enum": [ | |
| "stripe-payment-intent" | |
| ] | |
| }, | |
| "paymentIntentId": { | |
| "type": "string" | |
| }, | |
| "paymentIntentStatus": { | |
| "enum": [ | |
| "canceled", | |
| "processing", | |
| "requires_action", | |
| "requires_capture", | |
| "requires_confirmation", | |
| "requires_payment_method", | |
| "succeeded" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "createdAt", | |
| "dueDate", | |
| "usageAtChargeTimeMicroUSD", | |
| "amountCents", | |
| "billedThrough", | |
| "paymentIntentId", | |
| "paymentIntentStatus" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "entityId", | |
| "entityType", | |
| "entityName", | |
| "periodStart", | |
| "periodEnd" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "usage", | |
| "period" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Usage and period information" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "periodId", | |
| "in": "query", | |
| "schema": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/settings/billing/usage-v2": { | |
| "get": { | |
| "description": "Get user usage for a given period", | |
| "summary": "Get user usage", | |
| "tags": [ | |
| "users" | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "startDate", | |
| "in": "query", | |
| "schema": { | |
| "type": "integer", | |
| "exclusiveMinimum": 0, | |
| "maximum": 9007199254740991 | |
| }, | |
| "required": true | |
| }, | |
| { | |
| "name": "endDate", | |
| "in": "query", | |
| "schema": { | |
| "type": "integer", | |
| "exclusiveMinimum": 0, | |
| "maximum": 9007199254740991 | |
| }, | |
| "required": true | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/settings/billing/usage/jobs": { | |
| "get": { | |
| "description": "Get user Jobs usage for current subscription period", | |
| "summary": "Get jobs usage", | |
| "tags": [ | |
| "users" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "usage": { | |
| "type": "object", | |
| "properties": { | |
| "usedMicroUsd": { | |
| "type": "number" | |
| }, | |
| "totalMinutes": { | |
| "type": "number" | |
| }, | |
| "periodStart": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "periodEnd": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "jobDetails": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "jobId": { | |
| "type": "string" | |
| }, | |
| "hardwareFlavor": { | |
| "type": "string" | |
| }, | |
| "totalMinutes": { | |
| "type": "number" | |
| }, | |
| "totalCostMicroUsd": { | |
| "type": "number" | |
| }, | |
| "startedAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "completedAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| } | |
| }, | |
| "required": [ | |
| "jobId", | |
| "hardwareFlavor", | |
| "totalMinutes", | |
| "totalCostMicroUsd", | |
| "startedAt" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "usedMicroUsd", | |
| "totalMinutes", | |
| "periodStart", | |
| "periodEnd", | |
| "jobDetails" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "hasAccess": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "usage", | |
| "hasAccess" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Jobs usage information" | |
| } | |
| } | |
| } | |
| }, | |
| "/api/settings/billing/usage/live": { | |
| "get": { | |
| "description": "Get live usage for user", | |
| "summary": "Stream usage", | |
| "tags": [ | |
| "users" | |
| ] | |
| } | |
| }, | |
| "/api/users/{username}/billing/usage/live": { | |
| "get": { | |
| "description": "Get live usage for user", | |
| "summary": "Stream usage", | |
| "tags": [ | |
| "users" | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "username", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/users/{username}/overview": { | |
| "get": { | |
| "summary": "User overview", | |
| "tags": [ | |
| "users" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "orgs": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name", | |
| "fullname", | |
| "avatarUrl" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "user": { | |
| "type": "string" | |
| }, | |
| "numModels": { | |
| "type": "number" | |
| }, | |
| "numDatasets": { | |
| "type": "number" | |
| }, | |
| "numSpaces": { | |
| "type": "number" | |
| }, | |
| "numDiscussions": { | |
| "type": "number" | |
| }, | |
| "numPapers": { | |
| "type": "number" | |
| }, | |
| "numUpvotes": { | |
| "type": "number" | |
| }, | |
| "numLikes": { | |
| "type": "number" | |
| }, | |
| "numFollowers": { | |
| "type": "number" | |
| }, | |
| "numFollowing": { | |
| "type": "number" | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "reasonToFollow": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "isPro", | |
| "user", | |
| "type", | |
| "createdAt" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "User overview data including their organizations, stats, and creation date" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "username", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/users/{username}/socials": { | |
| "get": { | |
| "description": "Get a user's social media handles", | |
| "summary": "Get social handles", | |
| "tags": [ | |
| "users" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string" | |
| }, | |
| "user": { | |
| "type": "string" | |
| }, | |
| "socialHandles": { | |
| "type": "object", | |
| "properties": { | |
| "twitter": { | |
| "type": "string" | |
| }, | |
| "github": { | |
| "type": "string" | |
| }, | |
| "linkedin": { | |
| "type": "string" | |
| }, | |
| "bluesky": { | |
| "type": "string" | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "user", | |
| "socialHandles" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The user's social media handles. Only includes handles that the user has provided." | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "username", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/users/{username}/avatar": { | |
| "get": { | |
| "description": "This endpoint returns a JSON with the avatar URL for the user.\n\nIf called with the `Sec-Fetch-Dest: image` header, it instead redirects to the avatar URL", | |
| "summary": "Retrieve user avatar", | |
| "tags": [ | |
| "users" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string", | |
| "format": "uri" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Avatar URL" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "username", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "redirect", | |
| "in": "query", | |
| "schema": { | |
| "description": "Redirect to the avatar url instead of returning it" | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/organizations/{name}/socials": { | |
| "get": { | |
| "description": "Get an organization's social media handles", | |
| "summary": "Get social handles", | |
| "tags": [ | |
| "orgs" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string" | |
| }, | |
| "org": { | |
| "type": "string" | |
| }, | |
| "socialHandles": { | |
| "type": "object", | |
| "properties": { | |
| "twitter": { | |
| "type": "string" | |
| }, | |
| "github": { | |
| "type": "string" | |
| }, | |
| "linkedin": { | |
| "type": "string" | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "org", | |
| "socialHandles" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The organization's social media handles. Only includes handles that the organization has provided." | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "name", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/avatars/{namespace}": { | |
| "get": { | |
| "description": "Display the avatar for any user or organization. This endpoint redirects to the avatar URL for either a user or an organization", | |
| "summary": "Get avatar", | |
| "tags": [ | |
| "users", | |
| "orgs" | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/inference-endpoints/{namespace}/auth-check/{perms}": { | |
| "post": { | |
| "description": "Check if the user has access to the inference endpoint", | |
| "summary": "Check access", | |
| "tags": [ | |
| "inference-endpoints" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "namespace": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "user": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "hasHfLevelAccess": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "namespace", | |
| "user" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The user has access to the inference endpoint/resource" | |
| }, | |
| "207": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "namespace": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "user": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "hasHfLevelAccess": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "patternRestrictions": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "namespace", | |
| "user", | |
| "patternRestrictions" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The user has access to the resource, but the endpoint name is restricted by pattern restrictions. Can only be returned if `endpoint` is not provided in the path" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "perms", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "read", | |
| "write", | |
| "infer" | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "own", | |
| "in": "query", | |
| "schema": {}, | |
| "required": false | |
| }, | |
| { | |
| "name": "is_creator", | |
| "in": "query", | |
| "schema": {}, | |
| "required": false | |
| }, | |
| { | |
| "name": "creator_id", | |
| "in": "query", | |
| "schema": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-fA-F]{24}$" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "incur_cost", | |
| "in": "query", | |
| "schema": {}, | |
| "required": false | |
| }, | |
| { | |
| "name": "resource_group_id", | |
| "in": "query", | |
| "schema": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-fA-F]{24}$" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "repo_id", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/inference-endpoints/{namespace}/{endpoint}/auth-check/{perms}": { | |
| "post": { | |
| "description": "Check if the user has access to the inference endpoint", | |
| "summary": "Check access", | |
| "tags": [ | |
| "inference-endpoints" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "namespace": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "user": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "hasHfLevelAccess": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "namespace", | |
| "user" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The user has access to the inference endpoint/resource" | |
| }, | |
| "207": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "namespace": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "user": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "hasHfLevelAccess": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "patternRestrictions": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "namespace", | |
| "user", | |
| "patternRestrictions" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The user has access to the resource, but the endpoint name is restricted by pattern restrictions. Can only be returned if `endpoint` is not provided in the path" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "endpoint", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "perms", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "read", | |
| "write", | |
| "infer" | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "own", | |
| "in": "query", | |
| "schema": {}, | |
| "required": false | |
| }, | |
| { | |
| "name": "is_creator", | |
| "in": "query", | |
| "schema": {}, | |
| "required": false | |
| }, | |
| { | |
| "name": "creator_id", | |
| "in": "query", | |
| "schema": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-fA-F]{24}$" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "incur_cost", | |
| "in": "query", | |
| "schema": {}, | |
| "required": false | |
| }, | |
| { | |
| "name": "resource_group_id", | |
| "in": "query", | |
| "schema": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-fA-F]{24}$" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "repo_id", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/treesize/{rev}/{path}": { | |
| "get": { | |
| "description": "Get the total size of a repository at a given revision, optionally under a specific subpath. Returns the total size in bytes of all files under the specified path (recursively). If a file is stored via Xet/LFS, the LFS file size is used.", | |
| "summary": "Get folder size", | |
| "tags": [ | |
| "models" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "path": { | |
| "description": "The normalized path of the subtree, starting with a slash", | |
| "type": "string" | |
| }, | |
| "size": { | |
| "description": "Total size in bytes of all files under the subtree", | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| } | |
| }, | |
| "required": [ | |
| "path", | |
| "size" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Total size of a repository at a given revision, under the given path" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "path", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "description": "Wildcard path parameter" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/treesize/{rev}/{path}": { | |
| "get": { | |
| "description": "Get the total size of a repository at a given revision, optionally under a specific subpath. Returns the total size in bytes of all files under the specified path (recursively). If a file is stored via Xet/LFS, the LFS file size is used.", | |
| "summary": "Get folder size", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "path": { | |
| "description": "The normalized path of the subtree, starting with a slash", | |
| "type": "string" | |
| }, | |
| "size": { | |
| "description": "Total size in bytes of all files under the subtree", | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| } | |
| }, | |
| "required": [ | |
| "path", | |
| "size" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Total size of a repository at a given revision, under the given path" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "path", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "description": "Wildcard path parameter" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/treesize/{rev}/{path}": { | |
| "get": { | |
| "description": "Get the total size of a repository at a given revision, optionally under a specific subpath. Returns the total size in bytes of all files under the specified path (recursively). If a file is stored via Xet/LFS, the LFS file size is used.", | |
| "summary": "Get folder size", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "path": { | |
| "description": "The normalized path of the subtree, starting with a slash", | |
| "type": "string" | |
| }, | |
| "size": { | |
| "description": "Total size in bytes of all files under the subtree", | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| } | |
| }, | |
| "required": [ | |
| "path", | |
| "size" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Total size of a repository at a given revision, under the given path" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "path", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "description": "Wildcard path parameter" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/lfs-files": { | |
| "get": { | |
| "description": "List Xet/LFS files for a repo", | |
| "summary": "List Large files", | |
| "tags": [ | |
| "models" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "pusher": { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| }, | |
| "primaryOrg": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "hasPrivateMembersList": { | |
| "type": "boolean" | |
| }, | |
| "userRole": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "type", | |
| "isHf" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type", | |
| "isPro" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "ref": { | |
| "type": "string" | |
| }, | |
| "fileOid": { | |
| "type": "string" | |
| }, | |
| "oid": { | |
| "type": "string" | |
| }, | |
| "size": { | |
| "type": "number" | |
| }, | |
| "pushedAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "filename": { | |
| "description": "Potential filename of the LFS file", | |
| "type": "string" | |
| }, | |
| "xetHash": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "fileOid", | |
| "oid", | |
| "size", | |
| "pushedAt" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "List of Xet/LFS files for the repo", | |
| "headers": { | |
| "Link": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| }, | |
| "description": "Link header for pagination, can contain a `rel=\"next\"` link" | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "cursor", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "limit", | |
| "in": "query", | |
| "schema": { | |
| "default": 1000, | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 1000 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "xet", | |
| "in": "query", | |
| "schema": {}, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/lfs-files": { | |
| "get": { | |
| "description": "List Xet/LFS files for a repo", | |
| "summary": "List Large files", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "pusher": { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| }, | |
| "primaryOrg": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "hasPrivateMembersList": { | |
| "type": "boolean" | |
| }, | |
| "userRole": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "type", | |
| "isHf" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type", | |
| "isPro" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "ref": { | |
| "type": "string" | |
| }, | |
| "fileOid": { | |
| "type": "string" | |
| }, | |
| "oid": { | |
| "type": "string" | |
| }, | |
| "size": { | |
| "type": "number" | |
| }, | |
| "pushedAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "filename": { | |
| "description": "Potential filename of the LFS file", | |
| "type": "string" | |
| }, | |
| "xetHash": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "fileOid", | |
| "oid", | |
| "size", | |
| "pushedAt" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "List of Xet/LFS files for the repo", | |
| "headers": { | |
| "Link": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| }, | |
| "description": "Link header for pagination, can contain a `rel=\"next\"` link" | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "cursor", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "limit", | |
| "in": "query", | |
| "schema": { | |
| "default": 1000, | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 1000 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "xet", | |
| "in": "query", | |
| "schema": {}, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/lfs-files": { | |
| "get": { | |
| "description": "List Xet/LFS files for a repo", | |
| "summary": "List Large files", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "pusher": { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| }, | |
| "primaryOrg": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "hasPrivateMembersList": { | |
| "type": "boolean" | |
| }, | |
| "userRole": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "type", | |
| "isHf" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type", | |
| "isPro" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "ref": { | |
| "type": "string" | |
| }, | |
| "fileOid": { | |
| "type": "string" | |
| }, | |
| "oid": { | |
| "type": "string" | |
| }, | |
| "size": { | |
| "type": "number" | |
| }, | |
| "pushedAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "filename": { | |
| "description": "Potential filename of the LFS file", | |
| "type": "string" | |
| }, | |
| "xetHash": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "fileOid", | |
| "oid", | |
| "size", | |
| "pushedAt" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "List of Xet/LFS files for the repo", | |
| "headers": { | |
| "Link": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| }, | |
| "description": "Link header for pagination, can contain a `rel=\"next\"` link" | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "cursor", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "limit", | |
| "in": "query", | |
| "schema": { | |
| "default": 1000, | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 1000 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "xet", | |
| "in": "query", | |
| "schema": {}, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/lfs-files/batch": { | |
| "post": { | |
| "description": "Delete Xet/LFS files in batch", | |
| "summary": "Delete Large files", | |
| "tags": [ | |
| "models" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "deletions": { | |
| "type": "object", | |
| "properties": { | |
| "sha": { | |
| "minItems": 1, | |
| "maxItems": 1000, | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "rewriteHistory": { | |
| "default": true, | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "sha" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "deletions" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/lfs-files/batch": { | |
| "post": { | |
| "description": "Delete Xet/LFS files in batch", | |
| "summary": "Delete Large files", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "deletions": { | |
| "type": "object", | |
| "properties": { | |
| "sha": { | |
| "minItems": 1, | |
| "maxItems": 1000, | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "rewriteHistory": { | |
| "default": true, | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "sha" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "deletions" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/lfs-files/batch": { | |
| "post": { | |
| "description": "Delete Xet/LFS files in batch", | |
| "summary": "Delete Large files", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "deletions": { | |
| "type": "object", | |
| "properties": { | |
| "sha": { | |
| "minItems": 1, | |
| "maxItems": 1000, | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "rewriteHistory": { | |
| "default": true, | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "sha" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "deletions" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/lfs-files/{sha}": { | |
| "delete": { | |
| "description": "Delete a Xet/LFS file", | |
| "summary": "Delete Large file", | |
| "tags": [ | |
| "models" | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "sha", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rewriteHistory", | |
| "in": "query", | |
| "schema": { | |
| "default": true | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/lfs-files/{sha}": { | |
| "delete": { | |
| "description": "Delete a Xet/LFS file", | |
| "summary": "Delete Large file", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "sha", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rewriteHistory", | |
| "in": "query", | |
| "schema": { | |
| "default": true | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/lfs-files/{sha}": { | |
| "delete": { | |
| "description": "Delete a Xet/LFS file", | |
| "summary": "Delete Large file", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "sha", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rewriteHistory", | |
| "in": "query", | |
| "schema": { | |
| "default": true | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/commits/{rev}": { | |
| "get": { | |
| "summary": "List commits", | |
| "tags": [ | |
| "models" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "authors": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "user": { | |
| "type": "string" | |
| }, | |
| "avatar": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "user" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "date": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "formatted": { | |
| "description": "Available if expand includes formatted", | |
| "type": "object", | |
| "properties": { | |
| "title": { | |
| "type": "string" | |
| }, | |
| "message": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "title" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "title", | |
| "message", | |
| "authors", | |
| "date" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "Commits list", | |
| "headers": { | |
| "X-Total-Count": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| } | |
| }, | |
| "Link": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| }, | |
| "description": "Link to the next page" | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "p", | |
| "in": "query", | |
| "schema": { | |
| "default": 0, | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "expand", | |
| "in": "query", | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "formatted" | |
| ] | |
| } | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "limit", | |
| "in": "query", | |
| "schema": { | |
| "default": 50, | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 1000 | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/commits/{rev}": { | |
| "get": { | |
| "summary": "List commits", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "authors": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "user": { | |
| "type": "string" | |
| }, | |
| "avatar": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "user" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "date": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "formatted": { | |
| "description": "Available if expand includes formatted", | |
| "type": "object", | |
| "properties": { | |
| "title": { | |
| "type": "string" | |
| }, | |
| "message": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "title" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "title", | |
| "message", | |
| "authors", | |
| "date" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "Commits list", | |
| "headers": { | |
| "X-Total-Count": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| } | |
| }, | |
| "Link": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| }, | |
| "description": "Link to the next page" | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "p", | |
| "in": "query", | |
| "schema": { | |
| "default": 0, | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "expand", | |
| "in": "query", | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "formatted" | |
| ] | |
| } | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "limit", | |
| "in": "query", | |
| "schema": { | |
| "default": 50, | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 1000 | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/commits/{rev}": { | |
| "get": { | |
| "summary": "List commits", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "authors": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "user": { | |
| "type": "string" | |
| }, | |
| "avatar": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "user" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "date": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "formatted": { | |
| "description": "Available if expand includes formatted", | |
| "type": "object", | |
| "properties": { | |
| "title": { | |
| "type": "string" | |
| }, | |
| "message": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "title" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "title", | |
| "message", | |
| "authors", | |
| "date" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "Commits list", | |
| "headers": { | |
| "X-Total-Count": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| } | |
| }, | |
| "Link": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| }, | |
| "description": "Link to the next page" | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "p", | |
| "in": "query", | |
| "schema": { | |
| "default": 0, | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "expand", | |
| "in": "query", | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "enum": [ | |
| "formatted" | |
| ] | |
| } | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "limit", | |
| "in": "query", | |
| "schema": { | |
| "default": 50, | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 1000 | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/refs": { | |
| "get": { | |
| "summary": "List references", | |
| "tags": [ | |
| "models" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "tags": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "ref": { | |
| "type": "string" | |
| }, | |
| "targetCommit": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "ref", | |
| "targetCommit" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "branches": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "ref": { | |
| "type": "string" | |
| }, | |
| "targetCommit": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "ref", | |
| "targetCommit" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "converts": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "ref": { | |
| "type": "string" | |
| }, | |
| "targetCommit": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "ref", | |
| "targetCommit" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "pullRequests": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "ref": { | |
| "type": "string" | |
| }, | |
| "targetCommit": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "ref", | |
| "targetCommit" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "tags", | |
| "branches", | |
| "converts" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "List of references in the repository" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "include_prs", | |
| "in": "query", | |
| "schema": { | |
| "default": false | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/refs": { | |
| "get": { | |
| "summary": "List references", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "tags": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "ref": { | |
| "type": "string" | |
| }, | |
| "targetCommit": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "ref", | |
| "targetCommit" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "branches": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "ref": { | |
| "type": "string" | |
| }, | |
| "targetCommit": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "ref", | |
| "targetCommit" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "converts": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "ref": { | |
| "type": "string" | |
| }, | |
| "targetCommit": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "ref", | |
| "targetCommit" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "pullRequests": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "ref": { | |
| "type": "string" | |
| }, | |
| "targetCommit": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "ref", | |
| "targetCommit" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "tags", | |
| "branches", | |
| "converts" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "List of references in the repository" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "include_prs", | |
| "in": "query", | |
| "schema": { | |
| "default": false | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/refs": { | |
| "get": { | |
| "summary": "List references", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "tags": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "ref": { | |
| "type": "string" | |
| }, | |
| "targetCommit": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "ref", | |
| "targetCommit" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "branches": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "ref": { | |
| "type": "string" | |
| }, | |
| "targetCommit": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "ref", | |
| "targetCommit" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "converts": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "ref": { | |
| "type": "string" | |
| }, | |
| "targetCommit": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "ref", | |
| "targetCommit" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "pullRequests": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "ref": { | |
| "type": "string" | |
| }, | |
| "targetCommit": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "ref", | |
| "targetCommit" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "tags", | |
| "branches", | |
| "converts" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "List of references in the repository" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "include_prs", | |
| "in": "query", | |
| "schema": { | |
| "default": false | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/compare/{compare}": { | |
| "get": { | |
| "summary": "Get a compare rev", | |
| "tags": [ | |
| "models" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "description": "The diff between the two revisions" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "compare", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "raw", | |
| "in": "query", | |
| "schema": { | |
| "default": false | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/compare/{compare}": { | |
| "get": { | |
| "summary": "Get a compare rev", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "description": "The diff between the two revisions" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "compare", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "raw", | |
| "in": "query", | |
| "schema": { | |
| "default": false | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/compare/{compare}": { | |
| "get": { | |
| "summary": "Get a compare rev", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "description": "The diff between the two revisions" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "compare", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "raw", | |
| "in": "query", | |
| "schema": { | |
| "default": false | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/paths-info/{rev}": { | |
| "post": { | |
| "summary": "List paths info", | |
| "tags": [ | |
| "models" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "paths": { | |
| "anyOf": [ | |
| { | |
| "maxItems": 2000, | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "type": "string" | |
| } | |
| ] | |
| }, | |
| "expand": { | |
| "description": "Expand the response with the last commit and security file status", | |
| "anyOf": [ | |
| { | |
| "default": false | |
| }, | |
| { | |
| "default": false, | |
| "type": "boolean" | |
| } | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "paths", | |
| "expand" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "enum": [ | |
| "file", | |
| "directory", | |
| "unknown" | |
| ] | |
| }, | |
| "oid": { | |
| "type": "string" | |
| }, | |
| "size": { | |
| "type": "number" | |
| }, | |
| "lfs": { | |
| "type": "object", | |
| "properties": { | |
| "pointerSize": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "pointerSize" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "xetHash": { | |
| "type": "string" | |
| }, | |
| "path": { | |
| "type": "string" | |
| }, | |
| "lastCommit": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "date": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "title", | |
| "date" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "securityFileStatus": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "jFrogScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "protectAiScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "avScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "pickleImportScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "virusTotalScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "status", | |
| "avScan", | |
| "pickleImportScan" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "oid", | |
| "size", | |
| "path" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "List of paths in the repository" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/paths-info/{rev}": { | |
| "post": { | |
| "summary": "List paths info", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "paths": { | |
| "anyOf": [ | |
| { | |
| "maxItems": 2000, | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "type": "string" | |
| } | |
| ] | |
| }, | |
| "expand": { | |
| "description": "Expand the response with the last commit and security file status", | |
| "anyOf": [ | |
| { | |
| "default": false | |
| }, | |
| { | |
| "default": false, | |
| "type": "boolean" | |
| } | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "paths", | |
| "expand" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "enum": [ | |
| "file", | |
| "directory", | |
| "unknown" | |
| ] | |
| }, | |
| "oid": { | |
| "type": "string" | |
| }, | |
| "size": { | |
| "type": "number" | |
| }, | |
| "lfs": { | |
| "type": "object", | |
| "properties": { | |
| "pointerSize": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "pointerSize" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "xetHash": { | |
| "type": "string" | |
| }, | |
| "path": { | |
| "type": "string" | |
| }, | |
| "lastCommit": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "date": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "title", | |
| "date" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "securityFileStatus": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "jFrogScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "protectAiScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "avScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "pickleImportScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "virusTotalScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "status", | |
| "avScan", | |
| "pickleImportScan" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "oid", | |
| "size", | |
| "path" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "List of paths in the repository" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/paths-info/{rev}": { | |
| "post": { | |
| "summary": "List paths info", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "paths": { | |
| "anyOf": [ | |
| { | |
| "maxItems": 2000, | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "type": "string" | |
| } | |
| ] | |
| }, | |
| "expand": { | |
| "description": "Expand the response with the last commit and security file status", | |
| "anyOf": [ | |
| { | |
| "default": false | |
| }, | |
| { | |
| "default": false, | |
| "type": "boolean" | |
| } | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "paths", | |
| "expand" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "enum": [ | |
| "file", | |
| "directory", | |
| "unknown" | |
| ] | |
| }, | |
| "oid": { | |
| "type": "string" | |
| }, | |
| "size": { | |
| "type": "number" | |
| }, | |
| "lfs": { | |
| "type": "object", | |
| "properties": { | |
| "pointerSize": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "pointerSize" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "xetHash": { | |
| "type": "string" | |
| }, | |
| "path": { | |
| "type": "string" | |
| }, | |
| "lastCommit": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "date": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "title", | |
| "date" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "securityFileStatus": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "jFrogScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "protectAiScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "avScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "pickleImportScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "virusTotalScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "status", | |
| "avScan", | |
| "pickleImportScan" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "oid", | |
| "size", | |
| "path" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "List of paths in the repository" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/preupload/{rev}": { | |
| "post": { | |
| "description": "Check if a file should be uploaded through the Large File mechanism or directly.", | |
| "summary": "Check upload method", | |
| "tags": [ | |
| "models" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "files": { | |
| "maxItems": 1000, | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "path": { | |
| "type": "string" | |
| }, | |
| "size": { | |
| "type": "number" | |
| }, | |
| "sample": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "path", | |
| "size", | |
| "sample" | |
| ] | |
| } | |
| }, | |
| "gitAttributes": { | |
| "description": "Provide this parameter if you plan to modify `.gitattributes` yourself at the same time as uploading LFS files. Note that this is not needed if you solely rely on automatic LFS detection from HF: the commit endpoint will automatically edit the `.gitattributes` file to track the files passed to its `lfsFiles` param.", | |
| "type": "string" | |
| }, | |
| "gitIgnore": { | |
| "description": "Content of the .gitignore file for the revision. Optional, otherwise takes the existing content of `.gitignore` for the revision.", | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "files" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "files": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "path": { | |
| "type": "string" | |
| }, | |
| "uploadMode": { | |
| "enum": [ | |
| "lfs", | |
| "regular" | |
| ] | |
| }, | |
| "shouldIgnore": { | |
| "type": "boolean" | |
| }, | |
| "oid": { | |
| "description": "The oid of the blob if it already exists in the repository. If the blob is a LFS file, it'll be the lfs oid.", | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "path", | |
| "uploadMode", | |
| "shouldIgnore" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "commitOid": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "files", | |
| "commitOid" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Files to be uploaded." | |
| }, | |
| "422": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema" | |
| } | |
| } | |
| }, | |
| "description": "The request is invalid" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/preupload/{rev}": { | |
| "post": { | |
| "description": "Check if a file should be uploaded through the Large File mechanism or directly.", | |
| "summary": "Check upload method", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "files": { | |
| "maxItems": 1000, | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "path": { | |
| "type": "string" | |
| }, | |
| "size": { | |
| "type": "number" | |
| }, | |
| "sample": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "path", | |
| "size", | |
| "sample" | |
| ] | |
| } | |
| }, | |
| "gitAttributes": { | |
| "description": "Provide this parameter if you plan to modify `.gitattributes` yourself at the same time as uploading LFS files. Note that this is not needed if you solely rely on automatic LFS detection from HF: the commit endpoint will automatically edit the `.gitattributes` file to track the files passed to its `lfsFiles` param.", | |
| "type": "string" | |
| }, | |
| "gitIgnore": { | |
| "description": "Content of the .gitignore file for the revision. Optional, otherwise takes the existing content of `.gitignore` for the revision.", | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "files" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "files": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "path": { | |
| "type": "string" | |
| }, | |
| "uploadMode": { | |
| "enum": [ | |
| "lfs", | |
| "regular" | |
| ] | |
| }, | |
| "shouldIgnore": { | |
| "type": "boolean" | |
| }, | |
| "oid": { | |
| "description": "The oid of the blob if it already exists in the repository. If the blob is a LFS file, it'll be the lfs oid.", | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "path", | |
| "uploadMode", | |
| "shouldIgnore" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "commitOid": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "files", | |
| "commitOid" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Files to be uploaded." | |
| }, | |
| "422": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema" | |
| } | |
| } | |
| }, | |
| "description": "The request is invalid" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/preupload/{rev}": { | |
| "post": { | |
| "description": "Check if a file should be uploaded through the Large File mechanism or directly.", | |
| "summary": "Check upload method", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "files": { | |
| "maxItems": 1000, | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "path": { | |
| "type": "string" | |
| }, | |
| "size": { | |
| "type": "number" | |
| }, | |
| "sample": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "path", | |
| "size", | |
| "sample" | |
| ] | |
| } | |
| }, | |
| "gitAttributes": { | |
| "description": "Provide this parameter if you plan to modify `.gitattributes` yourself at the same time as uploading LFS files. Note that this is not needed if you solely rely on automatic LFS detection from HF: the commit endpoint will automatically edit the `.gitattributes` file to track the files passed to its `lfsFiles` param.", | |
| "type": "string" | |
| }, | |
| "gitIgnore": { | |
| "description": "Content of the .gitignore file for the revision. Optional, otherwise takes the existing content of `.gitignore` for the revision.", | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "files" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "files": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "path": { | |
| "type": "string" | |
| }, | |
| "uploadMode": { | |
| "enum": [ | |
| "lfs", | |
| "regular" | |
| ] | |
| }, | |
| "shouldIgnore": { | |
| "type": "boolean" | |
| }, | |
| "oid": { | |
| "description": "The oid of the blob if it already exists in the repository. If the blob is a LFS file, it'll be the lfs oid.", | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "path", | |
| "uploadMode", | |
| "shouldIgnore" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "commitOid": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "files", | |
| "commitOid" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Files to be uploaded." | |
| }, | |
| "422": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema" | |
| } | |
| } | |
| }, | |
| "description": "The request is invalid" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/xet-write-token/{rev}": { | |
| "get": { | |
| "description": "Get a write short-lived access token for XET upload", | |
| "summary": "Xet write token", | |
| "tags": [ | |
| "models" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "casUrl": { | |
| "type": "string" | |
| }, | |
| "exp": { | |
| "type": "number" | |
| }, | |
| "accessToken": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "casUrl", | |
| "exp", | |
| "accessToken" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The response from the getXetWriteAccessToken endpoint.", | |
| "headers": { | |
| "X-Xet-Cas-Url": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| }, | |
| "X-Xet-Token-Expiration": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| }, | |
| "X-Xet-Access-Token": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/xet-write-token/{rev}": { | |
| "get": { | |
| "description": "Get a write short-lived access token for XET upload", | |
| "summary": "Xet write token", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "casUrl": { | |
| "type": "string" | |
| }, | |
| "exp": { | |
| "type": "number" | |
| }, | |
| "accessToken": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "casUrl", | |
| "exp", | |
| "accessToken" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The response from the getXetWriteAccessToken endpoint.", | |
| "headers": { | |
| "X-Xet-Cas-Url": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| }, | |
| "X-Xet-Token-Expiration": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| }, | |
| "X-Xet-Access-Token": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/xet-write-token/{rev}": { | |
| "get": { | |
| "description": "Get a write short-lived access token for XET upload", | |
| "summary": "Xet write token", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "casUrl": { | |
| "type": "string" | |
| }, | |
| "exp": { | |
| "type": "number" | |
| }, | |
| "accessToken": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "casUrl", | |
| "exp", | |
| "accessToken" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The response from the getXetWriteAccessToken endpoint.", | |
| "headers": { | |
| "X-Xet-Cas-Url": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| }, | |
| "X-Xet-Token-Expiration": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| }, | |
| "X-Xet-Access-Token": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/{repoType}/{namespace}/{repo}/xet-write-token": { | |
| "get": { | |
| "description": "Get a write short-lived access token for XET upload", | |
| "summary": "Xet write token", | |
| "tags": [ | |
| "buckets" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "casUrl": { | |
| "type": "string" | |
| }, | |
| "exp": { | |
| "type": "number" | |
| }, | |
| "accessToken": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "casUrl", | |
| "exp", | |
| "accessToken" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The response from the getXetWriteAccessToken endpoint.", | |
| "headers": { | |
| "X-Xet-Cas-Url": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| }, | |
| "X-Xet-Token-Expiration": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| }, | |
| "X-Xet-Access-Token": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "repoType", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "buckets" | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/xet-read-token/{rev}": { | |
| "get": { | |
| "description": "Get a read short-lived access token for XET", | |
| "summary": "Xet read token", | |
| "tags": [ | |
| "models" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "casUrl": { | |
| "type": "string" | |
| }, | |
| "exp": { | |
| "type": "number" | |
| }, | |
| "accessToken": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "casUrl", | |
| "exp", | |
| "accessToken" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The response from the getXetReadAccessToken endpoint.", | |
| "headers": { | |
| "X-Xet-Cas-Url": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| }, | |
| "X-Xet-Token-Expiration": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| }, | |
| "X-Xet-Access-Token": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/xet-read-token/{rev}": { | |
| "get": { | |
| "description": "Get a read short-lived access token for XET", | |
| "summary": "Xet read token", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "casUrl": { | |
| "type": "string" | |
| }, | |
| "exp": { | |
| "type": "number" | |
| }, | |
| "accessToken": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "casUrl", | |
| "exp", | |
| "accessToken" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The response from the getXetReadAccessToken endpoint.", | |
| "headers": { | |
| "X-Xet-Cas-Url": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| }, | |
| "X-Xet-Token-Expiration": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| }, | |
| "X-Xet-Access-Token": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/xet-read-token/{rev}": { | |
| "get": { | |
| "description": "Get a read short-lived access token for XET", | |
| "summary": "Xet read token", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "casUrl": { | |
| "type": "string" | |
| }, | |
| "exp": { | |
| "type": "number" | |
| }, | |
| "accessToken": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "casUrl", | |
| "exp", | |
| "accessToken" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The response from the getXetReadAccessToken endpoint.", | |
| "headers": { | |
| "X-Xet-Cas-Url": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| }, | |
| "X-Xet-Token-Expiration": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| }, | |
| "X-Xet-Access-Token": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/{repoType}/{namespace}/{repo}/xet-read-token": { | |
| "get": { | |
| "description": "Get a read short-lived access token for XET", | |
| "summary": "Xet read token", | |
| "tags": [ | |
| "buckets" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "casUrl": { | |
| "type": "string" | |
| }, | |
| "exp": { | |
| "type": "number" | |
| }, | |
| "accessToken": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "casUrl", | |
| "exp", | |
| "accessToken" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The response from the getXetReadAccessToken endpoint.", | |
| "headers": { | |
| "X-Xet-Cas-Url": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| }, | |
| "X-Xet-Token-Expiration": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| }, | |
| "X-Xet-Access-Token": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "repoType", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "buckets" | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/commit/{rev}": { | |
| "post": { | |
| "description": "For legacy reason, we support both `application/json` and `application/x-ndjson` but we recommend using `application/x-ndjson` to create a commit.\n\nJSON-lines payload:\n```json\n{\n \"key\": \"header\",\n \"value\": {\n \"summary\": \"string (REQUIRED)\",\n \"description\": \"string (OPTIONAL - defaults to empty string)\",\n \"parentCommit\": \"string (OPTIONAL - 40-character hex SHA)\"\n }\n}\n{\n \"key\": \"file\", \n \"value\": {\n \"path\": \"string (REQUIRED)\",\n \"content\": \"string (OPTIONAL - required if oldPath not set)\",\n \"encoding\": \"utf-8 | base64 (OPTIONAL - defaults to utf-8)\",\n \"oldPath\": \"string (OPTIONAL - for move/rename operations)\"\n }\n}\n{\n \"key\": \"deletedEntry\",\n \"value\": {\n \"path\": \"string (REQUIRED)\"\n }\n}\n{\n \"key\": \"lfsFile\",\n \"value\": {\n \"path\": \"string (REQUIRED - max 1000 chars)\",\n \"oid\": \"string (OPTIONAL - required if oldPath not set, 64 hex chars)\",\n \"algo\": \"sha256 (OPTIONAL - only sha256 supported)\",\n \"size\": \"number (OPTIONAL - required if oldPath is set)\",\n \"oldPath\": \"string (OPTIONAL - for move/rename operations)\"\n }\n}\n```\n\nJSON payload:\n```json\n{\n \"summary\": \"string (REQUIRED)\",\n \"description\": \"string (OPTIONAL - defaults to empty string)\",\n \"parentCommit\": \"string (OPTIONAL - 40-character hex SHA)\"\n \"files\": [\n {\n \"path\": \"string (REQUIRED)\",\n \"content\": \"string (OPTIONAL - required if oldPath not set)\",\n \"encoding\": \"utf-8 | base64 (OPTIONAL - defaults to utf-8)\",\n \"oldPath\": \"string (OPTIONAL - for move/rename operations)\"\n }\n ],\n \"deletedEntries\": [\n {\n \"path\": \"string (REQUIRED)\"\n }\n ],\n \"lfsFiles\": [\n {\n \"path\": \"string (REQUIRED - max 1000 chars)\",\n \"oid\": \"string (OPTIONAL - required if oldPath not set, 64 hex chars)\",\n \"algo\": \"sha256 (OPTIONAL - only sha256 supported)\",\n \"size\": \"number (OPTIONAL - required if oldPath is set)\",\n \"oldPath\": \"string (OPTIONAL - for move/rename operations)\"\n }\n ]\n}\n```\n", | |
| "summary": "Commit", | |
| "tags": [ | |
| "models" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "success": { | |
| "description": "Whether the commit was successful", | |
| "type": "boolean" | |
| }, | |
| "pullRequestUrl": { | |
| "description": "The URL of the pull request", | |
| "type": "string" | |
| }, | |
| "commitOid": { | |
| "description": "The OID of the commit", | |
| "type": "string" | |
| }, | |
| "commitUrl": { | |
| "description": "The URL of the commit", | |
| "type": "string" | |
| }, | |
| "hookOutput": { | |
| "description": "The output of the git hook", | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "success", | |
| "commitOid", | |
| "commitUrl", | |
| "hookOutput" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The response of the commit" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "create_pr", | |
| "in": "query", | |
| "schema": { | |
| "description": "Whether to create a pull request from the commit" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "hot_reload", | |
| "in": "query", | |
| "schema": { | |
| "description": "For Spaces, whether to try to hot reload the commit (only for single python files updates)" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "Content-Type", | |
| "in": "header", | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "description": "`application/x-ndjson` if you to commit by json lines", | |
| "default": "application/x-ndjson", | |
| "enum": [ | |
| "application/json", | |
| "application/x-ndjson" | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/commit/{rev}": { | |
| "post": { | |
| "description": "For legacy reason, we support both `application/json` and `application/x-ndjson` but we recommend using `application/x-ndjson` to create a commit.\n\nJSON-lines payload:\n```json\n{\n \"key\": \"header\",\n \"value\": {\n \"summary\": \"string (REQUIRED)\",\n \"description\": \"string (OPTIONAL - defaults to empty string)\",\n \"parentCommit\": \"string (OPTIONAL - 40-character hex SHA)\"\n }\n}\n{\n \"key\": \"file\", \n \"value\": {\n \"path\": \"string (REQUIRED)\",\n \"content\": \"string (OPTIONAL - required if oldPath not set)\",\n \"encoding\": \"utf-8 | base64 (OPTIONAL - defaults to utf-8)\",\n \"oldPath\": \"string (OPTIONAL - for move/rename operations)\"\n }\n}\n{\n \"key\": \"deletedEntry\",\n \"value\": {\n \"path\": \"string (REQUIRED)\"\n }\n}\n{\n \"key\": \"lfsFile\",\n \"value\": {\n \"path\": \"string (REQUIRED - max 1000 chars)\",\n \"oid\": \"string (OPTIONAL - required if oldPath not set, 64 hex chars)\",\n \"algo\": \"sha256 (OPTIONAL - only sha256 supported)\",\n \"size\": \"number (OPTIONAL - required if oldPath is set)\",\n \"oldPath\": \"string (OPTIONAL - for move/rename operations)\"\n }\n}\n```\n\nJSON payload:\n```json\n{\n \"summary\": \"string (REQUIRED)\",\n \"description\": \"string (OPTIONAL - defaults to empty string)\",\n \"parentCommit\": \"string (OPTIONAL - 40-character hex SHA)\"\n \"files\": [\n {\n \"path\": \"string (REQUIRED)\",\n \"content\": \"string (OPTIONAL - required if oldPath not set)\",\n \"encoding\": \"utf-8 | base64 (OPTIONAL - defaults to utf-8)\",\n \"oldPath\": \"string (OPTIONAL - for move/rename operations)\"\n }\n ],\n \"deletedEntries\": [\n {\n \"path\": \"string (REQUIRED)\"\n }\n ],\n \"lfsFiles\": [\n {\n \"path\": \"string (REQUIRED - max 1000 chars)\",\n \"oid\": \"string (OPTIONAL - required if oldPath not set, 64 hex chars)\",\n \"algo\": \"sha256 (OPTIONAL - only sha256 supported)\",\n \"size\": \"number (OPTIONAL - required if oldPath is set)\",\n \"oldPath\": \"string (OPTIONAL - for move/rename operations)\"\n }\n ]\n}\n```\n", | |
| "summary": "Commit", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "success": { | |
| "description": "Whether the commit was successful", | |
| "type": "boolean" | |
| }, | |
| "pullRequestUrl": { | |
| "description": "The URL of the pull request", | |
| "type": "string" | |
| }, | |
| "commitOid": { | |
| "description": "The OID of the commit", | |
| "type": "string" | |
| }, | |
| "commitUrl": { | |
| "description": "The URL of the commit", | |
| "type": "string" | |
| }, | |
| "hookOutput": { | |
| "description": "The output of the git hook", | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "success", | |
| "commitOid", | |
| "commitUrl", | |
| "hookOutput" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The response of the commit" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "create_pr", | |
| "in": "query", | |
| "schema": { | |
| "description": "Whether to create a pull request from the commit" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "hot_reload", | |
| "in": "query", | |
| "schema": { | |
| "description": "For Spaces, whether to try to hot reload the commit (only for single python files updates)" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "Content-Type", | |
| "in": "header", | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "description": "`application/x-ndjson` if you to commit by json lines", | |
| "default": "application/x-ndjson", | |
| "enum": [ | |
| "application/json", | |
| "application/x-ndjson" | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/commit/{rev}": { | |
| "post": { | |
| "description": "For legacy reason, we support both `application/json` and `application/x-ndjson` but we recommend using `application/x-ndjson` to create a commit.\n\nJSON-lines payload:\n```json\n{\n \"key\": \"header\",\n \"value\": {\n \"summary\": \"string (REQUIRED)\",\n \"description\": \"string (OPTIONAL - defaults to empty string)\",\n \"parentCommit\": \"string (OPTIONAL - 40-character hex SHA)\"\n }\n}\n{\n \"key\": \"file\", \n \"value\": {\n \"path\": \"string (REQUIRED)\",\n \"content\": \"string (OPTIONAL - required if oldPath not set)\",\n \"encoding\": \"utf-8 | base64 (OPTIONAL - defaults to utf-8)\",\n \"oldPath\": \"string (OPTIONAL - for move/rename operations)\"\n }\n}\n{\n \"key\": \"deletedEntry\",\n \"value\": {\n \"path\": \"string (REQUIRED)\"\n }\n}\n{\n \"key\": \"lfsFile\",\n \"value\": {\n \"path\": \"string (REQUIRED - max 1000 chars)\",\n \"oid\": \"string (OPTIONAL - required if oldPath not set, 64 hex chars)\",\n \"algo\": \"sha256 (OPTIONAL - only sha256 supported)\",\n \"size\": \"number (OPTIONAL - required if oldPath is set)\",\n \"oldPath\": \"string (OPTIONAL - for move/rename operations)\"\n }\n}\n```\n\nJSON payload:\n```json\n{\n \"summary\": \"string (REQUIRED)\",\n \"description\": \"string (OPTIONAL - defaults to empty string)\",\n \"parentCommit\": \"string (OPTIONAL - 40-character hex SHA)\"\n \"files\": [\n {\n \"path\": \"string (REQUIRED)\",\n \"content\": \"string (OPTIONAL - required if oldPath not set)\",\n \"encoding\": \"utf-8 | base64 (OPTIONAL - defaults to utf-8)\",\n \"oldPath\": \"string (OPTIONAL - for move/rename operations)\"\n }\n ],\n \"deletedEntries\": [\n {\n \"path\": \"string (REQUIRED)\"\n }\n ],\n \"lfsFiles\": [\n {\n \"path\": \"string (REQUIRED - max 1000 chars)\",\n \"oid\": \"string (OPTIONAL - required if oldPath not set, 64 hex chars)\",\n \"algo\": \"sha256 (OPTIONAL - only sha256 supported)\",\n \"size\": \"number (OPTIONAL - required if oldPath is set)\",\n \"oldPath\": \"string (OPTIONAL - for move/rename operations)\"\n }\n ]\n}\n```\n", | |
| "summary": "Commit", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "success": { | |
| "description": "Whether the commit was successful", | |
| "type": "boolean" | |
| }, | |
| "pullRequestUrl": { | |
| "description": "The URL of the pull request", | |
| "type": "string" | |
| }, | |
| "commitOid": { | |
| "description": "The OID of the commit", | |
| "type": "string" | |
| }, | |
| "commitUrl": { | |
| "description": "The URL of the commit", | |
| "type": "string" | |
| }, | |
| "hookOutput": { | |
| "description": "The output of the git hook", | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "success", | |
| "commitOid", | |
| "commitUrl", | |
| "hookOutput" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The response of the commit" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "create_pr", | |
| "in": "query", | |
| "schema": { | |
| "description": "Whether to create a pull request from the commit" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "hot_reload", | |
| "in": "query", | |
| "schema": { | |
| "description": "For Spaces, whether to try to hot reload the commit (only for single python files updates)" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "Content-Type", | |
| "in": "header", | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "description": "`application/x-ndjson` if you to commit by json lines", | |
| "default": "application/x-ndjson", | |
| "enum": [ | |
| "application/json", | |
| "application/x-ndjson" | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/tag/{rev}": { | |
| "post": { | |
| "summary": "Create tag", | |
| "tags": [ | |
| "models" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "tag": { | |
| "type": "string" | |
| }, | |
| "message": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "tag" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "delete": { | |
| "summary": "Delete a tag", | |
| "tags": [ | |
| "models" | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/tag/{rev}": { | |
| "post": { | |
| "summary": "Create tag", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "tag": { | |
| "type": "string" | |
| }, | |
| "message": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "tag" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "delete": { | |
| "summary": "Delete a tag", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/tag/{rev}": { | |
| "post": { | |
| "summary": "Create tag", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "tag": { | |
| "type": "string" | |
| }, | |
| "message": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "tag" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "delete": { | |
| "summary": "Delete a tag", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/branch/{rev}": { | |
| "post": { | |
| "summary": "Create branch", | |
| "tags": [ | |
| "models" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "startingPoint": { | |
| "description": "The commit to start from", | |
| "type": "string" | |
| }, | |
| "emptyBranch": { | |
| "description": "Create an empty branch", | |
| "default": false, | |
| "type": "boolean" | |
| }, | |
| "overwrite": { | |
| "description": "Overwrite the branch if it already exists", | |
| "default": false, | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "delete": { | |
| "summary": "Delete a branch", | |
| "tags": [ | |
| "models" | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/branch/{rev}": { | |
| "post": { | |
| "summary": "Create branch", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "startingPoint": { | |
| "description": "The commit to start from", | |
| "type": "string" | |
| }, | |
| "emptyBranch": { | |
| "description": "Create an empty branch", | |
| "default": false, | |
| "type": "boolean" | |
| }, | |
| "overwrite": { | |
| "description": "Overwrite the branch if it already exists", | |
| "default": false, | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "delete": { | |
| "summary": "Delete a branch", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/branch/{rev}": { | |
| "post": { | |
| "summary": "Create branch", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "startingPoint": { | |
| "description": "The commit to start from", | |
| "type": "string" | |
| }, | |
| "emptyBranch": { | |
| "description": "Create an empty branch", | |
| "default": false, | |
| "type": "boolean" | |
| }, | |
| "overwrite": { | |
| "description": "Overwrite the branch if it already exists", | |
| "default": false, | |
| "type": "boolean" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "delete": { | |
| "summary": "Delete a branch", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/{repoType}/{namespace}/{repo}/resource-group": { | |
| "post": { | |
| "description": "Add the repository to a resource group", | |
| "summary": "Add resource group", | |
| "tags": [ | |
| "models", | |
| "spaces", | |
| "datasets", | |
| "buckets" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "resourceGroupId": { | |
| "description": "The resource group to add the repository to, if null, the repository will be removed from the resource group", | |
| "anyOf": [ | |
| { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "resourceGroupId" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "dataset", | |
| "model", | |
| "space", | |
| "bucket", | |
| "kernel" | |
| ] | |
| }, | |
| "private": { | |
| "type": "boolean" | |
| }, | |
| "addedBy": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "type", | |
| "private", | |
| "addedBy" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Minimal information about the repository" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "repoType", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "models", | |
| "spaces", | |
| "datasets", | |
| "kernels", | |
| "buckets" | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| }, | |
| "get": { | |
| "summary": "Get resource group", | |
| "tags": [ | |
| "models", | |
| "spaces", | |
| "datasets", | |
| "buckets" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The resource group of the repository" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "repoType", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "models", | |
| "spaces", | |
| "datasets", | |
| "kernels", | |
| "buckets" | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/super-squash/{rev}": { | |
| "post": { | |
| "description": "Squash all commits in the current ref into a single commit with the given message. Action is irreversible.", | |
| "summary": "Squash ref", | |
| "tags": [ | |
| "models" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "message": { | |
| "type": "string", | |
| "maxLength": 500 | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "commitId": { | |
| "description": "The new commit ID after the squash", | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "commitId" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Response containing the new commit ID after the squash" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/super-squash/{rev}": { | |
| "post": { | |
| "description": "Squash all commits in the current ref into a single commit with the given message. Action is irreversible.", | |
| "summary": "Squash ref", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "message": { | |
| "type": "string", | |
| "maxLength": 500 | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "commitId": { | |
| "description": "The new commit ID after the squash", | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "commitId" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Response containing the new commit ID after the squash" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/super-squash/{rev}": { | |
| "post": { | |
| "description": "Squash all commits in the current ref into a single commit with the given message. Action is irreversible.", | |
| "summary": "Squash ref", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "message": { | |
| "type": "string", | |
| "maxLength": 500 | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "commitId": { | |
| "description": "The new commit ID after the squash", | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "commitId" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Response containing the new commit ID after the squash" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/settings": { | |
| "put": { | |
| "description": "Update the settings of a repo", | |
| "summary": "Update repo settings", | |
| "tags": [ | |
| "models" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "private": { | |
| "type": "boolean" | |
| }, | |
| "visibility": { | |
| "description": "Repository visibility. `protected` is only supported for Spaces.", | |
| "enum": [ | |
| "private", | |
| "public", | |
| "protected" | |
| ] | |
| }, | |
| "discussionsDisabled": { | |
| "type": "boolean" | |
| }, | |
| "discussionsSorting": { | |
| "enum": [ | |
| "recently-created", | |
| "trending", | |
| "reactions" | |
| ] | |
| }, | |
| "gated": { | |
| "anyOf": [ | |
| { | |
| "const": false | |
| }, | |
| { | |
| "enum": [ | |
| "auto", | |
| "manual" | |
| ] | |
| } | |
| ] | |
| }, | |
| "gatedNotificationsEmail": { | |
| "type": "string", | |
| "format": "email", | |
| "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" | |
| }, | |
| "gatedNotificationsMode": { | |
| "enum": [ | |
| "bulk", | |
| "real-time" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "private": { | |
| "type": "boolean" | |
| }, | |
| "visibility": { | |
| "description": "Repository visibility. `protected` is only supported for Spaces.", | |
| "enum": [ | |
| "private", | |
| "public", | |
| "protected" | |
| ] | |
| }, | |
| "discussionsDisabled": { | |
| "type": "boolean" | |
| }, | |
| "discussionsSorting": { | |
| "enum": [ | |
| "recently-created", | |
| "trending", | |
| "reactions" | |
| ] | |
| }, | |
| "gated": { | |
| "anyOf": [ | |
| { | |
| "const": false | |
| }, | |
| { | |
| "enum": [ | |
| "auto", | |
| "manual" | |
| ] | |
| } | |
| ] | |
| }, | |
| "gatedNotificationsEmail": { | |
| "type": "string", | |
| "format": "email", | |
| "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" | |
| }, | |
| "gatedNotificationsMode": { | |
| "enum": [ | |
| "bulk", | |
| "real-time" | |
| ] | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The updated repo settings." | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/settings": { | |
| "put": { | |
| "description": "Update the settings of a repo", | |
| "summary": "Update repo settings", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "private": { | |
| "type": "boolean" | |
| }, | |
| "visibility": { | |
| "description": "Repository visibility. `protected` is only supported for Spaces.", | |
| "enum": [ | |
| "private", | |
| "public", | |
| "protected" | |
| ] | |
| }, | |
| "discussionsDisabled": { | |
| "type": "boolean" | |
| }, | |
| "discussionsSorting": { | |
| "enum": [ | |
| "recently-created", | |
| "trending", | |
| "reactions" | |
| ] | |
| }, | |
| "gated": { | |
| "anyOf": [ | |
| { | |
| "const": false | |
| }, | |
| { | |
| "enum": [ | |
| "auto", | |
| "manual" | |
| ] | |
| } | |
| ] | |
| }, | |
| "gatedNotificationsEmail": { | |
| "type": "string", | |
| "format": "email", | |
| "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" | |
| }, | |
| "gatedNotificationsMode": { | |
| "enum": [ | |
| "bulk", | |
| "real-time" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "private": { | |
| "type": "boolean" | |
| }, | |
| "visibility": { | |
| "description": "Repository visibility. `protected` is only supported for Spaces.", | |
| "enum": [ | |
| "private", | |
| "public", | |
| "protected" | |
| ] | |
| }, | |
| "discussionsDisabled": { | |
| "type": "boolean" | |
| }, | |
| "discussionsSorting": { | |
| "enum": [ | |
| "recently-created", | |
| "trending", | |
| "reactions" | |
| ] | |
| }, | |
| "gated": { | |
| "anyOf": [ | |
| { | |
| "const": false | |
| }, | |
| { | |
| "enum": [ | |
| "auto", | |
| "manual" | |
| ] | |
| } | |
| ] | |
| }, | |
| "gatedNotificationsEmail": { | |
| "type": "string", | |
| "format": "email", | |
| "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" | |
| }, | |
| "gatedNotificationsMode": { | |
| "enum": [ | |
| "bulk", | |
| "real-time" | |
| ] | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The updated repo settings." | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/settings": { | |
| "put": { | |
| "description": "Update the settings of a repo", | |
| "summary": "Update repo settings", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "private": { | |
| "type": "boolean" | |
| }, | |
| "visibility": { | |
| "description": "Repository visibility. `protected` is only supported for Spaces.", | |
| "enum": [ | |
| "private", | |
| "public", | |
| "protected" | |
| ] | |
| }, | |
| "discussionsDisabled": { | |
| "type": "boolean" | |
| }, | |
| "discussionsSorting": { | |
| "enum": [ | |
| "recently-created", | |
| "trending", | |
| "reactions" | |
| ] | |
| }, | |
| "gated": { | |
| "anyOf": [ | |
| { | |
| "const": false | |
| }, | |
| { | |
| "enum": [ | |
| "auto", | |
| "manual" | |
| ] | |
| } | |
| ] | |
| }, | |
| "gatedNotificationsEmail": { | |
| "type": "string", | |
| "format": "email", | |
| "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" | |
| }, | |
| "gatedNotificationsMode": { | |
| "enum": [ | |
| "bulk", | |
| "real-time" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "private": { | |
| "type": "boolean" | |
| }, | |
| "visibility": { | |
| "description": "Repository visibility. `protected` is only supported for Spaces.", | |
| "enum": [ | |
| "private", | |
| "public", | |
| "protected" | |
| ] | |
| }, | |
| "discussionsDisabled": { | |
| "type": "boolean" | |
| }, | |
| "discussionsSorting": { | |
| "enum": [ | |
| "recently-created", | |
| "trending", | |
| "reactions" | |
| ] | |
| }, | |
| "gated": { | |
| "anyOf": [ | |
| { | |
| "const": false | |
| }, | |
| { | |
| "enum": [ | |
| "auto", | |
| "manual" | |
| ] | |
| } | |
| ] | |
| }, | |
| "gatedNotificationsEmail": { | |
| "type": "string", | |
| "format": "email", | |
| "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" | |
| }, | |
| "gatedNotificationsMode": { | |
| "enum": [ | |
| "bulk", | |
| "real-time" | |
| ] | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The updated repo settings." | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/tree/{rev}/{path}": { | |
| "get": { | |
| "description": "List the content of a repository tree, with pagination support.", | |
| "summary": "List folder content", | |
| "tags": [ | |
| "models" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "enum": [ | |
| "file", | |
| "directory", | |
| "unknown" | |
| ] | |
| }, | |
| "oid": { | |
| "type": "string" | |
| }, | |
| "size": { | |
| "description": "If the file is a LFS pointer, it'll return the size of the remote file", | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "lfs": { | |
| "type": "object", | |
| "properties": { | |
| "oid": { | |
| "type": "string" | |
| }, | |
| "size": { | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "pointerSize": { | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| } | |
| }, | |
| "required": [ | |
| "oid", | |
| "size", | |
| "pointerSize" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "xetHash": { | |
| "type": "string" | |
| }, | |
| "lastCommit": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "date": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "title", | |
| "date" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "securityFileStatus": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "jFrogScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "protectAiScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "avScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "pickleImportScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "virusTotalScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "status", | |
| "avScan", | |
| "pickleImportScan" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "oid" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "List of entries in the repository tree", | |
| "headers": { | |
| "Link": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| }, | |
| "description": "Link header for pagination, if applicable" | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "path", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "description": "Wildcard path parameter" | |
| } | |
| }, | |
| { | |
| "name": "expand", | |
| "in": "query", | |
| "schema": { | |
| "description": "If true, returns returns associated commit data for each entry and security scanner metadata.", | |
| "default": false | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "recursive", | |
| "in": "query", | |
| "schema": { | |
| "description": "If true, returns the tree recursively.", | |
| "default": false | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "limit", | |
| "in": "query", | |
| "schema": { | |
| "description": "1.000 by default, 100 by default for expand=true", | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 9007199254740991 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "cursor", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/tree/{rev}/{path}": { | |
| "get": { | |
| "description": "List the content of a repository tree, with pagination support.", | |
| "summary": "List folder content", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "enum": [ | |
| "file", | |
| "directory", | |
| "unknown" | |
| ] | |
| }, | |
| "oid": { | |
| "type": "string" | |
| }, | |
| "size": { | |
| "description": "If the file is a LFS pointer, it'll return the size of the remote file", | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "lfs": { | |
| "type": "object", | |
| "properties": { | |
| "oid": { | |
| "type": "string" | |
| }, | |
| "size": { | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "pointerSize": { | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| } | |
| }, | |
| "required": [ | |
| "oid", | |
| "size", | |
| "pointerSize" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "xetHash": { | |
| "type": "string" | |
| }, | |
| "lastCommit": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "date": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "title", | |
| "date" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "securityFileStatus": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "jFrogScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "protectAiScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "avScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "pickleImportScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "virusTotalScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "status", | |
| "avScan", | |
| "pickleImportScan" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "oid" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "List of entries in the repository tree", | |
| "headers": { | |
| "Link": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| }, | |
| "description": "Link header for pagination, if applicable" | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "path", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "description": "Wildcard path parameter" | |
| } | |
| }, | |
| { | |
| "name": "expand", | |
| "in": "query", | |
| "schema": { | |
| "description": "If true, returns returns associated commit data for each entry and security scanner metadata.", | |
| "default": false | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "recursive", | |
| "in": "query", | |
| "schema": { | |
| "description": "If true, returns the tree recursively.", | |
| "default": false | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "limit", | |
| "in": "query", | |
| "schema": { | |
| "description": "1.000 by default, 100 by default for expand=true", | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 9007199254740991 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "cursor", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/tree/{rev}/{path}": { | |
| "get": { | |
| "description": "List the content of a repository tree, with pagination support.", | |
| "summary": "List folder content", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "enum": [ | |
| "file", | |
| "directory", | |
| "unknown" | |
| ] | |
| }, | |
| "oid": { | |
| "type": "string" | |
| }, | |
| "size": { | |
| "description": "If the file is a LFS pointer, it'll return the size of the remote file", | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "lfs": { | |
| "type": "object", | |
| "properties": { | |
| "oid": { | |
| "type": "string" | |
| }, | |
| "size": { | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "pointerSize": { | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| } | |
| }, | |
| "required": [ | |
| "oid", | |
| "size", | |
| "pointerSize" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "xetHash": { | |
| "type": "string" | |
| }, | |
| "lastCommit": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "date": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "title", | |
| "date" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "securityFileStatus": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "jFrogScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "protectAiScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "avScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "pickleImportScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "virusTotalScan": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| }, | |
| "message": { | |
| "type": "string" | |
| }, | |
| "reportLink": { | |
| "type": "string" | |
| }, | |
| "reportLabel": { | |
| "type": "string" | |
| }, | |
| "pickleImports": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "module": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "safety": { | |
| "enum": [ | |
| "innocuous", | |
| "suspicious", | |
| "dangerous" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "module", | |
| "name", | |
| "safety" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "version": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "status", | |
| "avScan", | |
| "pickleImportScan" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "type", | |
| "oid" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| }, | |
| "description": "List of entries in the repository tree", | |
| "headers": { | |
| "Link": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "string" | |
| }, | |
| "description": "Link header for pagination, if applicable" | |
| } | |
| } | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "path", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "description": "Wildcard path parameter" | |
| } | |
| }, | |
| { | |
| "name": "expand", | |
| "in": "query", | |
| "schema": { | |
| "description": "If true, returns returns associated commit data for each entry and security scanner metadata.", | |
| "default": false | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "recursive", | |
| "in": "query", | |
| "schema": { | |
| "description": "If true, returns the tree recursively.", | |
| "default": false | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "limit", | |
| "in": "query", | |
| "schema": { | |
| "description": "1.000 by default, 100 by default for expand=true", | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 9007199254740991 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "cursor", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/notebook/{rev}/{path}": { | |
| "get": { | |
| "description": "Get a jupyter notebook URL for the requested file", | |
| "summary": "Get notebook URL", | |
| "tags": [ | |
| "models" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "error": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "error" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "notInCache": { | |
| "const": true | |
| } | |
| }, | |
| "required": [ | |
| "notInCache" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "url": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "url" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| } | |
| } | |
| }, | |
| "description": "Response containing the url of the notebook" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "path", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "description": "Wildcard path parameter" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/notebook/{rev}/{path}": { | |
| "get": { | |
| "description": "Get a jupyter notebook URL for the requested file", | |
| "summary": "Get notebook URL", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "error": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "error" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "notInCache": { | |
| "const": true | |
| } | |
| }, | |
| "required": [ | |
| "notInCache" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "url": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "url" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| } | |
| } | |
| }, | |
| "description": "Response containing the url of the notebook" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "path", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "description": "Wildcard path parameter" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/notebook/{rev}/{path}": { | |
| "get": { | |
| "description": "Get a jupyter notebook URL for the requested file", | |
| "summary": "Get notebook URL", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "error": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "error" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "notInCache": { | |
| "const": true | |
| } | |
| }, | |
| "required": [ | |
| "notInCache" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "url": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "url" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| } | |
| } | |
| }, | |
| "description": "Response containing the url of the notebook" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "rev", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "path", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "description": "Wildcard path parameter" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/models/{namespace}/{repo}/scan": { | |
| "get": { | |
| "description": "Get the security status of a repo", | |
| "summary": "Get security status", | |
| "tags": [ | |
| "models" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "scansDone": { | |
| "type": "boolean" | |
| }, | |
| "filesWithIssues": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "path": { | |
| "type": "string" | |
| }, | |
| "level": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "path", | |
| "level" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "scansDone", | |
| "filesWithIssues" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The security status of the repo" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/datasets/{namespace}/{repo}/scan": { | |
| "get": { | |
| "description": "Get the security status of a repo", | |
| "summary": "Get security status", | |
| "tags": [ | |
| "datasets" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "scansDone": { | |
| "type": "boolean" | |
| }, | |
| "filesWithIssues": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "path": { | |
| "type": "string" | |
| }, | |
| "level": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "path", | |
| "level" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "scansDone", | |
| "filesWithIssues" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The security status of the repo" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/spaces/{namespace}/{repo}/scan": { | |
| "get": { | |
| "description": "Get the security status of a repo", | |
| "summary": "Get security status", | |
| "tags": [ | |
| "spaces" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "scansDone": { | |
| "type": "boolean" | |
| }, | |
| "filesWithIssues": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "path": { | |
| "type": "string" | |
| }, | |
| "level": { | |
| "enum": [ | |
| "unscanned", | |
| "safe", | |
| "queued", | |
| "error", | |
| "caution", | |
| "suspicious", | |
| "unsafe" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "path", | |
| "level" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "scansDone", | |
| "filesWithIssues" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "The security status of the repo" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/{repoType}/{namespace}/{repo}/discussions": { | |
| "get": { | |
| "description": "Get discussions for a repo", | |
| "summary": "List discussions", | |
| "tags": [ | |
| "discussions" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "discussions": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "num": { | |
| "type": "number" | |
| }, | |
| "author": { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| }, | |
| "primaryOrg": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "hasPrivateMembersList": { | |
| "type": "boolean" | |
| }, | |
| "userRole": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "type", | |
| "isHf" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type", | |
| "isPro" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| "repo": { | |
| "$ref": "#/components/schemas/RepoId" | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "topReactions": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "reaction": { | |
| "enum": [ | |
| "🔥", | |
| "🚀", | |
| "👀", | |
| "❤️", | |
| "🤗", | |
| "😎", | |
| "➕", | |
| "🧠", | |
| "👍", | |
| "🤝", | |
| "😔", | |
| "🤯" | |
| ] | |
| }, | |
| "count": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "reaction", | |
| "count" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "status": { | |
| "enum": [ | |
| "draft", | |
| "open", | |
| "closed", | |
| "merged" | |
| ] | |
| }, | |
| "isPullRequest": { | |
| "type": "boolean" | |
| }, | |
| "numComments": { | |
| "type": "number" | |
| }, | |
| "numReactionUsers": { | |
| "type": "number" | |
| }, | |
| "pinned": { | |
| "type": "boolean" | |
| }, | |
| "repoOwner": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "org", | |
| "user" | |
| ] | |
| }, | |
| "isParticipating": { | |
| "type": "boolean" | |
| }, | |
| "isDiscussionAuthor": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "name", | |
| "type", | |
| "isParticipating", | |
| "isDiscussionAuthor" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "num", | |
| "repo", | |
| "title", | |
| "createdAt", | |
| "topReactions", | |
| "status", | |
| "isPullRequest", | |
| "numComments", | |
| "numReactionUsers", | |
| "pinned" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "count": { | |
| "type": "number" | |
| }, | |
| "start": { | |
| "type": "number" | |
| }, | |
| "numClosedDiscussions": { | |
| "description": "Number of closed discussions on the first page", | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "discussions", | |
| "count", | |
| "start" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "List of discussions" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "repoType", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "models", | |
| "spaces", | |
| "datasets", | |
| "kernels" | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "p", | |
| "in": "query", | |
| "schema": { | |
| "default": 0, | |
| "type": "integer", | |
| "minimum": -9007199254740991, | |
| "maximum": 9007199254740991 | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "type", | |
| "in": "query", | |
| "schema": { | |
| "default": "all", | |
| "enum": [ | |
| "all", | |
| "discussion", | |
| "pull_request" | |
| ] | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "status", | |
| "in": "query", | |
| "schema": { | |
| "default": "all", | |
| "enum": [ | |
| "all", | |
| "open", | |
| "closed" | |
| ] | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "author", | |
| "in": "query", | |
| "schema": { | |
| "type": "string", | |
| "minLength": 2, | |
| "maxLength": 42, | |
| "pattern": "^\\b(?!\\d+$)(?![0-9a-fA-F]{24}$)([a-zA-Z0-9]|-(?!-))+\\b$" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "search", | |
| "in": "query", | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "required": false | |
| }, | |
| { | |
| "name": "sort", | |
| "in": "query", | |
| "schema": { | |
| "default": "recently-created", | |
| "enum": [ | |
| "recently-created", | |
| "trending", | |
| "reactions" | |
| ] | |
| }, | |
| "required": false | |
| } | |
| ] | |
| }, | |
| "post": { | |
| "summary": "Create a new discussion", | |
| "tags": [ | |
| "discussions" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "title": { | |
| "type": "string", | |
| "minLength": 3, | |
| "maxLength": 200 | |
| }, | |
| "description": { | |
| "type": "string", | |
| "maxLength": 65536 | |
| }, | |
| "pullRequest": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "title", | |
| "description" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "type": "object", | |
| "properties": { | |
| "url": { | |
| "type": "string" | |
| }, | |
| "num": { | |
| "type": "number" | |
| }, | |
| "pullRequest": { | |
| "type": "boolean" | |
| }, | |
| "references": { | |
| "type": "object", | |
| "properties": { | |
| "base": { | |
| "type": "string" | |
| }, | |
| "mergeCommitId": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "base" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "url", | |
| "num", | |
| "pullRequest" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "description": "Discussion creation response" | |
| } | |
| }, | |
| "parameters": [ | |
| { | |
| "name": "repoType", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "models", | |
| "spaces", | |
| "datasets", | |
| "kernels" | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "namespace", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| { | |
| "name": "repo", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "/api/{repoType}/{namespace}/{repo}/discussions/{num}": { | |
| "get": { | |
| "summary": "Get discussion details", | |
| "tags": [ | |
| "discussions" | |
| ], | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "allOf": [ | |
| { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "num": { | |
| "type": "number" | |
| }, | |
| "author": { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| }, | |
| "primaryOrg": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "hasPrivateMembersList": { | |
| "type": "boolean" | |
| }, | |
| "userRole": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "type", | |
| "isHf" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type", | |
| "isPro" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| "org": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "email": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "hasPrivateMembersList": { | |
| "type": "boolean" | |
| }, | |
| "requiresSSO": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "type", | |
| "isHf" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "repo": { | |
| "$ref": "#/components/schemas/RepoId" | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "status": { | |
| "enum": [ | |
| "draft", | |
| "open", | |
| "closed", | |
| "merged" | |
| ] | |
| }, | |
| "events": { | |
| "type": "array", | |
| "items": { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "author": { | |
| "allOf": [ | |
| { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| }, | |
| "primaryOrg": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "hasPrivateMembersList": { | |
| "type": "boolean" | |
| }, | |
| "userRole": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "type", | |
| "isHf" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type", | |
| "isPro" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "isOwner": { | |
| "type": "boolean" | |
| }, | |
| "isOrgMember": { | |
| "type": "boolean" | |
| }, | |
| "oauthApp": { | |
| "type": "object", | |
| "properties": { | |
| "imageUrl": { | |
| "type": "string" | |
| }, | |
| "imageData": { | |
| "type": "object", | |
| "properties": { | |
| "emoji": { | |
| "type": "string" | |
| }, | |
| "colorFrom": { | |
| "type": "string" | |
| }, | |
| "colorTo": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "emoji", | |
| "colorFrom", | |
| "colorTo" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "url": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| "type": { | |
| "const": "comment" | |
| }, | |
| "data": { | |
| "type": "object", | |
| "properties": { | |
| "edited": { | |
| "type": "boolean" | |
| }, | |
| "hidden": { | |
| "type": "boolean" | |
| }, | |
| "hiddenBy": { | |
| "type": "string" | |
| }, | |
| "hiddenReason": { | |
| "enum": [ | |
| "Spam", | |
| "Abuse", | |
| "Graphic Content", | |
| "Resolved", | |
| "Off-Topic" | |
| ] | |
| }, | |
| "latest": { | |
| "type": "object", | |
| "properties": { | |
| "raw": { | |
| "type": "string" | |
| }, | |
| "html": { | |
| "type": "string" | |
| }, | |
| "updatedAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "author": { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| }, | |
| "primaryOrg": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "hasPrivateMembersList": { | |
| "type": "boolean" | |
| }, | |
| "userRole": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "type", | |
| "isHf" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type", | |
| "isPro" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "raw", | |
| "html", | |
| "updatedAt" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "numEdits": { | |
| "type": "number" | |
| }, | |
| "editors": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "editorAvatarUrls": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "reactions": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "reaction": { | |
| "enum": [ | |
| "🔥", | |
| "🚀", | |
| "👀", | |
| "❤️", | |
| "🤗", | |
| "😎", | |
| "➕", | |
| "🧠", | |
| "👍", | |
| "🤝", | |
| "😔", | |
| "🤯" | |
| ] | |
| }, | |
| "users": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| } | |
| }, | |
| "count": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "reaction", | |
| "users", | |
| "count" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "identifiedLanguage": { | |
| "type": "object", | |
| "properties": { | |
| "language": { | |
| "type": "string" | |
| }, | |
| "probability": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "language", | |
| "probability" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "relatedEventId": { | |
| "type": "string" | |
| }, | |
| "isReport": { | |
| "type": "boolean" | |
| }, | |
| "parentCommentId": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "edited", | |
| "hidden", | |
| "latest", | |
| "numEdits", | |
| "editors", | |
| "editorAvatarUrls", | |
| "reactions" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "createdAt", | |
| "type", | |
| "data" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "author": { | |
| "allOf": [ | |
| { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isHfAdmin": { | |
| "type": "boolean" | |
| }, | |
| "isMod": { | |
| "type": "boolean" | |
| }, | |
| "followerCount": { | |
| "type": "number" | |
| }, | |
| "type": { | |
| "const": "user" | |
| }, | |
| "isPro": { | |
| "type": "boolean" | |
| }, | |
| "isUserFollowing": { | |
| "type": "boolean" | |
| }, | |
| "primaryOrg": { | |
| "type": "object", | |
| "properties": { | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "const": "org" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, | |
| "isFollowing": { | |
| "type": "boolean" | |
| }, | |
| "plan": { | |
| "enum": [ | |
| "team", | |
| "enterprise", | |
| "plus", | |
| "academia" | |
| ] | |
| }, | |
| "details": { | |
| "type": "string" | |
| }, | |
| "hasPrivateMembersList": { | |
| "type": "boolean" | |
| }, | |
| "userRole": { | |
| "enum": [ | |
| "admin", | |
| "write", | |
| "contributor", | |
| "read" | |
| ] | |
| }, | |
| "numUsers": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "type", | |
| "isHf" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "_id", | |
| "avatarUrl", | |
| "fullname", | |
| "name", | |
| "isHf", | |
| "isHfAdmin", | |
| "isMod", | |
| "type", | |
| "isPro" | |
| ], | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "isOwner": { | |
| "type": "boolean" | |
| }, | |
| "isOrgMember": { | |
| "type": "boolean" | |
| }, | |
| "oauthApp": { | |
| "type": "object", | |
| "properties": { | |
| "imageUrl": { | |
| "type": "string" | |
| }, | |
| "imageData": { | |
| "type": "object", | |
| "properties": { | |
| "emoji": { | |
| "type": "string" | |
| }, | |
| "colorFrom": { | |
| "type": "string" | |
| }, | |
| "colorTo": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "emoji", | |
| "colorFrom", | |
| "colorTo" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| "url": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| ] | |
| }, | |
| "type": { | |
| "const": "status-change" | |
| }, | |
| "data": { | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "enum": [ | |
| "draft", | |
| "open", | |
| "closed", | |
| "merged" | |
| ] | |
| }, | |
| "reason": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "status" | |
| ], | |
| "additionalProperties": false | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "createdAt", | |
| "type", | |
| "data" | |
| ], | |
| "additionalProperties": false | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "createdAt": { | |
| "type": "string", | |
| "format": "date-time", | |
| "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?(Z)$" | |
| }, | |
| "author": { | |
| "allOf": [ | |
| { | |
| "anyOf": [ | |
| { | |
| "type": "object", | |
| "properties": { | |
| "_id": { | |
| "type": "string", | |
| "minLength": 24, | |
| "maxLength": 24, | |
| "pattern": "^[0-9a-f]{24}$" | |
| }, | |
| "avatarUrl": { | |
| "type": "string" | |
| }, | |
| "fullname": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "isHf": { | |
| "type": "boolean" | |
| }, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment