findings.FindingsOccurrencesApi #
All URIs are relative to:
Method | HTTP request | Description |
---|---|---|
createOccurrence | POST /v1/{account_id}/providers/{provider_id}/occurrences | Creates a new `Occurrence`. Use this method to create `Occurrences` for a resource. |
deleteOccurrence | DELETE /v1/{account_id}/providers/{provider_id}/occurrences/{occurrence_id} | Deletes the given `Occurrence` from the system. |
getOccurrence | GET /v1/{account_id}/providers/{provider_id}/occurrences/{occurrence_id} | Returns the requested `Occurrence`. |
listNoteOccurrences | GET /v1/{account_id}/providers/{provider_id}/notes/{note_id}/occurrences | Lists `Occurrences` referencing the specified `Note`. Use this method to get all occurrences referencing your `Note` across all your customer providers. |
listOccurrences | GET /v1/{account_id}/providers/{provider_id}/occurrences | Lists active `Occurrences` for a given provider matching the filters. |
updateOccurrence | PUT /v1/{account_id}/providers/{provider_id}/occurrences/{occurrence_id} | Updates an existing `Occurrence`. |
createOccurrence #
InlineResponse2001Occurrences createOccurrence(accountId, authorization, providerId, body, opts)
Creates a new `Occurrence`. Use this method to create `Occurrences` for a resource.
Example #
var findings = require('ibmcloud-security-advisor-findings');
var defaultClient = findings.ApiClient.instance;
defaultClient.basePath = "https://us-south.secadvisor.cloud.ibm.com/findings"
var apiInstance = new findings.FindingsOccurrencesApi();
var accountId = "accountId_example"; // String | Account ID
var authorization = "authorization_example"; // String | The Identity & Access Management (IAM) Bearer token.
var providerId = "providerId_example"; // String | Part of `parent`. This contains the provider_id for example: providers/{provider_id}
var body = new findings.Body2(); // Body2 | Body for Occurence creation
var opts = {
'replaceIfExists': true // Boolean | It allows replacing an existing occurrence when set to true.
};
apiInstance.createOccurrence(accountId, authorization, providerId, body, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, function(error) {
console.error(error);
});
Parameters #
Name | Type | Description | Notes |
---|---|---|---|
accountId | String | Account ID | |
authorization | String | The Identity & Access Management (IAM) Bearer token. | |
providerId | String | Part of `parent`. This contains the provider_id for example: providers/{provider_id} | |
body | Body2 | Body for Occurence creation | |
replaceIfExists | Boolean | It allows replacing an existing occurrence when set to true. | [optional] |
Return type #
HTTP request headers #
- Content-Type: application/json
- Accept: application/json
deleteOccurrence #
Object deleteOccurrence(accountId, authorization, providerId, occurrenceId)
Deletes the given `Occurrence` from the system.
Example #
var findings = require('ibmcloud-security-advisor-findings');
var defaultClient = findings.ApiClient.instance;
defaultClient.basePath = "https://us-south.secadvisor.cloud.ibm.com/findings"
var apiInstance = new findings.FindingsOccurrencesApi();
var accountId = "accountId_example"; // String | Account ID
var authorization = "authorization_example"; // String | The Identity & Access Management (IAM) Bearer token.
var providerId = "providerId_example"; // String | First part of occurrence `name`: providers/{provider_id}/notes/{occurrence_id}
var occurrenceId = "occurrenceId_example"; // String | Second part of occurrence `name`: providers/{provider_id}/notes/{occurrence_id}
apiInstance.deleteOccurrence(accountId, authorization, providerId, occurrenceId).then(function(data) {
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, function(error) {
console.error(error);
});
Parameters #
Name | Type | Description | Notes |
---|---|---|---|
accountId | String | Account ID | |
authorization | String | The Identity & Access Management (IAM) Bearer token. | |
providerId | String | First part of occurrence `name`: providers/{provider_id}/notes/{occurrence_id} | |
occurrenceId | String | Second part of occurrence `name`: providers/{provider_id}/notes/{occurrence_id} |
Return type #
Object
HTTP request headers #
- Content-Type: application/json
- Accept: application/json
getOccurrence #
InlineResponse2001 getOccurrence(accountId, authorization, providerId, occurrenceId)
Returns the requested `Occurrence`.
Example #
var findings = require('ibmcloud-security-advisor-findings');
var defaultClient = findings.ApiClient.instance;
defaultClient.basePath = "https://us-south.secadvisor.cloud.ibm.com/findings"
var apiInstance = new findings.FindingsOccurrencesApi();
var accountId = "accountId_example"; // String | Account ID
var authorization = "authorization_example"; // String | The Identity & Access Management (IAM) Bearer token.
var providerId = "providerId_example"; // String | First part of occurrence `name`: providers/{provider_id}/occurrences/{occurrence_id}
var occurrenceId = "occurrenceId_example"; // String | Second part of occurrence `name`: providers/{provider_id}/occurrences/{occurrence_id}
apiInstance.getOccurrence(accountId, authorization, providerId, occurrenceId).then(function(data) {
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, function(error) {
console.error(error);
});
Parameters #
Name | Type | Description | Notes |
---|---|---|---|
accountId | String | Account ID | |
authorization | String | The Identity & Access Management (IAM) Bearer token. | |
providerId | String | First part of occurrence `name`: providers/{provider_id}/occurrences/{occurrence_id} | |
occurrenceId | String | Second part of occurrence `name`: providers/{provider_id}/occurrences/{occurrence_id} |
Return type #
HTTP request headers #
- Content-Type: application/json
- Accept: application/json
listNoteOccurrences #
InlineResponse2002 listNoteOccurrences(accountId, authorization, providerId, noteId, opts)
Lists `Occurrences` referencing the specified `Note`. Use this method to get all occurrences referencing your `Note` across all your customer providers.
Example #
var findings = require('ibmcloud-security-advisor-findings');
var defaultClient = findings.ApiClient.instance;
defaultClient.basePath = "https://us-south.secadvisor.cloud.ibm.com/findings"
var apiInstance = new findings.FindingsOccurrencesApi();
var accountId = "accountId_example"; // String | Account ID
var authorization = "authorization_example"; // String | The Identity & Access Management (IAM) Bearer token.
var providerId = "providerId_example"; // String | First part of note `name`: providers/{provider_id}/notes/{note_id}
var noteId = "noteId_example"; // String | Second part of note `name`: providers/{provider_id}/notes/{note_id}
var opts = {
'pageSize': 56, // Number | Number of notes to return in the list.
'pageToken': "pageToken_example" // String | Token to provide to skip to a particular spot in the list.
};
apiInstance.listNoteOccurrences(accountId, authorization, providerId, noteId, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, function(error) {
console.error(error);
});
Parameters #
Name | Type | Description | Notes |
---|---|---|---|
accountId | String | Account ID | |
authorization | String | The Identity & Access Management (IAM) Bearer token. | |
providerId | String | First part of note `name`: providers/{provider_id}/notes/{note_id} | |
noteId | String | Second part of note `name`: providers/{provider_id}/notes/{note_id} | |
pageSize | Number | Number of notes to return in the list. | [optional] |
pageToken | String | Token to provide to skip to a particular spot in the list. | [optional] |
Return type #
HTTP request headers #
- Content-Type: application/json
- Accept: application/json
listOccurrences #
InlineResponse2001 listOccurrences(accountId, authorization, providerId, opts)
Lists active `Occurrences` for a given provider matching the filters.
Example #
var findings = require('ibmcloud-security-advisor-findings');
var defaultClient = findings.ApiClient.instance;
defaultClient.basePath = "https://us-south.secadvisor.cloud.ibm.com/findings"
var apiInstance = new findings.FindingsOccurrencesApi();
var accountId = "accountId_example"; // String | Account ID
var authorization = "authorization_example"; // String | The Identity & Access Management (IAM) Bearer token.
var providerId = "providerId_example"; // String | Part of `parent`. This contains the provider_id for example: providers/{provider_id}
var opts = {
'pageSize': 56, // Number | Number of occurrences to return in the list.
'pageToken': "pageToken_example" // String | Token to provide to skip to a particular spot in the list.
};
apiInstance.listOccurrences(accountId, authorization, providerId, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, function(error) {
console.error(error);
});
Parameters #
Name | Type | Description | Notes |
---|---|---|---|
accountId | String | Account ID | |
authorization | String | The Identity & Access Management (IAM) Bearer token. | |
providerId | String | Part of `parent`. This contains the provider_id for example: providers/{provider_id} | |
pageSize | Number | Number of occurrences to return in the list. | [optional] |
pageToken | String | Token to provide to skip to a particular spot in the list. | [optional] |
Return type #
HTTP request headers #
- Content-Type: application/json
- Accept: application/json
updateOccurrence #
InlineResponse2001Occurrences updateOccurrence(accountId, authorization, providerId, occurrenceId, body)
Updates an existing `Occurrence`.
Example #
var findings = require('ibmcloud-security-advisor-findings');
var defaultClient = findings.ApiClient.instance;
defaultClient.basePath = "https://us-south.secadvisor.cloud.ibm.com/findings"
var apiInstance = new findings.FindingsOccurrencesApi();
var accountId = "accountId_example"; // String | Account ID
var authorization = "authorization_example"; // String | The Identity & Access Management (IAM) Bearer token.
var providerId = "providerId_example"; // String | First part of occurrence `name`: providers/{provider_id}/occurrences/{occurrence_id}
var occurrenceId = "occurrenceId_example"; // String | Second part of occurrence `name`: providers/{provider_id}/occurrences/{occurrence_id}
var body = new findings.Body3(); // Body3 | Body for Occurence updation
apiInstance.updateOccurrence(accountId, authorization, providerId, occurrenceId, body).then(function(data) {
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, function(error) {
console.error(error);
});
Parameters #
Name | Type | Description | Notes |
---|---|---|---|
accountId | String | Account ID | |
authorization | String | The Identity & Access Management (IAM) Bearer token. | |
providerId | String | First part of occurrence `name`: providers/{provider_id}/occurrences/{occurrence_id} | |
occurrenceId | String | Second part of occurrence `name`: providers/{provider_id}/occurrences/{occurrence_id} | |
body | Body3 | Body for Occurence updation |
Return type #
HTTP request headers #
- Content-Type: application/json
- Accept: application/json