From fd1aba7ccd65d4a57f0dcfd071c5bd21598a4239 Mon Sep 17 00:00:00 2001 From: rmaheshwari-splunk <84171674+rmaheshwari-splunk@users.noreply.github.com> Date: Mon, 14 Jun 2021 13:26:40 +0530 Subject: [PATCH 1/9] Updated HighCharts License. Added LICENSE-HIGHCHARTS.txt and updated README.md regarding the same. --- README.md | 5 ++++- licenses/LICENSE-HIGHCHARTS | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 licenses/LICENSE-HIGHCHARTS diff --git a/README.md b/README.md index 104100f15..02ca955be 100644 --- a/README.md +++ b/README.md @@ -403,6 +403,7 @@ of embedded libraries and their licenses: * [commander Node.js command-line interfaces][commander]: [MIT][commander-license] * [script.js Asyncronous JavaScript loader and dependency manager][script.js]: [Apache][scriptjs-license] * [base64.js Fast base64 encoding/decoding][base64.js]: [MIT][base64-license] +* [highcharts.js Interactive JavaScript charts][highcharts.js]: [CC BY-NC 3.0][highcharts-license] [dox]: https://github.com/visionmedia/dox @@ -415,7 +416,8 @@ of embedded libraries and their licenses: [commander]: https://github.com/visionmedia/commander.js/ [script.js]: https://github.com/ded/script.js/ [base64.js]: http://code.google.com/p/javascriptbase64/ -[dox-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-DOX +[highcharts.js]: https://github.com/highcharts/highcharts +[dox-license]: xhttps://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-DOX [davis-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-DAVIS [jquery.class-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-JQUERYCLASS [nodeunit-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-NODEUNIT @@ -426,6 +428,7 @@ of embedded libraries and their licenses: [scriptjs-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-SCRIPTJS [base64-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-BASE64 [event-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-BASE64 +highcharts-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-HIGHCHARTS [json2]: http://www.json.org/js.html [splunkrc]: https://github.com/splunk/splunk-sdk-javascript/blob/master/splunkrc.spec diff --git a/licenses/LICENSE-HIGHCHARTS b/licenses/LICENSE-HIGHCHARTS new file mode 100644 index 000000000..e47f8206e --- /dev/null +++ b/licenses/LICENSE-HIGHCHARTS @@ -0,0 +1,2 @@ +Creative Commons Attribution-NonCommercial 3.0 Unported License +https://creativecommons.org/licenses/by-nc/3.0/legalcode From c9b4f8e07b79ce7247b87533bbe9ad24b4110509 Mon Sep 17 00:00:00 2001 From: Abhi Shah Date: Tue, 21 Sep 2021 13:58:09 +0530 Subject: [PATCH 2/9] Update --- README.md | 17 ++++++++--------- licenses/LICENSE-HIGHCHARTS | 2 -- 2 files changed, 8 insertions(+), 11 deletions(-) delete mode 100644 licenses/LICENSE-HIGHCHARTS diff --git a/README.md b/README.md index 02ca955be..dc0ac2ded 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ JavaScript. This SDK supports both server- and client-side JavaScript. ## Requirements -* Node.js v.0.12, or v4 or later. The Splunk SDK for Javascript is tested with Node.js v.0.12, v4.2, and v10.0. -* Splunk Enterprise 6.3.0 or later, or Splunk Cloud. The Splunk SDK for Javascript is tested with Splunk Enterprise 7.0 and 7.2. +* Node.js v.0.12, or v4 or later. The Splunk SDK for Javascript is tested with Node.js v.0.12, v4.2, and v10.0. +* Splunk Enterprise 6.3.0 or later, or Splunk Cloud. The Splunk SDK for Javascript is tested with Splunk Enterprise 7.0 and 7.2. ## Installation @@ -363,22 +363,22 @@ If you would like to contribute to the SDK, go here for more information: ### Support -1. You will be granted support if you or your company are already covered under an existing maintenance/support agreement. +1. You will be granted support if you or your company are already covered under an existing maintenance/support agreement. Send an email to support@splunk.com and include "Splunk SDK for JavaScript" in the subject line. - 2. If you are not covered under an existing maintenance/support agreement, you + 2. If you are not covered under an existing maintenance/support agreement, you can find help through the broader community at: 3. Splunk will NOT provide support for SDKs if the core library (the code in the /lib directory) has been modified. If you modify an SDK - and want support, you can find help through the broader community and Splunk + and want support, you can find help through the broader community and Splunk answers (see above). We would also like to know why you modified the core library—please send feedback to devinfo@splunk.com. 4. File any issues on [GitHub](githubjsissues) - + ### Contact us You can reach the Developer Platform team at _devinfo@splunk.com_. @@ -403,7 +403,7 @@ of embedded libraries and their licenses: * [commander Node.js command-line interfaces][commander]: [MIT][commander-license] * [script.js Asyncronous JavaScript loader and dependency manager][script.js]: [Apache][scriptjs-license] * [base64.js Fast base64 encoding/decoding][base64.js]: [MIT][base64-license] -* [highcharts.js Interactive JavaScript charts][highcharts.js]: [CC BY-NC 3.0][highcharts-license] +* [highcharts.js Interactive JavaScript charts][highcharts.js]: [CC BY-NC 3.0] [dox]: https://github.com/visionmedia/dox @@ -428,7 +428,6 @@ of embedded libraries and their licenses: [scriptjs-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-SCRIPTJS [base64-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-BASE64 [event-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-BASE64 -highcharts-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-HIGHCHARTS [json2]: http://www.json.org/js.html [splunkrc]: https://github.com/splunk/splunk-sdk-javascript/blob/master/splunkrc.spec diff --git a/licenses/LICENSE-HIGHCHARTS b/licenses/LICENSE-HIGHCHARTS deleted file mode 100644 index e47f8206e..000000000 --- a/licenses/LICENSE-HIGHCHARTS +++ /dev/null @@ -1,2 +0,0 @@ -Creative Commons Attribution-NonCommercial 3.0 Unported License -https://creativecommons.org/licenses/by-nc/3.0/legalcode From b520a421c2c81b6071aa340ce7cfc8e93cd83992 Mon Sep 17 00:00:00 2001 From: Abhi Shah Date: Tue, 21 Sep 2021 14:02:58 +0530 Subject: [PATCH 3/9] Rebase with develop --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dc0ac2ded..8dafb6b2e 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,20 @@ JavaScript. This SDK supports both server- and client-side JavaScript. ## Requirements -* Node.js v.0.12, or v4 or later. The Splunk SDK for Javascript is tested with Node.js v.0.12, v4.2, and v10.0. -* Splunk Enterprise 6.3.0 or later, or Splunk Cloud. The Splunk SDK for Javascript is tested with Splunk Enterprise 7.0 and 7.2. +* Node.js v 8.17.0, or v14 or later + + The Splunk Enterprise SDK for JavaScript was tested with Node.js v8.17.0, v14. + +* Splunk Enterprise 8.0 or 8.2, or Splunk Cloud + + The Splunk Enterprise SDK for JavaScript was tested with Splunk Enterprise 8.0 or 8.2, or Splunk Cloud. + +* Splunk Enterprise SDK for JavaScript + + Download the SDK as a [ZIP file](https://github.com/splunk/splunk-sdk-javascript/zipball/master) or clone the repository: + + git clone https://github.com/splunk/splunk-sdk-javascript.git + ## Installation From 70d87aa83e60cc9ac1d056f2e03fd6412faa7abb Mon Sep 17 00:00:00 2001 From: Abhi Shah Date: Tue, 21 Sep 2021 14:04:06 +0530 Subject: [PATCH 4/9] Update README.md --- README.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/README.md b/README.md index 8dafb6b2e..9c376f5f2 100644 --- a/README.md +++ b/README.md @@ -11,18 +11,6 @@ JavaScript. This SDK supports both server- and client-side JavaScript. * Node.js v 8.17.0, or v14 or later - The Splunk Enterprise SDK for JavaScript was tested with Node.js v8.17.0, v14. - -* Splunk Enterprise 8.0 or 8.2, or Splunk Cloud - - The Splunk Enterprise SDK for JavaScript was tested with Splunk Enterprise 8.0 or 8.2, or Splunk Cloud. - -* Splunk Enterprise SDK for JavaScript - - Download the SDK as a [ZIP file](https://github.com/splunk/splunk-sdk-javascript/zipball/master) or clone the repository: - - git clone https://github.com/splunk/splunk-sdk-javascript.git - ## Installation From 389dd8bcc9291c57bfa51bb219f577c597cd292c Mon Sep 17 00:00:00 2001 From: Abhi Shah Date: Tue, 21 Sep 2021 14:34:32 +0530 Subject: [PATCH 5/9] Update README.md --- README.md | 474 ++++++++++++++++++++++-------------------------------- 1 file changed, 196 insertions(+), 278 deletions(-) diff --git a/README.md b/README.md index 9c376f5f2..f137f0d99 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,38 @@ [![Build Status](https://travis-ci.org/splunk/splunk-sdk-javascript.svg?branch=master)](https://travis-ci.org/splunk/splunk-sdk-javascript) -# The Splunk Software Development Kit for JavaScript +# The Splunk Enterprise Software Development Kit for JavaScript -#### Version 1.9.0 +#### Version 1.10.0 -The Splunk Software Development Kit (SDK) for JavaScript contains library code and -examples designed to enable developers to build applications using Splunk and -JavaScript. This SDK supports both server- and client-side JavaScript. +The Splunk Enterprise Software Development Kit (SDK) for JavaScript contains library code and examples designed to enable developers to build applications using the Splunk platform and JavaScript. This SDK supports server-side and client-side JavaScript. + +For more information, see [Splunk Enterprise SDK for JavaScript](https://dev.splunk.com/enterprise/docs/devtools/javascript/sdk-javascript/) on the Splunk Developer Portal. ## Requirements * Node.js v 8.17.0, or v14 or later + The Splunk Enterprise SDK for JavaScript was tested with Node.js v8.17.0, v14. -## Installation +* Splunk Enterprise 8.0 or 8.2, or Splunk Cloud + + The Splunk Enterprise SDK for JavaScript was tested with Splunk Enterprise 8.0 or 8.2, or Splunk Cloud. + +* Splunk Enterprise SDK for JavaScript -This section describes the basic steps for installing the Splunk SDK for JavaScript. -For more detailed instructions and requirements, see the -[Splunk Developer Portal][install]. + Download the SDK as a [ZIP file](https://github.com/splunk/splunk-sdk-javascript/zipball/master) or clone the repository: -### Get the Splunk SDK for JavaScript + git clone https://github.com/splunk/splunk-sdk-javascript.git + + +## Installation -You can get the SDK by [downloading it][zip] from GitHub, or by cloning it: +This section describes the basic steps for installing the Splunk Enterprise SDK for JavaScript. - git clone https://github.com/splunk/splunk-sdk-javascript.git -### Use the Splunk SDK for JavaScript components on your web page +### Use the Splunk Enterprise SDK for JavaScript components on your web page -To use the components from the Splunk SDK for JavaScript on your web page, copy the -**/splunk-sdk-javascript/client** directory to your web server. -Then, include the **splunk.js** or **splunk.min.js** file from this directory in -your code. +To use the components from the Splunk Enterprise SDK for JavaScript on your web page, copy the **/splunk-sdk-javascript/client** directory to your web server. +Then, include the **splunk.js** or **splunk.min.js** file from this directory in your code. For example, include one of the following tags in your code: @@ -39,39 +42,32 @@ Or: -You can also include the UI components, such as the Timeline and Charting -controls. These UI component files (splunk.ui.timeline and -splunk.ui.charting) are also in the /splunk-sdk-javascript/client -directory. +You can also include the UI components, such as the Timeline and Charting controls. These UI component files (**splunk.ui.timeline** and **splunk.ui.charting**) are also in the **/splunk-sdk-javascript/client** directory. -### Install the Splunk SDK for JavaScript for Node.js -> **Note:** The Splunk SDK for JavaScript v1.7.0 requires Node.js version 0.10.x, or 0.12.x or 4+. +### Install Node.js in your project -If you want to use the Splunk SDK for JavaScript with your Node.js programs, install -the SDK by running `npm` in *your* project's directory as follows: +To use the Splunk Enterprise SDK for JavaScript with your Node.js programs, install the SDK by running `npm` in *your* project's directory as follows: npm install splunk-sdk -Then, to include the Splunk SDK for JavaScript, use the `require` function in your -code: +Then, to include the Splunk Enterprise SDK for JavaScript, use the `require` function in your code: var splunkjs = require('splunk-sdk'); ## Usage -The following examples show you how to list search jobs using client-side and -server-side code. +The following examples show you how to list search jobs using client-side and server-side code. ### Client-side code example -This HTML example uses the Splunk SDK for JavaScript to list all jobs: - +This HTML example uses the Splunk Enterprise SDK for JavaScript to list all jobs: +```javascript +``` ### Node.js code example -This example shows how to use the Splunk SDK for JavaScript and Node.js to list all -jobs: +This example shows how to use the Splunk Enterprise SDK for JavaScript and Node.js to list all jobs: + +##### Login with username and password +```javascript var splunkjs = require('splunk-sdk'); - var service = new splunkjs.Service({username: "admin", password: "changeme"}); + var service = new splunkjs.Service({username: "admin", password: "changed!"}); service.login(function(err, success) { if (err) { throw err; @@ -109,64 +108,135 @@ jobs: } }); }); +``` +##### Login with sessionKey + +```shell +# Create a sessionKey +curl -k -u : ://:/services/auth/login -d username= -d password= +``` + +```javascript +var serviceWithSessionKey = new splunkjs.Service( + { + // Replace the host if you are accessing remote host + scheme: 'https', + host: 'localhost', + port: '8089', + sessionKey: SESSION_KEY, // Add your sessionKey here + version: '8', + }); + +serviceWithSessionKey.get("search/jobs", { count: 1 }, function (err, res) { + if (err) { + console.log(err); + } else } + console.log("Login successful with sessionKey"); + } +}); +``` + +##### Login with token + +```shell +#### From shell #### +# Enable token authetication +curl -k -u : -X POST ://:/services/admin/token-auth/tokens_auth -d disabled=false + +# Create a token +curl -k -u : -X POST ://:/services/authorization/tokens?output_mode=json --data name= --data audience=Users --data-urlencode expires_on=+30d +``` + +```shell +#### From web #### +# Enable token authentication +Go to settings > Tokens and click on 'Enable Token Authentication' + +# Create a token +1. Go to settings > Token and click on 'New Token' +2. Enter the relevant information +3. Copy the created token and save it somewhere safe. +``` + +```javascript +var serviceWithBearerToken = new splunkjs.Service( + { + // Replace the host if you are accessing remote host + scheme: 'https', + host: 'localhost', + port: '8089', + sessionKey: TOKEN, // Add your token here + version: '8', + }); + +serviceWithBearerToken.get("search/jobs", { count: 2 }, function (err, res) { + if (err) + console.log(err); + else + console.log("Login successful with bearer token"); +}); +``` ## SDK examples -The Splunk SDK for JavaScript contains several server- and client-based examples. -For detailed instructions about getting them running, see the -[Splunk Developer Portal][examples]. +The Splunk Enterprise SDK for JavaScript contains several server- and client-based examples. +For details, see the [Splunk Enterprise SDK for JavaScript Examples](https://dev.splunk.com/enterprise/docs/devtools/javascript/sdk-javascript/sdkjavascriptexamples) on the Splunk Developer Portal. -### Set up the .splunkrc file +#### Create a .splunkrc convenience file -To connect to Splunk, many of the SDK examples and unit tests take command-line -arguments that specify values for the host, port, and login credentials for -Splunk. For convenience during development, you can store these arguments as -key-value pairs in a text file named **.splunkrc**. Then, the SDK examples and -unit tests use the values from the **.splunkrc** file when you don't specify -them. +To connect to Splunk Enterprise, many of the SDK examples and unit tests take command-line arguments that specify values for the host, port, and login credentials for Splunk Enterprise. For convenience during development, you can store these arguments as key-value pairs in a text file named **.splunkrc**. Then, the SDK examples and unit tests use the values from the **.splunkrc** file when you don't specify them. -To use this convenience file, create a text file with the following format and -save it as **.splunkrc** in the current user's home directory: +>**Note**: Storing login credentials in the **.splunkrc** file is only for convenience during development. This file isn't part of the Splunk platform and shouldn't be used for storing user credentials for production. And, if you're at all concerned about the security of your credentials, enter them at the command line rather than saving them in this file. - # Splunk host (default: localhost) +To use this convenience file, create a text file with the following format: + + # Splunk Enterprise host (default: localhost) host=localhost - # Splunk admin port (default: 8089) + # Splunk Enterprise admin port (default: 8089) port=8089 - # Splunk username + # Splunk Enterprise username username=admin - # Splunk password - password=changeme + # Splunk Enterprise password + password=changed! # Access scheme (default: https) scheme=https - # Your version of Splunk (default: 5.0) - version=5.0 + # Your version of Splunk Enterprise + version=8.2 + +Save the file as **.splunkrc** in the current user's home directory. + +* For example on OS X, save the file as: + + ~/.splunkrc + +* On Windows, save the file as: + + C:\Users\currentusername\.splunkrc + + You might get errors in Windows when you try to name the file because ".splunkrc" appears to be a nameless file with an extension. You can use the command line to create this file by going to the **C:\Users\\<currentusername>** directory and entering the following command: + + Notepad.exe .splunkrc + + Click **Yes**, then continue creating the file. -**Note**: The `version` key is required if using Splunk 4.3. ### Client-side examples -The Splunk SDK for JavaScript includes several browser-based examples, which you can -run from the Examples web page. +The Splunk Enterprise SDK for JavaScript includes several browser-based examples, which you can run from the Examples web page. -To start a simple web server and open the Examples page in a -web browser, enter: +To start a simple web server and open the Examples page in a web browser, enter: node sdkdo examples ### Node.js examples -The Splunk SDK for JavaScript includes several command-line examples, which are -located in the **/splunk-sdk-javascript/examples/node** directory. These -examples run with Node.js and use the command-line arguments from the -**.splunkrc** file, if you set this up with your login credentials. +The Splunk Enterprise SDK for JavaScript includes several command-line examples, which are located in the **/splunk-sdk-javascript/examples/node** directory. These examples run with Node.js and use the command-line arguments from the **.splunkrc** file, if you set this up with your login credentials. -For example, to run the **jobs.js** example, open a command prompt in the -**/splunk-sdk-javascript/examples/node** directory and enter: +For example, to run the **jobs.js** example, open a command prompt in the **/splunk-sdk-javascript/examples/node** directory and enter: node jobs.js list -If you aren't storing your login credentials in **.splunkrc**, enter the -following command, providing your own values: +If you aren't storing your login credentials in **.splunkrc**, enter the following command, providing your own values: node jobs.js --username yourusername --password yourpassword list @@ -183,37 +253,27 @@ Your output should look something like this: ## Development -The Splunk SDK for JavaScript infrastructure relies on Node.js, so if you want to -build files, run examples, run tests, or generate documentation, you must -install Node.js. You can read more about how to set up your environment -on the [Splunk Developer Portal][requirements]. +The Splunk Enterprise SDK for JavaScript infrastructure relies on Node.js to build files, run examples, run tests, and generate documentation. - -All development activities are managed by a helper script called *sdkdo*. For a -list of possible commands and options, open a command prompt in the -**splunk-sdk-javascript** directory and enter: +All development activities are managed by a helper script called `sdkdo`. For a list of possible commands and options, open a command prompt in the **splunk-sdk-javascript** directory and enter: node sdkdo --help -### Compile (combine and minify) the browser files +### Compile the browser files -To rebuild and minify the browser files, open a command prompt in the -**splunk-sdk-javascript** directory and enter: +To rebuild and minify the browser files, open a command prompt in the **splunk-sdk-javascript** directory and enter: node sdkdo compile ### Run unit tests -The Splunk SDK for JavaScript includes several unit tests for each component. You -can run individual test modules or run all tests. Before you run them, some -searches need to be running in your splunkd instance. You can start some -searches by logging into Splunk Web and opening the Search app, which will run a -few searches to populate its dashboard. +The Splunk Enterprise SDK for JavaScript includes several unit tests for each component. You can run individual test modules or run all tests. Some searches need to be running in your Splunk Enterprise instance before you run these tests. You can start some searches by logging into Splunk Web and opening the Search app, which runs a few searches to populate the dashboard. + +>**Note**: The [SDK App Collection](https://github.com/splunk/sdk-app-collection) app is required for running unit tests. -**Note**: The 'sdk-app-collection' app is required for running unit tests. +To run the unit tests, open a command prompt in the **splunk-sdk-javascript** directory, then run the following commands. -To run the unit tests, open a command prompt in the **splunk-sdk-javascript** -directory. To run all tests, enter: +To run all tests, enter: node sdkdo tests @@ -221,235 +281,93 @@ To run the HTTP and the Async tests, enter: node sdkdo tests http,async -To run the browser tests, enter: +To run tests containing a particular string, enter: - node sdkdo tests-browser - -To run all unit tests without log messages from splunk, enter: - - `node sdkdo tests --quiet` - -To run all the tests and generate JUnit compatible XML in `splunk-sdk-javascript/test_logs/junit_test_results.xml`, enter: - - `node sdkdo tests --reporter junit` - -## Repository - - - - - - + node sdkdo tests --grep "While success" - - - - +To run the browser tests, enter: - - - - + node sdkdo tests-browser - - - - +To run all unit tests without log messages, enter: - - - - + node sdkdo tests --quiet - - - - +To run all the tests and generate test report in **splunk-sdk-javascript/mochawesome-report/mochawesome.html**, enter: - - - - + node sdkdo tests --reporter mochawesome - - - - +To get more info to run tests, enter: - - - - + make test_specific +## Repository -
/binExecutable files (such as sdkdo)
/clientPre-built files for the browser
/contribPackaged third-party dependencies (such as test runners)
/docsAPI reference documentation
/examplesExamples
/libThe SDK code files
/licensesLicense information for packaged third-party dependencies
/node_modulesJavaScript modules used by Node.js
/testsUnit tests
+| Directory | Description | +|:------------- |:---------------------------------------------------------- | +| /bin | Executable files (such as sdkdo) | +| /client | Pre-built files for the browser | +| /contrib | Packaged third-party dependencies (such as test runners) | +| /docs | API reference documentation | +| /examples | Examples | +| /lib | The SDK code files | +| /licenses | License information for packaged third-party dependencies | +| /node_modules | JavaScript modules used by Node.js | +| /tests | Unit tests | ### Changelog -The **CHANGELOG.md** file in the root of the repository contains a description -of changes for each version of the SDK. You can also find the -[Splunk SDK for JavaScript Changelog][changelog] online. +The [CHANGELOG](CHANGELOG.md) contains a description of changes for each version of the SDK. For the latest version, see the [CHANGELOG.md](https://github.com/splunk/splunk-sdk-javascript/blob/master/CHANGELOG.md) on GitHub. ### Branches -The **master** branch always represents a stable and released version of the -SDK. You can read more about the -[JavaScript SDK Branching Model][branchingmodel] on our wiki. +The **master** branch represents a stable and released version of the SDK. +To learn about our branching model, see [Branching Model](https://github.com/splunk/splunk-sdk-javascript/wiki/Branching-Model) on GitHub. ## Documentation and resources -If you need to know more: - -* For all things developer with Splunk, your main resource is the - [Splunk Developer Portal][devportal]. +| Resource | Description | +|:----------------------- |:----------- | +| [Splunk Developer Portal](http://dev.splunk.com) | General developer documentation, tools, and examples | +| [Integrate the Splunk platform using development tools for JavaScript](https://dev.splunk.com/enterprise/docs/devtools/javascript)| Documentation for JavaScript development | +| [Splunk Enterprise SDK for JavaScript Reference](http://docs.splunk.com/Documentation/JavaScriptSDK) | SDK API reference documentation | +| [REST API Reference Manual](https://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTprolog) | Splunk REST API reference documentation | +| [Splunk>Docs](https://docs.splunk.com/Documentation) | General documentation for the Splunk platform | +| [GitHub Wiki](https://github.com/splunk/splunk-sdk-javascript/wiki/) | Documentation for this SDK's repository on GitHub | -* For conceptual and how-to documentation, see the - [Overview of the Splunk SDK for JavaScript][jsoverview]. - -* For API reference documentation, see the - [Splunk SDK for JavaScript Reference][jsapiref]. - -* For more about the Splunk REST API, see the - [REST API Reference][restapiref]. - -* For more about about Splunk in general, see [Splunk>Docs][splunkdocs]. - - -* For more about this SDK's repository, see our [GitHub Wiki][jsgithubwiki]. ## Community -Stay connected with other developers building on Splunk. - - +Stay connected with other developers building on the Splunk platform. - - - - +* [Email](mailto:devinfo@splunk.com) +* [Issues and pull requests](https://github.com/splunk/splunk-sdk-javascript/issues/) +* [Community Slack](https://splunk-usergroups.slack.com/app_redirect?channel=appdev) +* [Splunk Answers](https://community.splunk.com/t5/Splunk-Development/ct-p/developer-tools) +* [Splunk Blogs](https://www.splunk.com/blog) +* [Twitter](https://twitter.com/splunkdev) - - - +### Contributions - - - +If you would like to contribute to the SDK, see [Contributing to Splunk](https://www.splunk.com/en_us/form/contributions.html). For additional guidelines, see [CONTRIBUTING](CONTRIBUTING.md). - - - - - - - - -
Emaildevinfo@splunk.com
Issues -https://github.com/splunk/splunk-sdk-javascript/issues/
Answers -http://splunk-base.splunk.com/tags/javascript/
Blog -http://blogs.splunk.com/dev/
Twitter -@splunkdev
- -### How to contribute - -If you would like to contribute to the SDK, go here for more information: +### Support -* [Splunk and open source][contributions] +* You will be granted support if you or your company are already covered under an existing maintenance/support agreement. Submit a new case in the [Support Portal](https://www.splunk.com/en_us/support-and-services.html) and include "Splunk Enterprise SDK for JavaScript" in the subject line. -* [Individual contributions][indivcontrib] + If you are not covered under an existing maintenance/support agreement, you can find help through the broader community at [Splunk Answers](https://community.splunk.com/t5/Splunk-Development/ct-p/developer-tools). -* [Company contributions][companycontrib] +* Splunk will NOT provide support for SDKs if the core library (the code in the **/splunklib** directory) has been modified. If you modify an SDK and want support, you can find help through the broader community and [Splunk Answers](https://community.splunk.com/t5/Splunk-Development/ct-p/developer-tools). + We would also like to know why you modified the core library, so please send feedback to _devinfo@splunk.com_. -### Support +* File any issues on [GitHub](https://github.com/splunk/splunk-sdk-javascript/issues). -1. You will be granted support if you or your company are already covered under an existing maintenance/support agreement. - Send an email to support@splunk.com and include "Splunk SDK for JavaScript" in the subject line. - 2. If you are not covered under an existing maintenance/support agreement, you - can find help through the broader community at: -
    -
  • Splunk Answers (use - the sdk, java, python, and javascript tags to - identify your questions)
  • -
