Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Repository files navigation

grafeas

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

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

Installation

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.

Maven users

Add this dependency to your project's POM:

<dependency>
<groupId>com.google.grafeas</groupId>
<artifactId>grafeas</artifactId>
<version>v1alpha1</version>
<scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "com.google.grafeas:grafeas:v1alpha1"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/grafeas-v1alpha1.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

importio.grafeas.*;
importio.grafeas.auth.*;
importio.grafeas.model.*;
importio.grafeas.api.GrafeasApi;
importjava.io.File;
importjava.util.*;
publicclassGrafeasApiExample {
publicstaticvoidmain(String[] args) {
GrafeasApiapiInstance = newGrafeasApi();
Stringparent = "parent_example"; // String | ApiNotebody = newApiNote(); // ApiNote | try {
ApiNoteresult = apiInstance.createNote(parent, body);
System.out.println(result);
} catch (ApiExceptione) {
System.err.println("Exception when calling GrafeasApi#createNote");
e.printStackTrace();
}
}
}

Documentation for API Endpoints

All URIs are relative to http://localhost

ClassMethodHTTP requestDescription
GrafeasApicreateNotePOST /v1alpha1/{parent}/notesCreates a new `Note`.
GrafeasApicreateOccurrencePOST /v1alpha1/{parent}/occurrencesCreates a new `Occurrence`. Use this method to create `Occurrences` for a resource.
GrafeasApicreateOperationPOST /v1alpha1/{parent}/operationsCreates a new `Operation`.
GrafeasApigetOccurrenceNoteGET /v1alpha1/{name}/notesGets the `Note` attached to the given `Occurrence`.
GrafeasApilistNoteOccurrencesGET /v1alpha1/{name}/occurrencesLists `Occurrences` referencing the specified `Note`. Use this method to get all occurrences referencing your `Note` across all your customer projects.
GrafeasApilistNotesGET /v1alpha1/{parent}/notesLists all `Notes` for a given project.
GrafeasApilistOccurrencesGET /v1alpha1/{parent}/occurrencesLists active `Occurrences` for a given project matching the filters.
GrafeasApiupdateNotePATCH /v1alpha1/{name}Updates an existing `Note`.
GrafeasProjectsApicreateProjectPOST /v1alpha1/projectsCreates a new `Project`.
GrafeasProjectsApideleteProjectDELETE /v1alpha1/{name}Deletes the given `Project` from the system.
GrafeasProjectsApigetProjectGET /v1alpha1/{name}Returns the requested `Project`.
GrafeasProjectsApilistProjectsGET /v1alpha1/projectsLists `Projects`

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization. Authentication schemes defined for the API:

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

About

A java Grafeas api client

Resources

Contributing

Stars

6 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages