ibmcloud-security-advisor-findings
Version:
JavaScript client library for the IBM Cloud Security Advisor Findings API
312 lines (210 loc) • 11.8 kB
Markdown
# findings.FindingsNotesApi
All URIs are relative to:
* https://us-south.secadvisor.cloud.ibm.com/findings
* https://eu-gb.secadvisor.cloud.ibm.com/findings
Method | HTTP request | Description
------------- | ------------- | -------------
[**createNote**](FindingsNotesApi.md#createNote) | **POST** /v1/{account_id}/providers/{provider_id}/notes | Creates a new `Note`.
[**deleteNote**](FindingsNotesApi.md#deleteNote) | **DELETE** /v1/{account_id}/providers/{provider_id}/notes/{note_id} | Deletes the given `Note` from the system.
[**getNote**](FindingsNotesApi.md#getNote) | **GET** /v1/{account_id}/providers/{provider_id}/notes/{note_id} | Returns the requested `Note`.
[**getOccurrenceNote**](FindingsNotesApi.md#getOccurrenceNote) | **GET** /v1/{account_id}/providers/{provider_id}/occurrences/{occurrence_id}/note | Gets the `Note` attached to the given `Occurrence`.
[**listNotes**](FindingsNotesApi.md#listNotes) | **GET** /v1/{account_id}/providers/{provider_id}/notes | Lists all `Notes` for a given provider.
[**updateNote**](FindingsNotesApi.md#updateNote) | **PUT** /v1/{account_id}/providers/{provider_id}/notes/{note_id} | Updates an existing `Note`.
<a name="createNote"></a>
# **createNote**
> InlineResponse200Notes createNote(accountId, authorization, providerId, body)
Creates a new `Note`.
### Example
```javascript
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.md)| Body for Note creation |
### Return type
[**InlineResponse200Notes**](InlineResponse200Notes.md)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
<a name="deleteNote"></a>
# **deleteNote**
> Object deleteNote(accountId, authorization, providerId, noteId)
Deletes the given `Note` from the system.
### Example
```javascript
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
<a name="getNote"></a>
# **getNote**
> InlineResponse200Notes getNote(accountId, authorization, providerId, noteId)
Returns the requested `Note`.
### Example
```javascript
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
[**InlineResponse200Notes**](InlineResponse200Notes.md)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
<a name="getOccurrenceNote"></a>
# **getOccurrenceNote**
> InlineResponse200Notes getOccurrenceNote(accountId, authorization, providerId, occurrenceId)
Gets the `Note` attached to the given `Occurrence`.
### Example
```javascript
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
[**InlineResponse200Notes**](InlineResponse200Notes.md)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
<a name="listNotes"></a>
# **listNotes**
> InlineResponse200 listNotes(accountId, authorization, providerId, opts)
Lists all `Notes` for a given provider.
### Example
```javascript
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
[**InlineResponse200**](InlineResponse200.md)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
<a name="updateNote"></a>
# **updateNote**
> InlineResponse200Notes updateNote(accountId, authorization, providerId, noteId, body)
Updates an existing `Note`.
### Example
```javascript
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**](Body1.md)| Body for Note updation |
### Return type
[**InlineResponse200Notes**](InlineResponse200Notes.md)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json