-3. Splunk will NOT provide support for SDKs if the core library (the - code in the /lib directory) has been modified. If you modify an SDK - and want support, you can find help through the broader community and Splunk - answers (see above). We would also like to know why you modified the core - library—please send feedback to devinfo@splunk.com. -4. File any issues on [GitHub](githubjsissues) ### Contact us -You can reach the Developer Platform team at _devinfo@splunk.com_. +You can reach the Splunk Developer Platform team at _devinfo@splunk.com_. ## License -The Splunk JavaScript Software Development Kit is licensed under the Apache -License 2.0. Details can be found in the LICENSE file. - -### Third-party libraries - -The embedded third-party libraries may have different licenses. Here is a list -of embedded libraries and their licenses: - -* [dox RESTful degradable JavaScript routing][dox]: [MIT][dox-license] -* [davis.js Documentation Generator][davis.js]: [MIT][davis-license] -* [jquery.class.js Create custom class with jquery][jquery.class.js]: [MIT][jquery.class-license] -* [nodeunit Unit testing in node.js and the browser][nodeunit]: [MIT][nodeunit-license] -* [showdown.js Markdown to HTML converter][showdown.js]: [BSD][showdown-license] -* [staticresource Static resource handling][staticresource]: [MIT][staticresource-license] -* [webapp2 A framework for Google App Engine][webapp2]: [Apache][webapp2-license] -* [commander Node.js command-line interfaces][commander]: [MIT][commander-license] -* [script.js Asyncronous JavaScript loader and dependency manager][script.js]: [Apache][scriptjs-license] -* [base64.js Fast base64 encoding/decoding][base64.js]: [MIT][base64-license] -* [highcharts.js Interactive JavaScript charts][highcharts.js]: [CC BY-NC 3.0] - - -[dox]: https://github.com/visionmedia/dox -[davis.js]: https://github.com/olivernn/davis.js -[jquery.class.js]: http://ejohn.org/blog/simple-javascript-inheritance/ -[nodeunit]: https://github.com/caolan/nodeunit/ -[showdown.js]: https://github.com/coreyti/showdown/ -[staticresource]: https://github.com/atsuya/static-resource/ -[webapp2]: http://code.google.com/p/webapp-improved/ -[commander]: https://github.com/visionmedia/commander.js/ -[script.js]: https://github.com/ded/script.js/ -[base64.js]: http://code.google.com/p/javascriptbase64/ -[highcharts.js]: https://github.com/highcharts/highcharts -[dox-license]: xhttps://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-DOX -[davis-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-DAVIS -[jquery.class-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-JQUERYCLASS -[nodeunit-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-NODEUNIT -[showdown-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-SHOWDOWN -[staticresource-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-STATICRESOURCE -[webapp2-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-WEBAPP2 -[commander-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-COMMANDER -[scriptjs-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-SCRIPTJS -[base64-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-BASE64 -[event-license]: https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-BASE64 - -[json2]: http://www.json.org/js.html -[splunkrc]: https://github.com/splunk/splunk-sdk-javascript/blob/master/splunkrc.spec -[node_examples_dir]: https://github.com/splunk/splunk-sdk-javascript/blob/master/examples/node -[browser_examples_dir]: https://github.com/splunk/splunk-sdk-javascript/blob/master/examples/browser -[client_dir]: https://github.com/splunk/splunk-sdk-javascript/blob/master/client -[refdocs]: http://docs.splunk.com/Documentation/JavaScriptSDK -[devportal]: http://dev.splunk.com -[cli]: https://github.com/splunk/splunk-sdk-javascript/blob/master/bin/cli.js -[SplunkInstall]: http://docs.splunk.com/Documentation/Splunk/latest/Installation/WhatsintheInstallationManual -[zip]: https://github.com/splunk/splunk-sdk-javascript/zipball/master -[jsoverview]: http://dev.splunk.com/view/SP-CAAAECM -[install]: http://dev.splunk.com/view/javascript-sdk-getting-started/SP-CAAAEFN -[examples]: http://dev.splunk.com/view/javascript-sdk-getting-started/SP-CAAAEDD -[requirements]: http://dev.splunk.com/view/javascript-sdk-getting-started/SP-CAAAED6 -[contributions]: http://dev.splunk.com/view/opensource/SP-CAAAEDM -[changelog]: https://github.com/splunk/splunk-sdk-javascript/blob/master/CHANGELOG.md -[branchingmodel]: https://github.com/splunk/splunk-sdk-javascript/wiki/Branching-Model -[jsapiref]: http://docs.splunk.com/Documentation/JavaScriptSDK -[restapiref]: http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI -[splunkdocs]: http://docs.splunk.com/Documentation/Splunk -[jsgithubwiki]: https://github.com/splunk/splunk-sdk-javascript/wiki -[indivcontrib]: http://dev.splunk.com/goto/individualcontributions -[companycontrib]: http://dev.splunk.com/view/companycontributions/SP-CAAAEDR -[githubjsissues]: https://github.com/splunk/splunk-sdk-javascript/issues +The Splunk Enterprise Software Development Kit for JavaScript is licensed under the Apache License 2.0. See [LICENSE](LICENSE) for details. From 71f46991482c2cf138d606fcb90b94d874b1381e Mon Sep 17 00:00:00 2001 From: rmaheshwari-splunk <84171674+rmaheshwari-splunk@users.noreply.github.com> Date: Mon, 14 Jun 2021 13:26:40 +0530 Subject: [PATCH 6/9] Updated HighCharts License. Added LICENSE-HIGHCHARTS.txt and updated README.md regarding the same. --- licenses/LICENSE-HIGHCHARTS | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 licenses/LICENSE-HIGHCHARTS diff --git a/licenses/LICENSE-HIGHCHARTS b/licenses/LICENSE-HIGHCHARTS new file mode 100644 index 000000000..e47f8206e --- /dev/null +++ b/licenses/LICENSE-HIGHCHARTS @@ -0,0 +1,2 @@ +Creative Commons Attribution-NonCommercial 3.0 Unported License +https://creativecommons.org/licenses/by-nc/3.0/legalcode From 85d70ba8de1eea44cbf2c826b451b7f259c11849 Mon Sep 17 00:00:00 2001 From: Abhi Shah Date: Tue, 21 Sep 2021 13:58:09 +0530 Subject: [PATCH 7/9] Update --- licenses/LICENSE-HIGHCHARTS | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 licenses/LICENSE-HIGHCHARTS diff --git a/licenses/LICENSE-HIGHCHARTS b/licenses/LICENSE-HIGHCHARTS deleted file mode 100644 index e47f8206e..000000000 --- a/licenses/LICENSE-HIGHCHARTS +++ /dev/null @@ -1,2 +0,0 @@ -Creative Commons Attribution-NonCommercial 3.0 Unported License -https://creativecommons.org/licenses/by-nc/3.0/legalcode From 045343b15f0f33237ab94562d740036c4814327c Mon Sep 17 00:00:00 2001 From: Abhi Shah Date: Tue, 21 Sep 2021 15:40:26 +0530 Subject: [PATCH 8/9] Update CREDITS.md --- CREDITS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CREDITS.md b/CREDITS.md index f847d8706..eee2f4358 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -17,4 +17,5 @@ Some of the components included in the Splunk Enterprise SDK for JavaScript are | [dotenv](https://github.com/motdotla/dotenv) | Loads environment varibles from .env file | [BSD 2-Clause](https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-DOTENV) | | [cookie](https://github.com/jshttp/cookie) | HTTP cookie parser and serializer for HTTP servers | [MIT](https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-COOKIE) | | [elementtree](https://github.com/racker/node-elementtree) | Node.js XML parserer and serializer | [Apache-2.0](https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-ELEMENTTREE) | -| [needle](https://github.com/tomas/needle) | Node.js http client | [MIT](https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-NEEDLE) | \ No newline at end of file +| [needle](https://github.com/tomas/needle) | Node.js http client | [MIT](https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-NEEDLE) | +| [Highcharts](https://github.com/highcharts/highcharts) | Interactive JavaScript charts | From 337f75ee058171699dc22b8df3f9b197027d5539 Mon Sep 17 00:00:00 2001 From: Abhi Shah Date: Tue, 21 Sep 2021 15:42:15 +0530 Subject: [PATCH 9/9] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f137f0d99..646d863b1 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,11 @@ For more information, see [Splunk Enterprise SDK for JavaScript](https://dev.spl * Node.js v 8.17.0, or v14 or later - The Splunk Enterprise SDK for JavaScript was tested with Node.js v8.17.0, v14. + The Splunk Enterprise SDK for JavaScript was tested with Node.js v8.17.0, v14. * Splunk Enterprise 8.0 or 8.2, or Splunk Cloud - The Splunk Enterprise SDK for JavaScript was tested with Splunk Enterprise 8.0 or 8.2, or Splunk Cloud. + The Splunk Enterprise SDK for JavaScript was tested with Splunk Enterprise 8.0 or 8.2, or Splunk Cloud. * Splunk Enterprise SDK for JavaScript @@ -253,7 +253,7 @@ Your output should look something like this: ## Development -The Splunk Enterprise SDK for JavaScript infrastructure relies on Node.js to build files, run examples, run tests, and generate documentation. +The Splunk Enterprise SDK for JavaScript infrastructure relies on Node.js to build files, run examples, run tests, and generate documentation. All development activities are managed by a helper script called `sdkdo`. For a list of possible commands and options, open a command prompt in the **splunk-sdk-javascript** directory and enter: @@ -271,7 +271,7 @@ The Splunk Enterprise SDK for JavaScript includes several unit tests for each co >**Note**: The [SDK App Collection](https://github.com/splunk/sdk-app-collection) app is required for running unit tests. -To run the unit tests, open a command prompt in the **splunk-sdk-javascript** directory, then run the following commands. +To run the unit tests, open a command prompt in the **splunk-sdk-javascript** directory, then run the following commands. To run all tests, enter: @@ -349,7 +349,7 @@ Stay connected with other developers building on the Splunk platform. ### Contributions -If you would like to contribute to the SDK, see [Contributing to Splunk](https://www.splunk.com/en_us/form/contributions.html). For additional guidelines, see [CONTRIBUTING](CONTRIBUTING.md). +If you would like to contribute to the SDK, see [Contributing to Splunk](https://www.splunk.com/en_us/form/contributions.html). For additional guidelines, see [CONTRIBUTING](CONTRIBUTING.md). ### Support @@ -357,7 +357,7 @@ If you would like to contribute to the SDK, see [Contributing to Splunk](https:/ If you are not covered under an existing maintenance/support agreement, you can find help through the broader community at [Splunk Answers](https://community.splunk.com/t5/Splunk-Development/ct-p/developer-tools). -* Splunk will NOT provide support for SDKs if the core library (the code in the **/splunklib** directory) has been modified. If you modify an SDK and want support, you can find help through the broader community and [Splunk Answers](https://community.splunk.com/t5/Splunk-Development/ct-p/developer-tools). +* Splunk will NOT provide support for SDKs if the core library (the code in the **/splunklib** directory) has been modified. If you modify an SDK and want support, you can find help through the broader community and [Splunk Answers](https://community.splunk.com/t5/Splunk-Development/ct-p/developer-tools). We would also like to know why you modified the core library, so please send feedback to _devinfo@splunk.com_.