Grafeas API
- API version: v1alpha1
- Build date: 2018-06-04T13:20:14.121-07:00
An API to insert and retrieve annotations on cloud artifacts.
Automatically generated by the Swagger Codegen
Building the API client library requires:
- Java 1.7+
- Maven/Gradle
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>com.google.grafeas</groupId>
<artifactId>grafeas</artifactId>
<version>v1alpha1</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
compile "com.google.grafeas:grafeas:v1alpha1"
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/grafeas-v1alpha1.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import io.grafeas.*;
import io.grafeas.auth.*;
import io.grafeas.model.*;
import io.grafeas.api.GrafeasApi;
import java.io.File;
import java.util.*;
public class GrafeasApiExample {
public static void main(String[] args) {
GrafeasApi apiInstance = new GrafeasApi();
String parent = "parent_example"; // String |
ApiNote body = new ApiNote(); // ApiNote |
try {
ApiNote result = apiInstance.createNote(parent, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling GrafeasApi#createNote");
e.printStackTrace();
}
}
}
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
GrafeasApi | createNote | POST /v1alpha1/{parent}/notes | Creates a new `Note`. |
GrafeasApi | createOccurrence | POST /v1alpha1/{parent}/occurrences | Creates a new `Occurrence`. Use this method to create `Occurrences` for a resource. |
GrafeasApi | createOperation | POST /v1alpha1/{parent}/operations | Creates a new `Operation`. |
GrafeasApi | getOccurrenceNote | GET /v1alpha1/{name}/notes | Gets the `Note` attached to the given `Occurrence`. |
GrafeasApi | listNoteOccurrences | 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 | listNotes | GET /v1alpha1/{parent}/notes | Lists all `Notes` for a given project. |
GrafeasApi | listOccurrences | GET /v1alpha1/{parent}/occurrences | Lists active `Occurrences` for a given project matching the filters. |
GrafeasApi | updateNote | PATCH /v1alpha1/{name} | Updates an existing `Note`. |
GrafeasProjectsApi | createProject | POST /v1alpha1/projects | Creates a new `Project`. |
GrafeasProjectsApi | deleteProject | DELETE /v1alpha1/{name} | Deletes the given `Project` from the system. |
GrafeasProjectsApi | getProject | GET /v1alpha1/{name} | Returns the requested `Project`. |
GrafeasProjectsApi | listProjects | 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. Authentication schemes defined for the API:
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.