findings.FindingsNotesApi #
All URIs are relative to:
Method | HTTP request | Description |
---|---|---|
createNote | POST /v1/{account_id}/providers/{provider_id}/notes | Creates a new `Note`. |
deleteNote | DELETE /v1/{account_id}/providers/{provider_id}/notes/{note_id} | Deletes the given `Note` from the system. |
getNote | GET /v1/{account_id}/providers/{provider_id}/notes/{note_id} | Returns the requested `Note`. |
getOccurrenceNote | GET /v1/{account_id}/providers/{provider_id}/occurrences/{occurrence_id}/note | Gets the `Note` attached to the given `Occurrence`. |
listNotes | GET /v1/{account_id}/providers/{provider_id}/notes | Lists all `Notes` for a given provider. |
updateNote | PUT /v1/{account_id}/providers/{provider_id}/notes/{note_id} | Updates an existing `Note`. |
createNote #
InlineResponse200Notes createNote(accountId, authorization, providerId, body)
Creates a new `Note`.
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.FindingsNotesApi();
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 field contains the provider_id for example: providers/{provider_id}
var body = new findings.Body(); // Body | Body for Note creation
apiInstance.createNote(accountId, authorization, providerId, 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 | Part of `parent`. This field contains the provider_id for example: providers/{provider_id} | |
body | Body | Body for Note creation |
Return type #
HTTP request headers #
- Content-Type: application/json
- Accept: application/json
deleteNote #
Object deleteNote(accountId, authorization, providerId, noteId)
Deletes the given `Note` 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.FindingsNotesApi();
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}
apiInstance.deleteNote(accountId, authorization, providerId, noteId).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} |
Return type #
Object
HTTP request headers #
- Content-Type: application/json
- Accept: application/json
getNote #
InlineResponse200Notes getNote(accountId, authorization, providerId, noteId)
Returns the requested `Note`.
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.FindingsNotesApi();
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}
apiInstance.getNote(accountId, authorization, providerId, noteId).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} |
Return type #
HTTP request headers #
- Content-Type: application/json
- Accept: application/json
getOccurrenceNote #
InlineResponse200Notes getOccurrenceNote(accountId, authorization, providerId, occurrenceId)
Gets the `Note` attached to the given `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.FindingsNotesApi();
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.getOccurrenceNote(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
listNotes #
InlineResponse200 listNotes(accountId, authorization, providerId, opts)
Lists all `Notes` for a given provider.
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.FindingsNotesApi();
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 field contains the provider_id for example: providers/{provider_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.listNotes(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 field contains the provider_id for example: providers/{provider_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
updateNote #
InlineResponse200Notes updateNote(accountId, authorization, providerId, noteId, body)
Updates an existing `Note`.
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.FindingsNotesApi();
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 body = new findings.Body1(); // Body1 | Body for Note updation
apiInstance.updateNote(accountId, authorization, providerId, noteId, 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 note `name`: providers/{provider_id}/notes/{note_id} | |
noteId | String | Second part of note `name`: providers/{provider_id}/notes/{note_id} | |
body | Body1 | Body for Note updation |
Return type #
HTTP request headers #
- Content-Type: application/json
- Accept: application/json