Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FindingsApiV1

The Findings API interfaces

Hierarchy

  • BaseService
    • FindingsApiV1

Index

Constructors

constructor

  • Construct a FindingsApiV1 object.

    constructor

    Parameters

    Name Type Attribute Description
    options UserOptions

    Options for the service.

    Returns FindingsApiV1

Properties

Protected baseOptions

baseOptions: BaseServiceOptions

Static DEFAULT_SERVICE_NAME

DEFAULT_SERVICE_NAME: string = "findings-api"

Static DEFAULT_SERVICE_URL

DEFAULT_SERVICE_URL: string = "https://us-south.secadvisor.cloud.ibm.com/findings"

Methods

Protected configureService

  • configureService(serviceName: string): void
  • Configure the service using external configuration

    Parameters

    Name Type Attribute Description
    serviceName string

    The name of the service. Will be used to read from external configuration.

    Returns void

createNote

  • Creates a new Note.

    Parameters

    Name Type Attribute Description
    params CreateNoteParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    accountId string Account ID.
    newId string
    newKind ApiNoteKind Output only. This explicitly denotes which kind of note is specified. This field can be used as a filter in list requests.
    newLongDescription string A detailed description of this `Note`.
    newReportedBy Reporter Details about the reporter of this `Note`.
    newShortDescription string A one sentence description of this `Note`.
    providerId string Part of `parent`. This field contains the provider_id for example: providers/{provider_id}.
    headers OutgoingHttpHeaders Optional
    newCard Card Optional The card details of the note.
    newCreateTime string Optional Output only. The time this note was created. This field can be used as a filter in list requests.
    newExpirationTime string Optional Time of expiration for this note, null if note does not expire.
    newFinding FindingType Optional The finding details of the note.
    newKpi KpiType Optional The KPI details of the note.
    newName string Optional
    newProviderId string Optional
    newRelatedUrl ApiNoteRelatedUrl[] Optional
    newSection Section Optional The section details of the note.
    newShared boolean Optional True if this `Note` can be shared by multiple accounts.
    newUpdateTime string Optional Output only. The time this note was last updated. This field can be used as a filter in list requests.

    Returns Promise<Response<ApiNote>>

createOccurrence

  • Creates a new Occurrence. Use this method to create Occurrences for a resource.

    Parameters

    Name Type Attribute Description
    params CreateOccurrenceParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    accountId string Account ID.
    newId string
    newKind ApiNoteKind Output only. This explicitly denotes which of the `Occurrence` details are specified. This field can be used as a filter in list requests.
    newNoteName string An analysis note associated with this image, in the form "providers/{provider_id}/notes/{note_id}" This field can be used as a filter in list requests.
    providerId string Part of `parent`. This contains the provider_id for example: providers/{provider_id}.
    headers OutgoingHttpHeaders Optional
    newContext Context Optional Details about the context of this `Occurrence`.
    newCreateTime string Optional Output only. The time this `Occurrence` was created.
    newFinding Finding Optional Details of the occurrence of a finding.
    newKpi Kpi Optional Details of the occurrence of a KPI.
    newName string Optional Output only. The name of the `Occurrence` in the form "providers/{provider_id}/occurrences/{occuurence_id}".
    newProviderId string Optional
    newRemediation string Optional
    newResourceUrl string Optional The unique URL of the resource, image or the container, for which the `Occurrence` applies. For example, https://gcr.io/provider/image@sha256:foo. This field can be used as a filter in list requests.
    newUpdateTime string Optional Output only. The time this `Occurrence` was last updated.
    replaceIfExists boolean Optional It allows replacing an existing occurrence when set to true.

    Returns Promise<Response<ApiOccurrence>>

Protected createRequest

  • createRequest(parameters: any): Promise<any>
  • Wrapper around sendRequest that enforces the request will be authenticated.

    Parameters

    Name Type Attribute Description
    parameters any

    Service request options passed in by user.

    Returns Promise<any>

