zotregistry.io/zot@v1.4.4-0.20231124084042-02a8ed785457/pkg/extensions/search/schema.graphql (about) 1 # Exclude these linters because current implementation of the clients would need an update 2 # lint-disable fields-are-camel-cased, input-object-values-are-camel-cased 3 # Exclude this linter as we have a different implementation for pagination 4 # lint-disable relay-page-info-spec 5 # Exclude this linters and fix the issues later 6 # lint-disable type-fields-sorted-alphabetically, input-object-fields-sorted-alphabetically, enum-values-sorted-alphabetically 7 8 """ 9 A timestamp 10 """ 11 scalar Time 12 13 """ 14 Contains the tag of the image and a list of CVEs 15 """ 16 type CVEResultForImage { 17 """ 18 Tag affected by the CVEs 19 """ 20 Tag: String 21 """ 22 List of CVE objects which affect this specific image:tag 23 """ 24 CVEList: [CVE] 25 """ 26 The CVE pagination information, see PageInfo object for more details 27 """ 28 Page: PageInfo 29 } 30 31 """ 32 Contains various details about the CVE (Common Vulnerabilities and Exposures) 33 and a list of PackageInfo about the affected packages 34 """ 35 type CVE { 36 """ 37 CVE ID 38 """ 39 Id: String 40 """ 41 A short title describing the CVE 42 """ 43 Title: String 44 """ 45 A detailed description of the CVE 46 """ 47 Description: String 48 """ 49 The impact the CVE has, one of "UNKNOWN", "LOW", "MEDIUM", "HIGH", "CRITICAL" 50 """ 51 Severity: String 52 """ 53 Information on the packages in which the CVE was found 54 """ 55 PackageList: [PackageInfo] 56 } 57 58 """ 59 Contains the name of the package, the current installed version and the version where the CVE was fixed 60 """ 61 type PackageInfo { 62 """ 63 Name of the package affected by a CVE 64 """ 65 Name: String 66 """ 67 Current version of the package, typically affected by the CVE 68 """ 69 InstalledVersion: String 70 """ 71 Minimum version of the package in which the CVE is fixed 72 """ 73 FixedVersion: String 74 } 75 76 """ 77 Contains details about the repo: both general information on the repo, and the list of images 78 """ 79 type RepoInfo { 80 """ 81 List of images in the repo 82 """ 83 Images: [ImageSummary] 84 """ 85 Details about the repository itself 86 """ 87 Summary: RepoSummary 88 } 89 90 """ 91 Search results, can contain images, repositories and layers 92 """ 93 type GlobalSearchResult { 94 """ 95 Pagination information 96 """ 97 Page: PageInfo 98 """ 99 List of images matching the search criteria 100 """ 101 Images: [ImageSummary] 102 """ 103 List of repositories matching the search criteria 104 """ 105 Repos: [RepoSummary] 106 """ 107 List of layers matching the search criteria 108 NOTE: the actual search logic for layers is not implemented at the moment 109 """ 110 Layers: [LayerSummary] 111 } 112 113 """ 114 Details about a specific image, it is used by queries returning a list of images 115 We define an image as a pairing or a repository and a tag belonging to that repository 116 """ 117 type ImageSummary { 118 """ 119 Name of the repository where the image is found 120 """ 121 RepoName: String 122 """ 123 Tag identifying the image within the repository 124 """ 125 Tag: String 126 """ 127 The digest of the descriptor of this image 128 """ 129 Digest: String 130 """ 131 The media type of the descriptor of this image 132 """ 133 MediaType: String 134 """ 135 List of manifests for all supported versions of the image for different operating systems and architectures 136 """ 137 Manifests: [ManifestSummary] 138 """ 139 Total size of the files associated with all images (manifest, config, layers) 140 """ 141 Size: String 142 """ 143 Number of downloads of the manifest of this image 144 """ 145 DownloadCount: Int 146 """ 147 Timestamp of the last modification done to the image (from config or the last updated layer) 148 """ 149 LastUpdated: Time 150 """ 151 Human-readable description of the software packaged in the image 152 """ 153 Description: String 154 """ 155 True if the image has a signature associated with it, false otherwise 156 """ 157 IsSigned: Boolean 158 """ 159 Info about signature validity 160 """ 161 SignatureInfo: [SignatureSummary] 162 """ 163 License(s) under which contained software is distributed as an SPDX License Expression 164 """ 165 Licenses: String # The value of the annotation if present, 'unknown' otherwise). 166 """ 167 Labels associated with this image 168 NOTE: currently this field is unused 169 """ 170 Labels: String 171 """ 172 Human-readable title of the image 173 """ 174 Title: String 175 """ 176 URL to get source code for building the image 177 """ 178 Source: String 179 """ 180 URL to get documentation on the image 181 """ 182 Documentation: String 183 """ 184 Vendor associated with this image, the distributing entity, organization or individual 185 """ 186 Vendor: String 187 """ 188 Contact details of the people or organization responsible for the image 189 """ 190 Authors: String 191 """ 192 Short summary of the identified CVEs 193 """ 194 Vulnerabilities: ImageVulnerabilitySummary 195 """ 196 Information about objects that reference this image 197 """ 198 Referrers: [Referrer] 199 } 200 """ 201 Details about a specific version of an image for a certain operating system and architecture. 202 """ 203 type ManifestSummary { 204 """ 205 Digest of the manifest file associated with this image 206 """ 207 Digest: String 208 """ 209 Digest of the config file associated with this image 210 """ 211 ConfigDigest: String 212 """ 213 Timestamp of the last update to an image inside this repository 214 """ 215 LastUpdated: Time 216 """ 217 Total size of the files associated with this manifest (manifest, config, layers) 218 """ 219 Size: String 220 """ 221 True if the manifest has a signature associated with it, false otherwise 222 """ 223 IsSigned: Boolean 224 """ 225 Info about signature validity 226 """ 227 SignatureInfo: [SignatureSummary] 228 """ 229 OS and architecture supported by this image 230 """ 231 Platform: Platform 232 """ 233 Total number of image manifest downloads from this repository 234 """ 235 DownloadCount: Int 236 """ 237 List of layers matching the search criteria 238 NOTE: the actual search logic for layers is not implemented at the moment 239 """ 240 Layers: [LayerSummary] 241 """ 242 Information about the history of the specific image, see LayerHistory 243 """ 244 History: [LayerHistory] 245 """ 246 Short summary of the identified CVEs 247 """ 248 Vulnerabilities: ImageVulnerabilitySummary 249 """ 250 Information about objects that reference this image 251 """ 252 Referrers: [Referrer] 253 """ 254 Value of the artifactType field if present else the value of the config media type 255 """ 256 ArtifactType: String 257 } 258 259 """ 260 Contains summary of vulnerabilities found in a specific image 261 """ 262 type ImageVulnerabilitySummary { 263 """ 264 Maximum severity of all CVEs found in this image 265 """ 266 MaxSeverity: String 267 """ 268 Count of all CVEs found in this image 269 """ 270 Count: Int 271 } 272 273 """ 274 Details of a specific repo, it is used by queries returning a list of repos 275 """ 276 type RepoSummary { 277 """ 278 Name of the repository 279 """ 280 Name: String 281 """ 282 Timestamp of the last update to an image inside this repository 283 """ 284 LastUpdated: Time 285 """ 286 Total size of the files within this repository 287 """ 288 Size: String 289 """ 290 List of platforms supported by this repository 291 """ 292 Platforms: [Platform] 293 """ 294 Vendors associated with this image, the distributing entities, organizations or individuals 295 """ 296 Vendors: [String] 297 """ 298 Details of the newest image inside the repository 299 NOTE: not the image with the `latest` tag, the one with the most recent created timestamp 300 """ 301 NewestImage: ImageSummary 302 """ 303 Total number of image manifest downloads from this repository 304 """ 305 DownloadCount: Int 306 """ 307 Number of stars attributed to this repository by users 308 """ 309 StarCount: Int 310 """ 311 True if the repository is bookmarked by the current user, false otherwise 312 """ 313 IsBookmarked: Boolean 314 """ 315 True if the repository is starred by the current user, false otherwise 316 """ 317 IsStarred: Boolean 318 """ 319 Rank represents how good the match was between the queried repo name and this repo summary. 320 """ 321 Rank: Int 322 } 323 324 """ 325 Contains details about a specific layer which is part of an image 326 """ 327 type LayerSummary { 328 """ 329 The size of the layer in bytes 330 """ 331 Size: String # Int64 is not supported. 332 """ 333 Digest of the layer content 334 """ 335 Digest: String 336 } 337 338 """ 339 Information on how a layer was created 340 """ 341 type HistoryDescription { 342 """ 343 Created is the time when the layer was created. 344 """ 345 Created: Time 346 """ 347 CreatedBy is the command which created the layer. 348 """ 349 CreatedBy: String 350 """ 351 Author is the author of the build point. 352 """ 353 Author: String 354 """ 355 Comment is a custom message set when creating the layer. 356 """ 357 Comment: String 358 """ 359 EmptyLayer is used to mark if the history item created a filesystem diff. 360 """ 361 EmptyLayer: Boolean 362 } 363 364 """ 365 Information about how/when a layer was built 366 """ 367 type LayerHistory { 368 """ 369 Information specific to the layer such as size and digest. 370 """ 371 Layer: LayerSummary 372 """ 373 Additional information about how the layer was created. 374 """ 375 HistoryDescription: HistoryDescription 376 } 377 378 """ 379 Annotation is Key:Value pair representing custom data which is otherwise 380 not available in other fields. 381 """ 382 type Annotation { 383 """ 384 Custom key 385 """ 386 Key: String 387 """ 388 Value associated with the custom key 389 """ 390 Value: String 391 } 392 393 """ 394 A referrer is an object which has a reference to a another object 395 """ 396 type Referrer { 397 """ 398 Referrer MediaType 399 See https://github.com/opencontainers/artifacts for more details 400 """ 401 MediaType: String 402 """ 403 Referrer ArtifactType 404 See https://github.com/opencontainers/artifacts for more details 405 """ 406 ArtifactType: String 407 """ 408 Total size of the referrer files in bytes 409 """ 410 Size: Int 411 """ 412 Digest of the manifest file of the referrer 413 """ 414 Digest: String 415 """ 416 A list of annotations associated with this referrer 417 """ 418 Annotations: [Annotation]! 419 } 420 421 """ 422 Contains details about the OS and architecture of the image 423 """ 424 type Platform { 425 """ 426 The name of the operating system which the image is built to run on, 427 Should be values listed in the Go Language document https://go.dev/doc/install/source#environment 428 """ 429 Os: String 430 """ 431 The name of the compilation architecture which the image is built to run on, 432 Should be values listed in the Go Language document https://go.dev/doc/install/source#environment 433 """ 434 Arch: String 435 } 436 437 """ 438 Contains details about the signature 439 """ 440 type SignatureSummary { 441 """ 442 Tool is the tool used for signing image 443 """ 444 Tool: String 445 """ 446 True if the signature is trusted, false otherwise 447 """ 448 IsTrusted: Boolean 449 """ 450 Author is the author of the signature 451 """ 452 Author: String 453 } 454 455 """ 456 All sort criteria usable with pagination, some of these criteria applies only 457 to certain queries. For example sort by severity is available for CVEs but not 458 for repositories 459 """ 460 enum SortCriteria { 461 """ 462 How relevant the result is based on the user input used while searching 463 Applies to: images and repositories 464 """ 465 RELEVANCE 466 """ 467 Sort by the most recently created timestamp of the images 468 Applies to: images and repositories 469 """ 470 UPDATE_TIME 471 """ 472 Sort alphabetically ascending 473 Applies to: images, repositories and CVEs 474 """ 475 ALPHABETIC_ASC 476 """ 477 Sort alphabetically descending 478 Applies to: images, repositories and CVEs 479 """ 480 ALPHABETIC_DSC 481 """ 482 Sort from the most severe to the least severe 483 Applies to: CVEs 484 """ 485 SEVERITY 486 """ 487 Sort by the total number of stars given by users 488 Applies to: repositories 489 """ 490 STARS 491 """ 492 Sort by the total download count 493 Applies to: repositories and images 494 """ 495 DOWNLOADS 496 } 497 498 """ 499 Information on current page returned by the API 500 """ 501 type PageInfo { 502 """ 503 The total number of objects on all pages 504 """ 505 TotalCount: Int! 506 """ 507 The number of objects in this page 508 """ 509 ItemCount: Int! 510 } 511 512 """ 513 Pagination parameters 514 If PageInput is empty, the request should return all objects. 515 """ 516 input PageInput { 517 """ 518 The maximum amount of results to return for this page 519 Negative values are not allowed 520 """ 521 limit: Int 522 """ 523 The results page number you want to receive 524 Negative values are not allowed 525 """ 526 offset: Int 527 """ 528 The criteria used to sort the results on the page 529 """ 530 sortBy: SortCriteria 531 } 532 533 """ 534 Paginated list of RepoSummary objects 535 """ 536 type PaginatedReposResult { 537 """ 538 Information on the returned page 539 """ 540 Page: PageInfo 541 """ 542 List of repositories 543 """ 544 Results: [RepoSummary!]! 545 } 546 547 """ 548 Paginated list of ImageSummary objects 549 """ 550 type PaginatedImagesResult { 551 """ 552 Information on the returned page 553 """ 554 Page: PageInfo 555 """ 556 List of images 557 """ 558 Results: [ImageSummary!]! 559 } 560 561 """ 562 Apply various types of filters to the queries made for repositories and images 563 For example we only want to display repositories which contain images with 564 a certain OS ar Architecture. 565 """ 566 input Filter { 567 """ 568 Only return images or repositories supporting the operating systems in the list 569 Should be values listed in the Go Language document https://go.dev/doc/install/source#environment 570 """ 571 Os: [String] 572 """ 573 Only return images or repositories supporting the build architectures in the list 574 Should be values listed in the Go Language document https://go.dev/doc/install/source#environment 575 """ 576 Arch: [String] 577 """ 578 Only return images or repositories with at least one signature 579 """ 580 HasToBeSigned: Boolean 581 """ 582 Only returns images or repositories that are bookmarked or not bookmarked 583 """ 584 IsBookmarked: Boolean 585 """ 586 Only returns images or repositories that are starred or not starred 587 """ 588 IsStarred: Boolean 589 } 590 591 """ 592 Queries supported by the zot server 593 """ 594 type Query { 595 """ 596 Returns a CVE list for the image specified in the argument 597 """ 598 CVEListForImage( 599 "Image name in format `repository:tag` or `repository@digest`" 600 image: String!, 601 "Sets the parameters of the requested page" 602 requestedPage: PageInput 603 "Search term for specific CVE by title/id" 604 searchedCVE: String 605 ): CVEResultForImage! 606 607 """ 608 Returns a list of images vulnerable to the CVE of the specified ID 609 """ 610 ImageListForCVE( 611 "CVE ID" 612 id: String!, 613 "Filter to apply before returning the results" 614 filter: Filter, 615 "Sets the parameters of the requested page" 616 requestedPage: PageInput 617 ): PaginatedImagesResult! 618 619 """ 620 Returns a list of images that are no longer vulnerable to the CVE of the specified ID, 621 from the specified repository 622 """ 623 ImageListWithCVEFixed( 624 "CVE ID" 625 id: String!, 626 "Repository name" 627 image: String!, 628 "Filter to apply before returning the results" 629 filter: Filter, 630 "Sets the parameters of the requested page" 631 requestedPage: PageInput 632 ): PaginatedImagesResult! 633 634 """ 635 Returns a list of images which contain the specified digest 636 """ 637 ImageListForDigest( 638 "Digest to be used in searching for images" 639 id: String!, 640 "Sets the parameters of the requested page" 641 requestedPage: PageInput 642 ): PaginatedImagesResult! 643 644 """ 645 Returns a list of repositories with the newest tag (most recently created timestamp) 646 """ 647 RepoListWithNewestImage( 648 "Sets the parameters of the requested page" 649 requestedPage: PageInput 650 ): PaginatedReposResult! 651 652 """ 653 Returns all the images from the specified repository | from all repositories if specified repository is "" 654 """ 655 ImageList( 656 "Repository name" 657 repo: String!, 658 "Sets the parameters of the requested page" 659 requestedPage: PageInput 660 ): PaginatedImagesResult! 661 662 """ 663 Obtain detailed information about a repository and container images within 664 """ 665 ExpandedRepoInfo( 666 "Repository name" 667 repo: String! 668 ): RepoInfo! 669 670 """ 671 Searches within repos, images, and layers 672 """ 673 GlobalSearch( 674 """ 675 Query string, searches for repository names by default, 676 when containing `:` it searches for tags inside a repository 677 """ 678 query: String!, 679 "Filter to apply on the matches" 680 filter: Filter, 681 "Sets the parameters of the requested page" 682 requestedPage: PageInput 683 ): GlobalSearchResult! 684 685 """ 686 List of images which use the argument image 687 """ 688 DerivedImageList( 689 "Image name in the format `repository:tag`" 690 image: String!, 691 "Digest of a specific manifest inside the image. When null whole image is considered" 692 digest: String, 693 "Sets the parameters of the requested page" 694 requestedPage: PageInput 695 ): PaginatedImagesResult! 696 697 """ 698 List of images on which the argument image depends on 699 """ 700 BaseImageList( 701 "Image name in the format `repository:tag`" 702 image: String!, 703 "Digest of a specific manifest inside the image. When null whole image is considered" 704 digest: String, 705 "Sets the parameters of the requested page" 706 requestedPage: PageInput 707 ): PaginatedImagesResult! 708 709 """ 710 Search for a specific image using its name 711 """ 712 Image( 713 "Image name in the format `repository:tag`" 714 image: String! 715 ): ImageSummary! 716 717 """ 718 Returns a list of descriptors of an image or artifact manifest that are found in a <repo> and have a subject field of <digest> 719 Can be filtered based on a specific artifact type <type> 720 """ 721 Referrers( 722 "Repository name" 723 repo: String!, 724 "Digest the referrers are referring to" 725 digest: String!, 726 "Types of artifacts to return in the referrer list" 727 type: [String!] 728 ): [Referrer]! 729 730 """ 731 Receive RepoSummaries of repos starred by current user 732 """ 733 StarredRepos( 734 "Sets the parameters of the requested page (how many to include and offset)" 735 requestedPage: PageInput 736 ): PaginatedReposResult! 737 738 """ 739 Receive RepoSummaries of repos bookmarked by current user 740 """ 741 BookmarkedRepos( 742 "Sets the parameters of the requested page (how many to include and offset)" 743 requestedPage: PageInput 744 ): PaginatedReposResult! 745 }