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.
    id string
    kind ApiNoteKind Output only. This explicitly denotes which kind of note is specified. This field can be used as a filter in list requests.
    longDescription string A detailed description of this `Note`.
    providerId string Part of `parent`. This field contains the provider_id for example: providers/{provider_id}.
    reportedBy Reporter Details about the reporter of this `Note`.
    shortDescription string A one sentence description of this `Note`.
    card Card Optional The card details of the note.
    createTime string Optional Output only. The time this note was created. This field can be used as a filter in list requests.
    expirationTime string Optional Time of expiration for this note, null if note does not expire.
    finding FindingType Optional The finding details of the note.
    headers OutgoingHttpHeaders Optional
    kpi KpiType Optional The KPI details of the note.
    relatedUrl ApiNoteRelatedUrl[] Optional
    section Section Optional The section details of the note.
    shared boolean Optional True if this `Note` can be shared by multiple accounts.
    updateTime 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.
    id string
    kind ApiNoteKind Output only. This explicitly denotes which of the `Occurrence` details are specified. This field can be used as a filter in list requests.
    noteName string An analysis note associated with this image, in the form "{account_id}/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}.
    context Context Optional Details about the context of this `Occurrence`.
    createTime string Optional Output only. The time this `Occurrence` was created.
    finding Finding Optional Details of the occurrence of a finding.
    headers OutgoingHttpHeaders Optional
    kpi Kpi Optional Details of the occurrence of a KPI.
    remediation string Optional
    replaceIfExists boolean Optional It allows replacing an existing occurrence when set to true.
    resourceUrl 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.
    updateTime string Optional Output only. The time this `Occurrence` was last updated.

    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.
    endProviderId string Optional The last provider_id to include in the result (sorted in ascending order). Ignored if not provided.
    headers OutgoingHttpHeaders Optional
    limit number Optional Limit the number of the returned documents to the specified number.
    skip number Optional The offset is the index of the item from which you want to start returning data from. Default is 0.
    startProviderId string Optional The first provider_id to include in the result (sorted in ascending order). Ignored if not provided.

    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.
    id string
    kind ApiNoteKind Output only. This explicitly denotes which kind of note is specified. This field can be used as a filter in list requests.
    longDescription string A detailed 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}.
    reportedBy Reporter Details about the reporter of this `Note`.
    shortDescription string A one sentence description of this `Note`.
    card Card Optional The card details of the note.
    createTime string Optional Output only. The time this note was created. This field can be used as a filter in list requests.
    expirationTime string Optional Time of expiration for this note, null if note does not expire.
    finding FindingType Optional The finding details of the note.
    headers OutgoingHttpHeaders Optional
    kpi KpiType Optional The KPI details of the note.
    relatedUrl ApiNoteRelatedUrl[] Optional
    section Section Optional The section details of the note.
    shared boolean Optional True if this `Note` can be shared by multiple accounts.
    updateTime 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.
    id string
    kind ApiNoteKind Output only. This explicitly denotes which of the `Occurrence` details are specified. This field can be used as a filter in list requests.
    noteName string An analysis note associated with this image, in the form "{account_id}/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}.
    context Context Optional Details about the context of this `Occurrence`.
    createTime string Optional Output only. The time this `Occurrence` was created.
    finding Finding Optional Details of the occurrence of a finding.
    headers OutgoingHttpHeaders Optional
    kpi Kpi Optional Details of the occurrence of a KPI.
    remediation string Optional
    resourceUrl 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.
    updateTime 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