diff --git a/src/content/schemas/api-schema-v1.json b/src/content/schemas/api-schema-v1.json index 8b0319ef..d192a813 100644 --- a/src/content/schemas/api-schema-v1.json +++ b/src/content/schemas/api-schema-v1.json @@ -719,6 +719,16 @@ "default": false } }, + { + "name": "exclude_other_user_tokens", + "in": "query", + "description": "If true, exclude user tokens that belong to other users", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, { "name": "sort", "in": "query", @@ -7013,7 +7023,7 @@ "tags": [ "packages" ], - "x-simplified": "fields[packages]=stage_str,stage_updated_at,status_reason,status_str,status_updated_at,is_sync_completed,is_sync_failed,is_sync_in_progress,is_copyable,is_deleteable,is_downloadable,is_moveable,is_quarantined,sync_finished_at,sync_progress,distro,distro_version,downloads,cdn_url,filename,format,freeable_storage,license,name,num_files,package_type,policy_violated,repository,security_scan_status,security_scan_completed_at,size,slug,slug_perm,uploaded_at,uploader,version,vulnerability_scan_results_url&fields[distributions]=slug,name" + "x-simplified": "fields[packages]=stage_str,stage_updated_at,status_reason,status_str,status_updated_at,is_sync_completed,is_sync_failed,is_sync_in_progress,is_copyable,is_deleteable,is_downloadable,is_hidden,is_moveable,is_quarantined,sync_finished_at,sync_progress,distro,distro_version,downloads,cdn_url,filename,format,freeable_storage,license,name,num_files,package_type,policy_violated,repository,security_scan_status,security_scan_completed_at,size,slug,slug_perm,uploaded_at,uploader,version,vulnerability_scan_results_url&fields[distributions]=slug,name" }, "parameters": [ { @@ -11246,7 +11256,7 @@ "tags": [ "packages" ], - "x-simplified": "fields[packages]=stage_str,stage_updated_at,status_reason,status_str,status_updated_at,is_sync_completed,is_sync_failed,is_sync_in_progress,is_copyable,is_deleteable,is_downloadable,is_moveable,is_quarantined,sync_finished_at,sync_progress,distro,distro_version,downloads,cdn_url,filename,format,freeable_storage,license,name,num_files,package_type,policy_violated,repository,security_scan_status,security_scan_completed_at,size,slug,slug_perm,uploaded_at,uploader,version,vulnerability_scan_results_url&fields[distributions]=slug,name" + "x-simplified": "fields[packages]=stage_str,stage_updated_at,status_reason,status_str,status_updated_at,is_sync_completed,is_sync_failed,is_sync_in_progress,is_copyable,is_deleteable,is_downloadable,is_hidden,is_moveable,is_quarantined,sync_finished_at,sync_progress,distro,distro_version,downloads,cdn_url,filename,format,freeable_storage,license,name,num_files,package_type,policy_violated,repository,security_scan_status,security_scan_completed_at,size,slug,slug_perm,uploaded_at,uploader,version,vulnerability_scan_results_url&fields[distributions]=slug,name" }, "delete": { "operationId": "packages_delete", @@ -12705,7 +12715,7 @@ }, "delete": { "operationId": "repos_delete", - "description": "Delete a repository in a given namespace.Repositories are soft-deleted and can be restored within a retention period. During this time, the repository's slug remains reserved and cannot be reused for new repositories.", + "description": "Delete a repository in a given namespace.\n\nNote: Repositories are soft-deleted and can be restored within a retention period. During this time, the repository's slug remains reserved and cannot be reused for new repositories.", "responses": { "200": { "description": "The repository has been scheduled for deletion." @@ -12764,6 +12774,333 @@ } ] }, + "/repos/{owner}/{identifier}/connected/": { + "get": { + "operationId": "repos_connected_list", + "summary": "List connected repositories for this repository.", + "description": "List connected repositories for this repository.", + "parameters": [ + { + "name": "page", + "in": "query", + "description": "A page number within the paginated result set.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page_size", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Retrieved the list of connected repositories.", + "content": { + "application/json": { + "schema": { + "required": [ + "results" + ], + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectedRepository" + } + } + } + } + } + } + }, + "400": { + "description": "Request could not be processed (see detail).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + } + } + } + }, + "422": { + "description": "Missing or invalid parameters (see detail).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + } + } + } + } + }, + "tags": [ + "repos" + ] + }, + "post": { + "operationId": "repos_connected_create", + "summary": "Create a connected repository for this repository.", + "description": "Create a connected repository for this repository.", + "requestBody": { + "$ref": "#/components/requestBodies/ConnectedRepositoryRequest" + }, + "responses": { + "201": { + "description": "The connected repository was created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectedRepository" + } + } + } + }, + "400": { + "description": "Request could not be processed (see detail).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + } + } + } + }, + "422": { + "description": "Missing or invalid parameters (see detail).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + } + } + } + } + }, + "tags": [ + "repos" + ] + }, + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "identifier", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/repos/{owner}/{identifier}/connected/{slug_perm}/": { + "get": { + "operationId": "repos_connected_read", + "summary": "Retrieve a connected repository for this repository.", + "description": "Retrieve a connected repository for this repository.", + "responses": { + "200": { + "description": "Retrieved the connected repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectedRepository" + } + } + } + }, + "400": { + "description": "Request could not be processed (see detail).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + } + } + } + }, + "422": { + "description": "Missing or invalid parameters (see detail).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + } + } + } + } + }, + "tags": [ + "repos" + ] + }, + "put": { + "operationId": "repos_connected_update", + "summary": "Update a connected repository for this repository.", + "description": "Update a connected repository for this repository.", + "requestBody": { + "$ref": "#/components/requestBodies/ConnectedRepositoryRequest" + }, + "responses": { + "200": { + "description": "The connected repository was updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectedRepository" + } + } + } + }, + "400": { + "description": "Request could not be processed (see detail).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + } + } + } + }, + "422": { + "description": "Missing or invalid parameters (see detail).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + } + } + } + } + }, + "tags": [ + "repos" + ] + }, + "patch": { + "operationId": "repos_connected_partial_update", + "summary": "Partially update a connected repository for this repository.", + "description": "Partially update a connected repository for this repository.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectedRepositoryRequestPatch" + } + } + } + }, + "responses": { + "200": { + "description": "The connected repository was partially updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectedRepository" + } + } + } + }, + "400": { + "description": "Request could not be processed (see detail).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + } + } + } + }, + "422": { + "description": "Missing or invalid parameters (see detail).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + } + } + } + } + }, + "tags": [ + "repos" + ] + }, + "delete": { + "operationId": "repos_connected_delete", + "summary": "Delete a connected repository for this repository.", + "description": "Delete a connected repository for this repository.", + "responses": { + "204": { + "description": "The connected repository was deleted." + }, + "400": { + "description": "Request could not be processed (see detail).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + } + } + } + }, + "422": { + "description": "Missing or invalid parameters (see detail).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + } + } + } + } + }, + "tags": [ + "repos" + ] + }, + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "identifier", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "slug_perm", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, "/repos/{owner}/{identifier}/ecdsa/": { "get": { "operationId": "repos_ecdsa_list", @@ -22402,6 +22739,15 @@ } } }, + "ConnectedRepositoryRequest": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectedRepositoryRequest" + } + } + } + }, "RespositoryGeoIpEnableDisableRequest": { "content": { "application/json": { @@ -25230,6 +25576,35 @@ } } }, + "MemberTeams": { + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string", + "readOnly": true, + "minLength": 1 + }, + "role": { + "title": "Role", + "type": "string", + "enum": [ + "Manager", + "Member" + ], + "readOnly": true, + "default": "Manager" + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "readOnly": true, + "minLength": 1 + } + } + }, "OrganizationMembership": { "type": "object", "properties": { @@ -25287,6 +25662,13 @@ "readOnly": true, "default": "Owner" }, + "teams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MemberTeams" + }, + "readOnly": true + }, "user": { "title": "User", "type": "string", @@ -25965,6 +26347,13 @@ ], "type": "object", "properties": { + "name": { + "title": "Name", + "description": "The name of the team", + "type": "string", + "readOnly": true, + "minLength": 1 + }, "role": { "title": "Role", "description": "The team role associated with the service", @@ -26967,6 +27356,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -27246,7 +27640,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -27593,6 +27988,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -27872,7 +28272,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -28168,6 +28569,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -28447,7 +28853,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -28743,6 +29150,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -29022,7 +29434,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -29325,6 +29738,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -29604,7 +30022,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -29967,6 +30386,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -30246,7 +30670,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -30542,6 +30967,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -30821,7 +31251,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -31131,6 +31562,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -31418,7 +31854,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -31714,6 +32151,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -31993,7 +32435,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -32319,6 +32762,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -32598,7 +33046,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -32894,6 +33343,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -33173,7 +33627,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -33491,6 +33946,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -33770,7 +34230,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -34066,6 +34527,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -34345,7 +34811,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -34648,6 +35115,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -34927,7 +35399,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -35223,6 +35696,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -35502,7 +35980,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -35798,6 +36277,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -36077,7 +36561,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -36373,6 +36858,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -36652,7 +37142,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -37046,6 +37537,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -37344,7 +37840,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -37647,6 +38144,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -37926,7 +38428,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -38230,6 +38733,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -38509,7 +39017,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -38812,6 +39321,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -39091,7 +39605,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -39387,6 +39902,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -39666,7 +40186,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -39962,6 +40483,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -40241,7 +40767,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -40573,6 +41100,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -40852,7 +41384,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -41155,6 +41688,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -41434,7 +41972,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -41730,6 +42269,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -42009,7 +42553,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -42378,6 +42923,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -42679,7 +43229,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -42974,6 +43525,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -43253,7 +43809,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -43575,6 +44132,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -43859,7 +44421,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -44154,6 +44717,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -44433,7 +45001,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -44729,6 +45298,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -45009,7 +45583,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -45391,6 +45966,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -45671,7 +46251,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -45966,6 +46547,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -46238,7 +46824,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -46518,6 +47105,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -46797,7 +47389,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -46928,6 +47521,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_moveable": { "title": "Is moveable", "type": "boolean", @@ -47029,7 +47627,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -47274,6 +47873,11 @@ "type": "boolean", "readOnly": true }, + "is_hidden": { + "title": "Is hidden", + "type": "boolean", + "readOnly": true + }, "is_immutable": { "title": "Is immutable", "description": "If true, created tags will be immutable. An immutable flag is a tag that cannot be removed from a package.", @@ -47559,7 +48163,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -48303,7 +48908,8 @@ 5, 6, 7, - 8 + 8, + 9 ], "readOnly": true }, @@ -50139,6 +50745,99 @@ } } }, + "ConnectedRepository": { + "required": [ + "target_repository" + ], + "type": "object", + "properties": { + "created_at": { + "title": "Created at", + "description": "The date and time when the connection was created.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "is_active": { + "title": "Is active", + "type": "boolean", + "default": true + }, + "priority": { + "title": "Priority", + "description": "Repositories are checked in ascending order (starting at 1). If multiple repositories have the same priority, the oldest one is used first.", + "type": "integer", + "maximum": 32767, + "minimum": 1 + }, + "slug_perm": { + "title": "Slug perm", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "readOnly": true, + "minLength": 1 + }, + "target_repository": { + "title": "Target repository", + "description": "The slug of the target repository to connect to.", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$" + } + } + }, + "ConnectedRepositoryRequest": { + "required": [ + "target_repository" + ], + "type": "object", + "properties": { + "is_active": { + "title": "Is active", + "type": "boolean", + "default": true + }, + "priority": { + "title": "Priority", + "description": "Repositories are checked in ascending order (starting at 1). If multiple repositories have the same priority, the oldest one is used first.", + "type": "integer", + "maximum": 32767, + "minimum": 1 + }, + "target_repository": { + "title": "Target repository", + "description": "The slug of the target repository to connect to.", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$" + } + } + }, + "ConnectedRepositoryRequestPatch": { + "type": "object", + "properties": { + "is_active": { + "title": "Is active", + "type": "boolean", + "default": true + }, + "priority": { + "title": "Priority", + "description": "Repositories are checked in ascending order (starting at 1). If multiple repositories have the same priority, the oldest one is used first.", + "type": "integer", + "maximum": 32767, + "minimum": 1 + }, + "target_repository": { + "title": "Target repository", + "description": "The slug of the target repository to connect to.", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$" + } + } + }, "RepositoryEcdsaKeyCreate": { "required": [ "ecdsa_private_key" diff --git a/src/content/schemas/api-schema-v2.json b/src/content/schemas/api-schema-v2.json index 07e5be95..7798ad7f 100644 --- a/src/content/schemas/api-schema-v2.json +++ b/src/content/schemas/api-schema-v2.json @@ -2,7 +2,7 @@ "openapi": "3.0.3", "info": { "title": "Cloudsmith API", - "version": "1.1146.0 (v2)", + "version": "1.1182.3 (v2)", "description": "The API to the Cloudsmith Service", "termsOfService": "https://help.cloudsmith.io/docs/legal-policies-overview", "contact": { @@ -17,11 +17,29 @@ "versionAlias": "v2" }, "paths": { - "/packages/{package_slug_perm}/metadata/": { + "/metadata/packages/{package_slug_perm}/": { "get": { - "operationId": "packages_metadata_list", - "description": "API for managing artifact metadata on a package.", + "operationId": "metadata_packages_list", + "description": "List all metadata entries for a package.", + "summary": "List metadata for a package", "parameters": [ + { + "in": "query", + "name": "classification", + "schema": { + "enum": [ + "UNKNOWN", + "INTRINSIC", + "SECURITY", + "PROVENANCE", + "SBOM", + "GENERIC" + ], + "type": "string", + "minLength": 1 + }, + "description": "Filter results by metadata classification.\n\n* `UNKNOWN` - Unknown\n* `INTRINSIC` - Intrinsic\n* `SECURITY` - Security\n* `PROVENANCE` - Provenance\n* `SBOM` - SBOM\n* `GENERIC` - Generic" + }, { "in": "path", "name": "package_slug_perm", @@ -29,6 +47,7 @@ "type": "string", "pattern": "^[a-zA-Z0-9]+$" }, + "description": "The `slug_perm` of the package.", "required": true }, { @@ -48,10 +67,26 @@ "schema": { "type": "integer" } + }, + { + "in": "query", + "name": "source_kind", + "schema": { + "enum": [ + "UNKNOWN", + "SYSTEM", + "UPSTREAM", + "CUSTOM", + "THIRD_PARTY" + ], + "type": "string", + "minLength": 1 + }, + "description": "Filter results by metadata source kind.\n\n* `UNKNOWN` - Unknown\n* `SYSTEM` - System\n* `UPSTREAM` - Upstream\n* `CUSTOM` - Custom\n* `THIRD_PARTY` - Third Party" } ], "tags": [ - "packages" + "metadata" ], "security": [ { @@ -70,13 +105,90 @@ } } }, - "description": "" + "description": "A paginated collection of metadata entries for the package." + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Unauthenticated": { + "value": { + "detail": "Authentication credentials were not provided." + } + } + } + } + }, + "description": "Authentication credentials were not provided or are invalid." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Forbidden": { + "value": { + "detail": "You do not have permission to perform this action." + } + } + } + } + }, + "description": "The caller is authenticated but lacks permission to perform this action, or the requested operation is not allowed for the target resource." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotFound": { + "value": { + "detail": "Not found." + }, + "summary": "Not Found" + } + } + } + }, + "description": "The package or metadata entry could not be found." + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "InvalidClassification": { + "value": { + "code": "invalid", + "detail": "Invalid input.", + "fields": { + "classification": [ + "\"bogus\" is not a valid choice." + ] + } + }, + "summary": "Invalid classification" + } + } + } + }, + "description": "One or more query parameters failed validation." } } }, "post": { - "operationId": "packages_metadata_create", - "description": "API for managing artifact metadata on a package.", + "operationId": "metadata_packages_create", + "description": "Attach arbitrary metadata to a package.", + "summary": "Attach metadata to a package", "parameters": [ { "in": "path", @@ -85,11 +197,12 @@ "type": "string", "pattern": "^[a-zA-Z0-9]+$" }, + "description": "The `slug_perm` of the package.", "required": true } ], "tags": [ - "packages" + "metadata" ], "requestBody": { "content": { @@ -118,15 +231,116 @@ } } }, - "description": "" + "description": "The metadata entry was created successfully." + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Unauthenticated": { + "value": { + "detail": "Authentication credentials were not provided." + } + } + } + } + }, + "description": "Authentication credentials were not provided or are invalid." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Forbidden": { + "value": { + "detail": "You do not have permission to perform this action." + } + } + } + } + }, + "description": "The caller is authenticated but lacks permission to perform this action, or the requested operation is not allowed for the target resource." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotFound": { + "value": { + "detail": "Not found." + }, + "summary": "Not Found" + } + } + } + }, + "description": "The package or metadata entry could not be found." + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "ContentNotAJSONObject": { + "value": { + "code": "invalid", + "detail": "Invalid input.", + "fields": { + "content": [ + "Content must be a JSON object." + ] + } + }, + "summary": "Content not a JSON object" + }, + "ContentDoesNotMatchSchema": { + "value": { + "code": "invalid", + "detail": "Invalid input.", + "fields": { + "content": [ + "Content does not conform to the schema for content type 'application/vnd.cloudsmith.metadata.example+json'." + ] + } + }, + "summary": "Content does not match schema" + }, + "ContentTypeChangedAfterCreation": { + "value": { + "code": "invalid", + "detail": "Invalid input.", + "fields": { + "content_type": [ + "content_type cannot be changed after creation." + ] + } + }, + "summary": "content_type changed after creation" + } + } + } + }, + "description": "The request body failed validation." } } } }, - "/packages/{package_slug_perm}/metadata/{slug_perm}/": { + "/metadata/packages/{package_slug_perm}/{slug_perm}/": { "get": { - "operationId": "packages_metadata_retrieve", - "description": "API for managing artifact metadata on a package.", + "operationId": "metadata_packages_retrieve", + "description": "Retrieve a specific metadata entry for a package.", + "summary": "Retrieve a package metadata entry", "parameters": [ { "in": "path", @@ -135,6 +349,7 @@ "type": "string", "pattern": "^[a-zA-Z0-9]+$" }, + "description": "The `slug_perm` of the package.", "required": true }, { @@ -143,11 +358,12 @@ "schema": { "type": "string" }, + "description": "The `slug_perm` of the metadata entry.", "required": true } ], "tags": [ - "packages" + "metadata" ], "security": [ { @@ -166,13 +382,996 @@ } } }, - "description": "" + "description": "The requested metadata entry." + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Unauthenticated": { + "value": { + "detail": "Authentication credentials were not provided." + } + } + } + } + }, + "description": "Authentication credentials were not provided or are invalid." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Forbidden": { + "value": { + "detail": "You do not have permission to perform this action." + } + } + } + } + }, + "description": "The caller is authenticated but lacks permission to perform this action, or the requested operation is not allowed for the target resource." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotFound": { + "value": { + "detail": "Not found." + }, + "summary": "Not Found" + } + } + } + }, + "description": "The package or metadata entry could not be found." + } + } + }, + "patch": { + "operationId": "metadata_packages_partial_update", + "description": "Edit a specific metadata entry for a package.", + "summary": "Update a package metadata entry", + "parameters": [ + { + "in": "path", + "name": "package_slug_perm", + "schema": { + "type": "string", + "pattern": "^[a-zA-Z0-9]+$" + }, + "description": "The `slug_perm` of the package.", + "required": true + }, + { + "in": "path", + "name": "slug_perm", + "schema": { + "type": "string" + }, + "description": "The `slug_perm` of the metadata entry.", + "required": true + } + ], + "tags": [ + "metadata" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchedArtifactMetadataWrite" + } + } + } + }, + "security": [ + { + "apikey": [] + }, + { + "basic": [] + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactMetadataWrite" + } + } + }, + "description": "The metadata entry was updated successfully." + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Unauthenticated": { + "value": { + "detail": "Authentication credentials were not provided." + } + } + } + } + }, + "description": "Authentication credentials were not provided or are invalid." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Forbidden": { + "value": { + "detail": "You do not have permission to perform this action." + } + } + } + } + }, + "description": "The caller is authenticated but lacks permission to perform this action, or the requested operation is not allowed for the target resource." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotFound": { + "value": { + "detail": "Not found." + }, + "summary": "Not Found" + } + } + } + }, + "description": "The package or metadata entry could not be found." + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "ContentNotAJSONObject": { + "value": { + "code": "invalid", + "detail": "Invalid input.", + "fields": { + "content": [ + "Content must be a JSON object." + ] + } + }, + "summary": "Content not a JSON object" + }, + "ContentDoesNotMatchSchema": { + "value": { + "code": "invalid", + "detail": "Invalid input.", + "fields": { + "content": [ + "Content does not conform to the schema for content type 'application/vnd.cloudsmith.metadata.example+json'." + ] + } + }, + "summary": "Content does not match schema" + }, + "ContentTypeChangedAfterCreation": { + "value": { + "code": "invalid", + "detail": "Invalid input.", + "fields": { + "content_type": [ + "content_type cannot be changed after creation." + ] + } + }, + "summary": "content_type changed after creation" + } + } + } + }, + "description": "The request body failed validation." + } + } + }, + "delete": { + "operationId": "metadata_packages_destroy", + "description": "Remove a specific metadata entry from a package.", + "summary": "Delete a package metadata entry", + "parameters": [ + { + "in": "path", + "name": "package_slug_perm", + "schema": { + "type": "string", + "pattern": "^[a-zA-Z0-9]+$" + }, + "description": "The `slug_perm` of the package.", + "required": true + }, + { + "in": "path", + "name": "slug_perm", + "schema": { + "type": "string" + }, + "description": "The `slug_perm` of the metadata entry.", + "required": true + } + ], + "tags": [ + "metadata" + ], + "security": [ + { + "apikey": [] + }, + { + "basic": [] + } + ], + "responses": { + "204": { + "description": "The metadata entry was removed successfully." + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Unauthenticated": { + "value": { + "detail": "Authentication credentials were not provided." + } + } + } + } + }, + "description": "Authentication credentials were not provided or are invalid." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Forbidden": { + "value": { + "detail": "You do not have permission to perform this action." + } + } + } + } + }, + "description": "The caller is authenticated but lacks permission to perform this action, or the requested operation is not allowed for the target resource." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotFound": { + "value": { + "detail": "Not found." + }, + "summary": "Not Found" + } + } + } + }, + "description": "The package or metadata entry could not be found." + } + } + } + }, + "/metadata/validate/": { + "post": { + "operationId": "metadata_validate_create", + "description": "Validate a metadata payload against the JSON schema for its ``content_type`` without persisting it. Returns 200 on success and 422 on validation failure, with the same field-level error shape as the create endpoint.", + "summary": "Validate a metadata payload", + "tags": [ + "metadata" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactMetadataValidate" + } + } + }, + "required": true + }, + "security": [ + { + "apikey": [] + }, + { + "basic": [] + } + ], + "responses": { + "200": { + "description": "The payload is valid for the given content type." + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Unauthenticated": { + "value": { + "detail": "Authentication credentials were not provided." + } + } + } + } + }, + "description": "Authentication credentials were not provided or are invalid." + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "ContentNotAJSONObject": { + "value": { + "code": "invalid", + "detail": "Invalid input.", + "fields": { + "content": [ + "Content must be a JSON object." + ] + } + }, + "summary": "Content not a JSON object" + }, + "ContentDoesNotMatchSchema": { + "value": { + "code": "invalid", + "detail": "Invalid input.", + "fields": { + "content": [ + "Content does not conform to the schema for content type 'application/vnd.cloudsmith.metadata.example+json'." + ] + } + }, + "summary": "Content does not match schema" + }, + "ContentTypeChangedAfterCreation": { + "value": { + "code": "invalid", + "detail": "Invalid input.", + "fields": { + "content_type": [ + "content_type cannot be changed after creation." + ] + } + }, + "summary": "content_type changed after creation" + } + } + } + }, + "description": "The request body failed validation." + } + } + } + }, + "/packages/{package_slug_perm}/metadata/": { + "get": { + "operationId": "packages_metadata_list", + "description": "List all metadata entries for a package.", + "summary": "List metadata for a package", + "parameters": [ + { + "in": "query", + "name": "classification", + "schema": { + "enum": [ + "UNKNOWN", + "INTRINSIC", + "SECURITY", + "PROVENANCE", + "SBOM", + "GENERIC" + ], + "type": "string", + "minLength": 1 + }, + "description": "Filter results by metadata classification.\n\n* `UNKNOWN` - Unknown\n* `INTRINSIC` - Intrinsic\n* `SECURITY` - Security\n* `PROVENANCE` - Provenance\n* `SBOM` - SBOM\n* `GENERIC` - Generic" + }, + { + "in": "path", + "name": "package_slug_perm", + "schema": { + "type": "string", + "pattern": "^[a-zA-Z0-9]+$" + }, + "description": "The `slug_perm` of the package.", + "required": true + }, + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "schema": { + "type": "integer" + } + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "source_kind", + "schema": { + "enum": [ + "UNKNOWN", + "SYSTEM", + "UPSTREAM", + "CUSTOM", + "THIRD_PARTY" + ], + "type": "string", + "minLength": 1 + }, + "description": "Filter results by metadata source kind.\n\n* `UNKNOWN` - Unknown\n* `SYSTEM` - System\n* `UPSTREAM` - Upstream\n* `CUSTOM` - Custom\n* `THIRD_PARTY` - Third Party" + } + ], + "tags": [ + "packages" + ], + "security": [ + { + "apikey": [] + }, + { + "basic": [] + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedArtifactMetadataReadList" + } + } + }, + "description": "A paginated collection of metadata entries for the package." + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Unauthenticated": { + "value": { + "detail": "Authentication credentials were not provided." + } + } + } + } + }, + "description": "Authentication credentials were not provided or are invalid." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Forbidden": { + "value": { + "detail": "You do not have permission to perform this action." + } + } + } + } + }, + "description": "The caller is authenticated but lacks permission to perform this action, or the requested operation is not allowed for the target resource." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotFound": { + "value": { + "detail": "Not found." + }, + "summary": "Not Found" + } + } + } + }, + "description": "The package or metadata entry could not be found." + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "InvalidClassification": { + "value": { + "code": "invalid", + "detail": "Invalid input.", + "fields": { + "classification": [ + "\"bogus\" is not a valid choice." + ] + } + }, + "summary": "Invalid classification" + } + } + } + }, + "description": "One or more query parameters failed validation." + } + } + }, + "post": { + "operationId": "packages_metadata_create", + "description": "Attach arbitrary metadata to a package.", + "summary": "Attach metadata to a package", + "parameters": [ + { + "in": "path", + "name": "package_slug_perm", + "schema": { + "type": "string", + "pattern": "^[a-zA-Z0-9]+$" + }, + "description": "The `slug_perm` of the package.", + "required": true + } + ], + "tags": [ + "packages" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactMetadataWrite" + } + } + }, + "required": true + }, + "security": [ + { + "apikey": [] + }, + { + "basic": [] + } + ], + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactMetadataWrite" + } + } + }, + "description": "The metadata entry was created successfully." + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Unauthenticated": { + "value": { + "detail": "Authentication credentials were not provided." + } + } + } + } + }, + "description": "Authentication credentials were not provided or are invalid." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Forbidden": { + "value": { + "detail": "You do not have permission to perform this action." + } + } + } + } + }, + "description": "The caller is authenticated but lacks permission to perform this action, or the requested operation is not allowed for the target resource." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotFound": { + "value": { + "detail": "Not found." + }, + "summary": "Not Found" + } + } + } + }, + "description": "The package or metadata entry could not be found." + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "ContentNotAJSONObject": { + "value": { + "code": "invalid", + "detail": "Invalid input.", + "fields": { + "content": [ + "Content must be a JSON object." + ] + } + }, + "summary": "Content not a JSON object" + }, + "ContentDoesNotMatchSchema": { + "value": { + "code": "invalid", + "detail": "Invalid input.", + "fields": { + "content": [ + "Content does not conform to the schema for content type 'application/vnd.cloudsmith.metadata.example+json'." + ] + } + }, + "summary": "Content does not match schema" + }, + "ContentTypeChangedAfterCreation": { + "value": { + "code": "invalid", + "detail": "Invalid input.", + "fields": { + "content_type": [ + "content_type cannot be changed after creation." + ] + } + }, + "summary": "content_type changed after creation" + } + } + } + }, + "description": "The request body failed validation." + } + } + } + }, + "/packages/{package_slug_perm}/metadata/{slug_perm}/": { + "get": { + "operationId": "packages_metadata_retrieve", + "description": "Retrieve a specific metadata entry for a package.", + "summary": "Retrieve a package metadata entry", + "parameters": [ + { + "in": "path", + "name": "package_slug_perm", + "schema": { + "type": "string", + "pattern": "^[a-zA-Z0-9]+$" + }, + "description": "The `slug_perm` of the package.", + "required": true + }, + { + "in": "path", + "name": "slug_perm", + "schema": { + "type": "string" + }, + "description": "The `slug_perm` of the metadata entry.", + "required": true + } + ], + "tags": [ + "packages" + ], + "security": [ + { + "apikey": [] + }, + { + "basic": [] + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactMetadataRead" + } + } + }, + "description": "The requested metadata entry." + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Unauthenticated": { + "value": { + "detail": "Authentication credentials were not provided." + } + } + } + } + }, + "description": "Authentication credentials were not provided or are invalid." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Forbidden": { + "value": { + "detail": "You do not have permission to perform this action." + } + } + } + } + }, + "description": "The caller is authenticated but lacks permission to perform this action, or the requested operation is not allowed for the target resource." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotFound": { + "value": { + "detail": "Not found." + }, + "summary": "Not Found" + } + } + } + }, + "description": "The package or metadata entry could not be found." + } + } + }, + "patch": { + "operationId": "packages_metadata_partial_update", + "description": "Edit a specific metadata entry for a package.", + "summary": "Update a package metadata entry", + "parameters": [ + { + "in": "path", + "name": "package_slug_perm", + "schema": { + "type": "string", + "pattern": "^[a-zA-Z0-9]+$" + }, + "description": "The `slug_perm` of the package.", + "required": true + }, + { + "in": "path", + "name": "slug_perm", + "schema": { + "type": "string" + }, + "description": "The `slug_perm` of the metadata entry.", + "required": true + } + ], + "tags": [ + "packages" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchedArtifactMetadataWrite" + } + } + } + }, + "security": [ + { + "apikey": [] + }, + { + "basic": [] + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactMetadataWrite" + } + } + }, + "description": "The metadata entry was updated successfully." + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Unauthenticated": { + "value": { + "detail": "Authentication credentials were not provided." + } + } + } + } + }, + "description": "Authentication credentials were not provided or are invalid." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Forbidden": { + "value": { + "detail": "You do not have permission to perform this action." + } + } + } + } + }, + "description": "The caller is authenticated but lacks permission to perform this action, or the requested operation is not allowed for the target resource." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotFound": { + "value": { + "detail": "Not found." + }, + "summary": "Not Found" + } + } + } + }, + "description": "The package or metadata entry could not be found." + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "ContentNotAJSONObject": { + "value": { + "code": "invalid", + "detail": "Invalid input.", + "fields": { + "content": [ + "Content must be a JSON object." + ] + } + }, + "summary": "Content not a JSON object" + }, + "ContentDoesNotMatchSchema": { + "value": { + "code": "invalid", + "detail": "Invalid input.", + "fields": { + "content": [ + "Content does not conform to the schema for content type 'application/vnd.cloudsmith.metadata.example+json'." + ] + } + }, + "summary": "Content does not match schema" + }, + "ContentTypeChangedAfterCreation": { + "value": { + "code": "invalid", + "detail": "Invalid input.", + "fields": { + "content_type": [ + "content_type cannot be changed after creation." + ] + } + }, + "summary": "content_type changed after creation" + } + } + } + }, + "description": "The request body failed validation." } } }, - "patch": { - "operationId": "packages_metadata_partial_update", - "description": "API for managing artifact metadata on a package.", + "delete": { + "operationId": "packages_metadata_destroy", + "description": "Remove a specific metadata entry from a package.", + "summary": "Delete a package metadata entry", "parameters": [ { "in": "path", @@ -181,6 +1380,7 @@ "type": "string", "pattern": "^[a-zA-Z0-9]+$" }, + "description": "The `slug_perm` of the package.", "required": true }, { @@ -189,21 +1389,13 @@ "schema": { "type": "string" }, + "description": "The `slug_perm` of the metadata entry.", "required": true } ], "tags": [ "packages" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchedArtifactMetadataWrite" - } - } - } - }, "security": [ { "apikey": [] @@ -213,54 +1405,60 @@ } ], "responses": { - "200": { + "204": { + "description": "The metadata entry was removed successfully." + }, + "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ArtifactMetadataWrite" + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Unauthenticated": { + "value": { + "detail": "Authentication credentials were not provided." + } + } } } }, - "description": "" - } - } - }, - "delete": { - "operationId": "packages_metadata_destroy", - "description": "API for managing artifact metadata on a package.", - "parameters": [ - { - "in": "path", - "name": "package_slug_perm", - "schema": { - "type": "string", - "pattern": "^[a-zA-Z0-9]+$" - }, - "required": true + "description": "Authentication credentials were not provided or are invalid." }, - { - "in": "path", - "name": "slug_perm", - "schema": { - "type": "string" + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "Forbidden": { + "value": { + "detail": "You do not have permission to perform this action." + } + } + } + } }, - "required": true - } - ], - "tags": [ - "packages" - ], - "security": [ - { - "apikey": [] + "description": "The caller is authenticated but lacks permission to perform this action, or the requested operation is not allowed for the target resource." }, - { - "basic": [] - } - ], - "responses": { - "204": { - "description": "No response body" + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotFound": { + "value": { + "detail": "Not found." + }, + "summary": "Not Found" + } + } + } + }, + "description": "The package or metadata entry could not be found." } } } @@ -1401,135 +2599,34 @@ } } }, - "/workspaces/{workspace}/policies/decision_logs/": { + "/workspaces/{workspace}/policies/decision-logs-v1/{decision_log_id}/": { "get": { - "operationId": "workspaces_policies_decision_logs_list", - "description": "List policy decision logs.", + "operationId": "workspaces_policies_decision_logs_v1_retrieve", + "description": "Retrieve the full decision log JSON from S3.", "parameters": [ { - "in": "query", - "name": "correlation_id", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Filter by `correlation_id`." - }, - { - "in": "query", - "name": "ended_after", - "schema": { - "type": "string", - "format": "date-time" - }, - "description": "Filter by `ended_at`. This operates as an inclusive lower bound (greater than or equal to)." - }, - { - "in": "query", - "name": "ended_before", - "schema": { - "type": "string", - "format": "date-time" - }, - "description": "Filter by `ended_at`. This operates as an exclusive upper bound (less than)." - }, - { - "in": "query", - "name": "match", - "schema": { - "type": "boolean", - "nullable": true - }, - "description": "Filter by whether the policy matched the package." - }, - { - "in": "query", - "name": "package", - "schema": { - "type": "string", - "minLength": 1 - }, - "description": "Filter by package identifier (`slug_perm`)." - }, - { - "in": "query", - "name": "package_format", - "schema": { - "type": "string", - "minLength": 1 - }, - "description": "Filter by package format." - }, - { - "name": "page", - "required": false, - "in": "query", - "description": "A page number within the paginated result set.", - "schema": { - "type": "integer" - } - }, - { - "name": "page_size", - "required": false, - "in": "query", - "description": "Number of results to return per page.", - "schema": { - "type": "integer" - } - }, - { - "in": "query", - "name": "policy", - "schema": { - "type": "string", - "minLength": 1 - }, - "description": "Filter by policy identifier (`slug_perm`)." - }, - { - "in": "query", - "name": "repository", - "schema": { - "type": "string", - "minLength": 1 - }, - "description": "Filter by repository identifier (`slug_perm`)." - }, - { - "in": "query", - "name": "sort", - "schema": { - "type": "string", - "default": "-started_at" - }, - "description": "A comma-separated string of fields to sort by. Legal fields are: `started_at`, `ended_at`. Descending order can be expressed by prepending `-` to a field name. Note: `ended_at` sorting is backed by `started_at` internally; the two are equivalent in ordering since policy evaluations are near-instant." - }, - { - "in": "query", - "name": "started_after", + "in": "path", + "name": "decision_log_id", "schema": { - "type": "string", - "format": "date-time" + "type": "string" }, - "description": "Filter by `started_at`. This operates as an inclusive lower bound (greater than or equal to)." + "required": true }, { "in": "query", - "name": "started_before", + "name": "fields", "schema": { - "type": "string", - "format": "date-time" + "type": "string" }, - "description": "Filter by `started_at`. This operates as an exclusive upper bound (less than)." + "description": "Comma-separated fields to include in the response (e.g. `id,correlation_id,policy_output`)." }, { "in": "path", "name": "workspace", "schema": { - "type": "string" + "type": "string", + "pattern": "^[-_\\w]+$" }, - "description": "The `name` of the Workspace.", "required": true } ], @@ -1544,13 +2641,12 @@ "basic": [] } ], - "deprecated": true, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaginatedPolicyDecisionLogList" + "$ref": "#/components/schemas/PolicyDecisionLog" } } }, @@ -1633,37 +2729,54 @@ "properties": { "slug_perm": { "type": "string", - "readOnly": true + "readOnly": true, + "description": "The unique slug identifying this metadata entry." }, "content": { - "readOnly": true + "readOnly": true, + "description": "The metadata payload as a JSON object." }, "content_type": { "type": "string", - "readOnly": true + "readOnly": true, + "description": "The content type describing the structure of the metadata payload." }, "classification": { - "$ref": "#/components/schemas/ClassificationEnum" + "allOf": [ + { + "$ref": "#/components/schemas/ClassificationEnum" + } + ], + "description": "The classification assigned to this metadata entry.\n\n* `UNKNOWN` - Unknown\n* `INTRINSIC` - Intrinsic\n* `SECURITY` - Security\n* `PROVENANCE` - Provenance\n* `SBOM` - SBOM\n* `GENERIC` - Generic" }, "source_kind": { - "$ref": "#/components/schemas/SourceKindEnum" + "allOf": [ + { + "$ref": "#/components/schemas/SourceKindEnum" + } + ], + "description": "The origin of this metadata entry, such as upstream, custom, or third party.\n\n* `UNKNOWN` - Unknown\n* `SYSTEM` - System\n* `UPSTREAM` - Upstream\n* `CUSTOM` - Custom\n* `THIRD_PARTY` - Third Party" }, "source_identity": { "type": "string", - "readOnly": true + "readOnly": true, + "description": "The identifier for the source that supplied this metadata." }, "is_canonical": { "type": "boolean", - "readOnly": true + "readOnly": true, + "description": "Whether this entry is the canonical metadata record for its type." }, "source_table": { "type": "string", - "readOnly": true + "readOnly": true, + "description": "The backing table or source model for this metadata entry." }, "created_at": { "type": "string", "format": "date-time", - "readOnly": true + "readOnly": true, + "description": "When this metadata entry was created." } }, "required": [ @@ -1678,6 +2791,24 @@ "source_table" ] }, + "ArtifactMetadataValidate": { + "type": "object", + "description": "Serializer for POST /metadata/validate.\n\nSame shape and validation rules as the write serializer but without\nfields tied to persistence (e.g. ``source_identity``). Used by clients\nthat want to fail fast on a metadata payload before they have a\npackage slug to attach it to.", + "properties": { + "content": { + "description": "The metadata payload as a JSON object." + }, + "content_type": { + "type": "string", + "description": "The content type describing the structure of the metadata payload.", + "maxLength": 128 + } + }, + "required": [ + "content", + "content_type" + ] + }, "ArtifactMetadataWrite": { "type": "object", "description": "Serializer for POST create and PATCH update on artifact metadata.", @@ -1688,16 +2819,16 @@ "pattern": "^[-a-zA-Z0-9_]+$" }, "content": { - "description": "The JSON representation of this metadata." + "description": "The metadata payload as a JSON object." }, "content_type": { "type": "string", - "description": "A content type string describing the format of the raw data.", + "description": "The content type describing the structure of the metadata payload.", "maxLength": 128 }, "source_identity": { "type": "string", - "description": "The identifier context for this metadata (e.g. 'upstream:npmjs').", + "description": "The identifier for the source of this metadata, for example 'upstream:npmjs'.", "maxLength": 128 } }, @@ -1726,14 +2857,13 @@ "enum": [ "UNKNOWN", "INTRINSIC", - "UPSTREAM", "SECURITY", "PROVENANCE", "SBOM", "GENERIC" ], "type": "string", - "description": "* `UNKNOWN` - Unknown\n* `INTRINSIC` - Intrinsic\n* `UPSTREAM` - Upstream\n* `SECURITY` - Security\n* `PROVENANCE` - Provenance\n* `SBOM` - SBOM\n* `GENERIC` - Generic" + "description": "* `UNKNOWN` - Unknown\n* `INTRINSIC` - Intrinsic\n* `SECURITY` - Security\n* `PROVENANCE` - Provenance\n* `SBOM` - SBOM\n* `GENERIC` - Generic" }, "CountryEnum": { "enum": [ @@ -2051,10 +3181,11 @@ "enum": [ "AVAILABLE", "DELETED", - "QUARANTINED" + "QUARANTINED", + "HIDDEN" ], "type": "string", - "description": "* `AVAILABLE` - The package is available for download.\n* `DELETED` - The package is deleted.\n* `QUARANTINED` - The package is quarantined." + "description": "* `AVAILABLE` - The package is available for download.\n* `DELETED` - The package is deleted.\n* `QUARANTINED` - The package is quarantined.\n* `HIDDEN` - The package is hidden." }, "PackageTagSourceTypeEnum": { "enum": [ @@ -2219,16 +3350,16 @@ "pattern": "^[-a-zA-Z0-9_]+$" }, "content": { - "description": "The JSON representation of this metadata." + "description": "The metadata payload as a JSON object." }, "content_type": { "type": "string", - "description": "A content type string describing the format of the raw data.", + "description": "The content type describing the structure of the metadata payload.", "maxLength": 128 }, "source_identity": { "type": "string", - "description": "The identifier context for this metadata (e.g. 'upstream:npmjs').", + "description": "The identifier for the source of this metadata, for example 'upstream:npmjs'.", "maxLength": 128 } } @@ -3409,6 +4540,11 @@ "indexed": { "type": "boolean" }, + "is_local": { + "type": "boolean", + "description": "Whether the package is cached in the repository or proxied from an upstream", + "readOnly": true + }, "last_downloaded_at": { "type": "string", "format": "date-time", @@ -3508,6 +4644,7 @@ "architectures", "files", "format", + "is_local", "last_downloaded_at", "license", "num_files", @@ -3702,7 +4839,9 @@ "$ref": "#/components/schemas/PolicyOSVVulnerability" } }, - "security_scan": {}, + "security_scan": { + "nullable": true + }, "vulnerabilities": { "type": "array", "items": { @@ -3710,19 +4849,21 @@ } }, "model_security": { - "$ref": "#/components/schemas/PolicyHuggingfaceSecurity" + "allOf": [ + { + "$ref": "#/components/schemas/PolicyHuggingfaceSecurity" + } + ], + "nullable": true }, "sbom": { + "nullable": true, "description": "Raw SBOM data in CycloneDX format, generated by Cloudsmith. Only available for supported Docker/OCI images." } }, "required": [ - "metadata", - "osv", "package", "repository", - "security_scan", - "vulnerabilities", "workspace" ] }, @@ -4052,6 +5193,11 @@ "indexed": { "type": "boolean" }, + "is_local": { + "type": "boolean", + "description": "Whether the package is cached in the repository or proxied from an upstream", + "readOnly": true + }, "last_downloaded_at": { "type": "string", "format": "date-time", @@ -4171,6 +5317,7 @@ "filename", "files", "format", + "is_local", "last_downloaded_at", "license", "package_type", @@ -4815,12 +5962,12 @@ "enum": [ "UNKNOWN", "SYSTEM", - "ECOSYSTEM", - "CUSTOMER", + "UPSTREAM", + "CUSTOM", "THIRD_PARTY" ], "type": "string", - "description": "* `UNKNOWN` - Unknown\n* `SYSTEM` - System\n* `ECOSYSTEM` - Ecosystem\n* `CUSTOMER` - Customer\n* `THIRD_PARTY` - Third Party" + "description": "* `UNKNOWN` - Unknown\n* `SYSTEM` - System\n* `UPSTREAM` - Upstream\n* `CUSTOM` - Custom\n* `THIRD_PARTY` - Third Party" }, "StatusEnum": { "enum": [