Grafeas - the Ruby gem for the Grafeas API
An API to insert and retrieve annotations on cloud artifacts.
This SDK is automatically generated by the Swagger Codegen project:
- API version: v1alpha1
- Package version: 0.1.0.pre
- Build package: io.swagger.codegen.languages.RubyClientCodegen
To build the Ruby code into a gem:
gem build grafeas.gemspec
Then either install the gem locally:
gem install ./grafeas-0.1.0.pre.gem
(for development, run gem install --dev ./grafeas-0.1.0.pre.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'grafeas', '~> 0.1.0.pre'
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'grafeas', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Please follow the installation procedure and then run the following code:
# Load the gem
require 'grafeas'
api_instance = Grafeas::GrafeasApi.new
parent = 'parent_example' # String |
body = Grafeas::ApiNote.new # ApiNote |
begin
#Creates a new `Note`.
result = api_instance.create_note(parent, body)
p result
rescue Grafeas::ApiError => e
puts "Exception when calling GrafeasApi->create_note: #{e}"
end
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
Grafeas::GrafeasApi | create_note | POST /v1alpha1/{parent}/notes | Creates a new Note . |
Grafeas::GrafeasApi | create_occurrence | POST /v1alpha1/{parent}/occurrences | Creates a new Occurrence . Use this method to create Occurrences for a resource. |
Grafeas::GrafeasApi | create_operation | POST /v1alpha1/{parent}/operations | Creates a new Operation . |
Grafeas::GrafeasApi | get_occurrence_note | GET /v1alpha1/{name}/notes | Gets the Note attached to the given Occurrence . |
Grafeas::GrafeasApi | list_note_occurrences | GET /v1alpha1/{name}/occurrences | Lists Occurrences referencing the specified Note . Use this method to get all occurrences referencing your Note across all your customer projects. |
Grafeas::GrafeasApi | list_notes | GET /v1alpha1/{parent}/notes | Lists all Notes for a given project. |
Grafeas::GrafeasApi | list_occurrences | GET /v1alpha1/{parent}/occurrences | Lists active Occurrences for a given project matching the filters. |
Grafeas::GrafeasApi | update_note | PATCH /v1alpha1/{name} | Updates an existing Note . |
Grafeas::GrafeasProjectsApi | create_project | POST /v1alpha1/projects | Creates a new Project . |
Grafeas::GrafeasProjectsApi | delete_project | DELETE /v1alpha1/{name} | Deletes the given Project from the system. |
Grafeas::GrafeasProjectsApi | get_project | GET /v1alpha1/{name} | Returns the requested Project . |
Grafeas::GrafeasProjectsApi | list_projects | GET /v1alpha1/projects | Lists Projects |
- Grafeas::ApiAliasContext
- Grafeas::ApiAliasContextKind
- Grafeas::ApiArtifact
- Grafeas::ApiBuildDetails
- Grafeas::ApiBuildProvenance
- Grafeas::ApiBuildSignature
- Grafeas::ApiBuildType
- Grafeas::ApiCloudRepoSourceContext
- Grafeas::ApiCommand
- Grafeas::ApiCreateOperationRequest
- Grafeas::ApiDeployable
- Grafeas::ApiDiscovery
- Grafeas::ApiFileHashes
- Grafeas::ApiGerritSourceContext
- Grafeas::ApiGitSourceContext
- Grafeas::ApiHash
- Grafeas::ApiListNoteOccurrencesResponse
- Grafeas::ApiListNotesResponse
- Grafeas::ApiListOccurrencesResponse
- Grafeas::ApiListProjectsResponse
- Grafeas::ApiNote
- Grafeas::ApiNoteKind
- Grafeas::ApiOccurrence
- Grafeas::ApiPackageManagerLocation
- Grafeas::ApiPgpSignedAttestation
- Grafeas::ApiProject
- Grafeas::ApiProjectRepoId
- Grafeas::ApiRepoId
- Grafeas::ApiRepoSource
- Grafeas::ApiSource
- Grafeas::ApiSourceContext
- Grafeas::ApiStorageSource
- Grafeas::ApiUpdateOperationRequest
- Grafeas::ApiVulnerabilityType
- Grafeas::AttestationAuthorityAttestationDetails
- Grafeas::BuildSignatureKeyType
- Grafeas::DeployableDeploymentDetails
- Grafeas::DeploymentDetailsPlatform
- Grafeas::DiscoveryDiscoveredDetails
- Grafeas::DockerImageBasis
- Grafeas::DockerImageDerivedDetails
- Grafeas::DockerImageFingerprint
- Grafeas::DockerImageLayer
- Grafeas::HashHashType
- Grafeas::LayerDirective
- Grafeas::LongrunningOperation
- Grafeas::NoteRelatedUrl
- Grafeas::PackageManagerArchitecture
- Grafeas::PackageManagerDistribution
- Grafeas::PackageManagerInstallationDetails
- Grafeas::PackageManagerPackage
- Grafeas::PgpSignedAttestationContentType
- Grafeas::ProtobufAny
- Grafeas::ProtobufEmpty
- Grafeas::ProtobufFieldMask
- Grafeas::RpcStatus
- Grafeas::VersionVersionKind
- Grafeas::VulnerabilityTypeDetail
- Grafeas::VulnerabilityTypePackageIssue
- Grafeas::VulnerabilityTypeSeverity
- Grafeas::VulnerabilityTypeVersion
- Grafeas::VulnerabilityTypeVulnerabilityDetails
- Grafeas::VulnerabilityTypeVulnerabilityLocation
All endpoints do not require authorization.