deleteNote

  • Deletes the given Note from the system.

    Parameters

    Name Type Attribute Description
    params DeleteNoteParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    accountId string Account ID.
    noteId string Second part of note `name`: providers/{provider_id}/notes/{note_id}.
    providerId string First part of note `name`: providers/{provider_id}/notes/{note_id}.
    headers OutgoingHttpHeaders Optional

    Returns Promise<Response<Empty>>

deleteOccurrence

  • Deletes the given Occurrence from the system.

    Parameters

    Name Type Attribute Description
    params DeleteOccurrenceParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    accountId string Account ID.
    occurrenceId string Second part of occurrence `name`: providers/{provider_id}/notes/{occurrence_id}.
    providerId string First part of occurrence `name`: providers/{provider_id}/notes/{occurrence_id}.
    headers OutgoingHttpHeaders Optional

    Returns Promise<Response<Empty>>

getAuthenticator

  • getAuthenticator(): any
  • Get the instance of the authenticator set on the service.

    Returns any

getNote

  • Returns the requested Note.

    Parameters

    Name Type Attribute Description
    params GetNoteParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    accountId string Account ID.
    noteId string Second part of note `name`: providers/{provider_id}/notes/{note_id}.
    providerId string First part of note `name`: providers/{provider_id}/notes/{note_id}.
    headers OutgoingHttpHeaders Optional

    Returns Promise<Response<ApiNote>>

getOccurrence

  • Returns the requested Occurrence.

    Parameters

    Name Type Attribute Description
    params GetOccurrenceParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    accountId string Account ID.
    occurrenceId string Second part of occurrence `name`: providers/{provider_id}/occurrences/{occurrence_id}.
    providerId string First part of occurrence `name`: providers/{provider_id}/occurrences/{occurrence_id}.
    headers OutgoingHttpHeaders Optional

    Returns Promise<Response<ApiListOccurrencesResponse>>

getOccurrenceNote

  • Gets the Note attached to the given Occurrence.

    Parameters

    Name Type Attribute Description
    params GetOccurrenceNoteParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    accountId string Account ID.
    occurrenceId string Second part of occurrence `name`: providers/{provider_id}/occurrences/{occurrence_id}.
    providerId string First part of occurrence `name`: providers/{provider_id}/occurrences/{occurrence_id}.
    headers OutgoingHttpHeaders Optional

    Returns Promise<Response<ApiNote>>

listNoteOccurrences

  • Lists Occurrences referencing the specified Note. Use this method to get all occurrences referencing your Note across all your customer providers.

    Parameters

    Name Type Attribute Description
    params ListNoteOccurrencesParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    accountId string Account ID.
    noteId string Second part of note `name`: providers/{provider_id}/notes/{note_id}.
    providerId string First part of note `name`: providers/{provider_id}/notes/{note_id}.
    headers OutgoingHttpHeaders Optional
    pageSize number Optional Number of notes to return in the list.
    pageToken string Optional Token to provide to skip to a particular spot in the list.

    Returns Promise<Response<ApiListNoteOccurrencesResponse>>

listNotes

  • Lists all Notes for a given provider.

    Parameters

    Name Type Attribute Description
    params ListNotesParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    accountId string Account ID.
    providerId string Part of `parent`. This field contains the provider_id for example: providers/{provider_id}.
    headers OutgoingHttpHeaders Optional
    pageSize number Optional Number of notes to return in the list.
    pageToken string Optional Token to provide to skip to a particular spot in the list.

    Returns Promise<Response<ApiListNotesResponse>>

listOccurrences

  • Lists active Occurrences for a given provider matching the filters.

    Parameters

    Name Type Attribute Description
    params ListOccurrencesParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    accountId string Account ID.
    providerId string Part of `parent`. This contains the provider_id for example: providers/{provider_id}.
    headers OutgoingHttpHeaders Optional
    pageSize number Optional Number of occurrences to return in the list.
    pageToken string Optional Token to provide to skip to a particular spot in the list.

    Returns Promise<Response<ApiListOccurrencesResponse>>

