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

grafeas/client-java

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:

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();
        }
    }
}

Documentation for API Endpoints

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`

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

Releases

No releases published

Packages

No packages published

Languages