An API to insert and retrieve annotations on cloud artifacts.
This Python package is automatically generated by the Swagger Codegen project:
- API version: v1alpha1
- Package version: v1alpha1
- Build package: io.swagger.codegen.languages.PythonClientCodegen
Python 2.7 and 3.4+
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
Then import the package:
import grafeas
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import grafeas
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import grafeas
from grafeas.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = grafeas.GrafeasApi()
parent = 'parent_example' # str |
body = grafeas.ApiNote() # ApiNote |
try:
# Creates a new `Note`.
api_response = api_instance.create_note(parent, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling GrafeasApi->create_note: %s\n" % e)
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
GrafeasApi | create_note | POST /v1alpha1/{parent}/notes | Creates a new `Note`. |
GrafeasApi | create_occurrence | POST /v1alpha1/{parent}/occurrences | Creates a new `Occurrence`. Use this method to create `Occurrences` for a resource. |
GrafeasApi | create_operation | POST /v1alpha1/{parent}/operations | Creates a new `Operation`. |
GrafeasApi | get_occurrence_note | GET /v1alpha1/{name}/notes | Gets the `Note` attached to the given `Occurrence`. |
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. |
GrafeasApi | list_notes | GET /v1alpha1/{parent}/notes | Lists all `Notes` for a given project. |
GrafeasApi | list_occurrences | GET /v1alpha1/{parent}/occurrences | Lists active `Occurrences` for a given project matching the filters. |
GrafeasApi | update_note | PATCH /v1alpha1/{name} | Updates an existing `Note`. |
GrafeasProjectsApi | create_project | POST /v1alpha1/projects | Creates a new `Project`. |
GrafeasProjectsApi | delete_project | DELETE /v1alpha1/{name} | Deletes the given `Project` from the system. |
GrafeasProjectsApi | get_project | GET /v1alpha1/{name} | Returns the requested `Project`. |
GrafeasProjectsApi | list_projects | GET /v1alpha1/projects | Lists `Projects` |
- ApiAliasContext
- ApiAliasContextKind
- ApiArtifact
- ApiBuildDetails
- ApiBuildProvenance
- ApiBuildSignature
- ApiBuildType
- ApiCloudRepoSourceContext
- ApiCommand
- ApiCreateOperationRequest
- ApiDeployable
- ApiDiscovery
- ApiFileHashes
- ApiGerritSourceContext
- ApiGitSourceContext
- ApiHash
- ApiListNoteOccurrencesResponse
- ApiListNotesResponse
- ApiListOccurrencesResponse
- ApiListProjectsResponse
- ApiNote
- ApiNoteKind
- ApiOccurrence
- ApiPackageManagerLocation
- ApiPgpSignedAttestation
- ApiProject
- ApiProjectRepoId
- ApiRepoId
- ApiRepoSource
- ApiSource
- ApiSourceContext
- ApiStorageSource
- ApiUpdateOperationRequest
- ApiVulnerabilityType
- AttestationAuthorityAttestationDetails
- BuildSignatureKeyType
- DeployableDeploymentDetails
- DeploymentDetailsPlatform
- DiscoveryDiscoveredDetails
- DockerImageBasis
- DockerImageDerivedDetails
- DockerImageFingerprint
- DockerImageLayer
- HashHashType
- LayerDirective
- LongrunningOperation
- NoteRelatedUrl
- PackageManagerArchitecture
- PackageManagerDistribution
- PackageManagerInstallationDetails
- PackageManagerPackage
- PgpSignedAttestationContentType
- ProtobufAny
- ProtobufEmpty
- ProtobufFieldMask
- RpcStatus
- VersionVersionKind
- VulnerabilityTypeDetail
- VulnerabilityTypePackageIssue
- VulnerabilityTypeSeverity
- VulnerabilityTypeVersion
- VulnerabilityTypeVulnerabilityDetails
- VulnerabilityTypeVulnerabilityLocation
All endpoints do not require authorization.