Skip to content

Latest commit

 

History

History
461 lines (295 loc) · 18.6 KB

GrafeasV1Beta1Api.md

File metadata and controls

461 lines (295 loc) · 18.6 KB

\GrafeasV1Beta1Api

All URIs are relative to http://localhost

Method HTTP request Description
BatchCreateNotes Post /v1beta1/{parent=projects/*}/notes:batchCreate Creates new notes in batch.
BatchCreateOccurrences Post /v1beta1/{parent=projects/*}/occurrences:batchCreate Creates new occurrences in batch.
CreateNote Post /v1beta1/{parent=projects/*}/notes Creates a new note.
CreateOccurrence Post /v1beta1/{parent=projects/*}/occurrences Creates a new occurrence.
DeleteNote Delete /v1beta1/{name=projects//notes/} Deletes the specified note.
DeleteOccurrence Delete /v1beta1/{name=projects//occurrences/} Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.
GetNote Get /v1beta1/{name=projects//notes/} Gets the specified note.
GetOccurrence Get /v1beta1/{name=projects//occurrences/} Gets the specified occurrence.
GetOccurrenceNote Get /v1beta1/{name=projects//occurrences/}/notes Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.
GetVulnerabilityOccurrencesSummary Get /v1beta1/{parent=projects/*}/occurrences:vulnerabilitySummary Gets a summary of the number and severity of occurrences.
ListNoteOccurrences Get /v1beta1/{name=projects//notes/}/occurrences Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note.
ListNotes Get /v1beta1/{parent=projects/*}/notes Lists notes for the specified project.
ListOccurrences Get /v1beta1/{parent=projects/*}/occurrences Lists occurrences for the specified project.
UpdateNote Patch /v1beta1/{name=projects//notes/} Updates the specified note.
UpdateOccurrence Patch /v1beta1/{name=projects//occurrences/} Updates the specified occurrence.

BatchCreateNotes

V1beta1BatchCreateNotesResponse BatchCreateNotes(ctx, parent, body) Creates new notes in batch.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
parent string The name of the project in the form of `projects/[PROJECT_ID]`, under which the notes are to be created.
body V1beta1BatchCreateNotesRequest

Return type

V1beta1BatchCreateNotesResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

BatchCreateOccurrences

V1beta1BatchCreateOccurrencesResponse BatchCreateOccurrences(ctx, parent, body) Creates new occurrences in batch.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
parent string The name of the project in the form of `projects/[PROJECT_ID]`, under which the occurrences are to be created.
body V1beta1BatchCreateOccurrencesRequest

Return type

V1beta1BatchCreateOccurrencesResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreateNote

V1beta1Note CreateNote(ctx, parent, body) Creates a new note.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
parent string The name of the project in the form of `projects/[PROJECT_ID]`, under which the note is to be created.
body V1beta1Note The note to create.

Return type

V1beta1Note

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreateOccurrence

V1beta1Occurrence CreateOccurrence(ctx, parent, body) Creates a new occurrence.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
parent string The name of the project in the form of `projects/[PROJECT_ID]`, under which the occurrence is to be created.
body V1beta1Occurrence The occurrence to create.

Return type

V1beta1Occurrence

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteNote

interface{} DeleteNote(ctx, name) Deletes the specified note.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.

Return type

interface{}

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteOccurrence

interface{} DeleteOccurrence(ctx, name) Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.

Return type

interface{}

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetNote

V1beta1Note GetNote(ctx, name) Gets the specified note.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.

Return type

V1beta1Note

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetOccurrence

V1beta1Occurrence GetOccurrence(ctx, name) Gets the specified occurrence.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.

Return type

V1beta1Occurrence

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetOccurrenceNote

V1beta1Note GetOccurrenceNote(ctx, name) Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.

Return type

V1beta1Note

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetVulnerabilityOccurrencesSummary

V1beta1VulnerabilityOccurrencesSummary GetVulnerabilityOccurrencesSummary(ctx, parent, optional) Gets a summary of the number and severity of occurrences.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
parent string The name of the project to get a vulnerability summary for in the form of `projects/[PROJECT_ID]`.
optional *GetVulnerabilityOccurrencesSummaryOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetVulnerabilityOccurrencesSummaryOpts struct

Name Type Description Notes

filter | optional.String| The filter expression. |

Return type

V1beta1VulnerabilityOccurrencesSummary

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListNoteOccurrences

V1beta1ListNoteOccurrencesResponse ListNoteOccurrences(ctx, name, optional) Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string The name of the note to list occurrences for in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
optional *ListNoteOccurrencesOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ListNoteOccurrencesOpts struct

Name Type Description Notes

filter | optional.String| The filter expression. | pageSize | optional.Int32| Number of occurrences to return in the list. | pageToken | optional.String| Token to provide to skip to a particular spot in the list. |

Return type

V1beta1ListNoteOccurrencesResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListNotes

V1beta1ListNotesResponse ListNotes(ctx, parent, optional) Lists notes for the specified project.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
parent string The name of the project to list notes for in the form of `projects/[PROJECT_ID]`.
optional *ListNotesOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ListNotesOpts struct

Name Type Description Notes

filter | optional.String| The filter expression. | pageSize | optional.Int32| Number of notes to return in the list. Must be positive. Max allowed page size is 1000. If not specified, page size defaults to 20. | pageToken | optional.String| Token to provide to skip to a particular spot in the list. |

Return type

V1beta1ListNotesResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListOccurrences

V1beta1ListOccurrencesResponse ListOccurrences(ctx, parent, optional) Lists occurrences for the specified project.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
parent string The name of the project to list occurrences for in the form of `projects/[PROJECT_ID]`.
optional *ListOccurrencesOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ListOccurrencesOpts struct

Name Type Description Notes

filter | optional.String| The filter expression. | pageSize | optional.Int32| Number of occurrences to return in the list. Must be positive. Max allowed page size is 1000. If not specified, page size defaults to 20. | pageToken | optional.String| Token to provide to skip to a particular spot in the list. |

Return type

V1beta1ListOccurrencesResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateNote

V1beta1Note UpdateNote(ctx, name, body) Updates the specified note.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
body V1beta1Note The updated note.

Return type

V1beta1Note

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateOccurrence

V1beta1Occurrence UpdateOccurrence(ctx, name, body) Updates the specified occurrence.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
body V1beta1Occurrence The updated occurrence.

Return type

V1beta1Occurrence

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]