listProviders

  • Lists all Providers for a given account id.

    Parameters

    Name Type Attribute Description
    params ListProvidersParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    accountId string Account ID.
    headers OutgoingHttpHeaders Optional
    pageSize number Optional Number of providers to return in the list.
    pageToken string Optional Token to provide to skip to a particular spot in the list.

    Returns Promise<Response<ApiListProvidersResponse>>

postGraph

  • query findings.

    query findings.

    Parameters

    Name Type Attribute Description
    params PostGraphParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    accountId string Account ID.
    body string Body for query findings.
    contentType ContentType | string Optional The type of the input.
    headers OutgoingHttpHeaders Optional

    Returns Promise<Response<Empty>>

setServiceUrl

  • setServiceUrl(url: string): void
  • Set the service URL to send requests to.

    Parameters

    Name Type Attribute Description
    url string

    The base URL for the service.

    Returns void

updateNote

  • Updates an existing Note.

    Parameters

    Name Type Attribute Description
    params UpdateNoteParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    accountId string Account ID.
    newId string
    newKind ApiNoteKind Output only. This explicitly denotes which kind of note is specified. This field can be used as a filter in list requests.
    newLongDescription string A detailed description of this `Note`.
    newReportedBy Reporter Details about the reporter of this `Note`.
    newShortDescription string A one sentence description of this `Note`.
    noteId string Second part of note `name`: providers/{provider_id}/notes/{note_id}.
    providerId string First part of note `name`: providers/{provider_id}/notes/{note_id}.
    headers OutgoingHttpHeaders Optional
    newCard Card Optional The card details of the note.
    newCreateTime string Optional Output only. The time this note was created. This field can be used as a filter in list requests.
    newExpirationTime string Optional Time of expiration for this note, null if note does not expire.
    newFinding FindingType Optional The finding details of the note.
    newKpi KpiType Optional The KPI details of the note.
    newName string Optional
    newProviderId string Optional
    newRelatedUrl ApiNoteRelatedUrl[] Optional
    newSection Section Optional The section details of the note.
    newShared boolean Optional True if this `Note` can be shared by multiple accounts.
    newUpdateTime string Optional Output only. The time this note was last updated. This field can be used as a filter in list requests.

    Returns Promise<Response<ApiNote>>

updateOccurrence

  • Updates an existing Occurrence.

    Parameters

    Name Type Attribute Description
    params UpdateOccurrenceParams

    The parameters to send to the service.

    Properties

    Name Type Attributes Description
    accountId string Account ID.
    newId string
    newKind ApiNoteKind Output only. This explicitly denotes which of the `Occurrence` details are specified. This field can be used as a filter in list requests.
    newNoteName string An analysis note associated with this image, in the form "providers/{provider_id}/notes/{note_id}" This field can be used as a filter in list requests.
    occurrenceId string Second part of occurrence `name`: providers/{provider_id}/occurrences/{occurrence_id}.
    providerId string First part of occurrence `name`: providers/{provider_id}/occurrences/{occurrence_id}.
    headers OutgoingHttpHeaders Optional
    newContext Context Optional Details about the context of this `Occurrence`.
    newCreateTime string Optional Output only. The time this `Occurrence` was created.
    newFinding Finding Optional Details of the occurrence of a finding.
    newKpi Kpi Optional Details of the occurrence of a KPI.
    newName string Optional Output only. The name of the `Occurrence` in the form "providers/{provider_id}/occurrences/{occuurence_id}".
    newProviderId string Optional
    newRemediation string Optional
    newResourceUrl string Optional The unique URL of the resource, image or the container, for which the `Occurrence` applies. For example, https://gcr.io/provider/image@sha256:foo. This field can be used as a filter in list requests.
    newUpdateTime string Optional Output only. The time this `Occurrence` was last updated.

    Returns Promise<Response<ApiOccurrence>>

Static newInstance

  • Constructs an instance of FindingsApiV1 with passed in options and external configuration.

    Parameters

    Name Type Attribute Description
    options UserOptions

    Returns FindingsApiV1

Generated using TypeDoc