Skip to content

Commit

Permalink
added init file, version bump, and refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
abmccann-r7 committed Oct 19, 2023
1 parent 10dc9bd commit fd8d819
Show file tree
Hide file tree
Showing 20 changed files with 151 additions and 130 deletions.
18 changes: 9 additions & 9 deletions plugins/rest/.CHECKSUM
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
"spec": "36ba74a6e69cf3a8fcebc9e96b7e1aff",
"manifest": "7121f3fca33d1a61d3481ed694b0d7f2",
"setup": "a2f5e62e2c394da1865fe71ce5d2c476",
"spec": "508054b97b90d27c1263e2828dfac9ed",
"manifest": "6945707cd6658b1d844960516afa483e",
"setup": "fac6b6b40ef74e588ece433b704b2430",
"schemas": [
{
"identifier": "delete/schema.py",
"hash": "31d8ea573b5c9402b53db6d5f35c75f4"
"hash": "2701d05919734fb0007389bbf34a3d32"
},
{
"identifier": "get/schema.py",
"hash": "5004e5b85876853a676ae0f866f9b617"
"hash": "0cbad0600e9678d22924bd7b1d0b282a"
},
{
"identifier": "patch/schema.py",
"hash": "88bf9441f40c3f69bc89a4c265617bd2"
"hash": "eb90dca9b47905d15130a84c0318acb4"
},
{
"identifier": "post/schema.py",
"hash": "efba11c6934e31ddb5ff2c0bb2066361"
"hash": "a9fdc31073dbd073235b5c9d2193ff6c"
},
{
"identifier": "put/schema.py",
"hash": "f408a0e4088e62f0b620fb58c9af6eb6"
"hash": "d53c60a8347a9f3e434296061153a83e"
},
{
"identifier": "connection/schema.py",
"hash": "7f5b53d7dc040ff42ee3d2e2eabc5ffa"
"hash": "d76e7ec346d4a6d0bb4bf461031d07c4"
}
]
}
20 changes: 10 additions & 10 deletions plugins/rest/bin/komand_rest
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env python
# GENERATED BY KOMAND SDK - DO NOT EDIT
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT
import os
import json
from sys import argv

Name = "HTTP Requests"
Vendor = "rapid7"
Version = "6.0.2"
Version = "6.0.3"
Description = "The HTTP Requests plugin to make it easy to integrate with RESTful services"


Expand All @@ -23,7 +23,7 @@ def main():
monkey.patch_all()

import insightconnect_plugin_runtime
from komand_rest import connection, actions, triggers
from komand_rest import connection, actions, triggers, tasks

class ICONRest(insightconnect_plugin_runtime.Plugin):
def __init__(self):
Expand All @@ -34,16 +34,16 @@ def main():
description=Description,
connection=connection.Connection()
)
self.add_action(actions.Delete())

self.add_action(actions.Get())

self.add_action(actions.Patch())


self.add_action(actions.Post())

self.add_action(actions.Put())


self.add_action(actions.Patch())

self.add_action(actions.Delete())


"""Run plugin"""
cli = insightconnect_plugin_runtime.CLI(ICONRest())
Expand Down
29 changes: 16 additions & 13 deletions plugins/rest/help.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
# Description
The HTTP Requests plugin to make it easy to integrate with RESTful services

The HTTP Requests plugin to make it easy to integrate with RESTful services

The HTTP Requests plugin allows users to automate HTTP requests to API services such as [RESTful based services](https://en.wikipedia.org/wiki/Representational_state_transfer).

This plugin is often used to integrate with ad-hoc 3rd party API's in a workflow without going through the process of [building a new plugin](https://komand.github.io/python/index.html). It supports DELETE, GET, PATCH, POST, or PUT requests to the provided URI.

# Key Features

* Make RESTful API calls

* Quickly integrate with 3rd party API's over HTTP

# Requirements

* A RESTFUL HTTP/HTTPS resource and supported authentication, if any

# Supported Product Versions
* 2022-09-05

* 2022-09-05

# Documentation

Expand All @@ -33,7 +36,7 @@ The connection configuration accepts the following parameters:
|private_key|file|None|False|Private key for mutual TLS (requires Client Certificate)|None|LS0tLS1CRudJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpQSUlFcFFJQkFBS0NBUUVPMUdUQ2o3dFNodnBMSEQ0ekgraGlvbUw2MXQ4MzQvVS9tWfFOSFoxRHhUbm4rdjF4CjFWaHBGbHZtd1NCUVNDTU1CZ01WRpRQcExrcnU4a01uK3djVVFVcXR3Q2x0RzUxVllQeElZUU1IUTIvN0RraFoKYzIvQ1p0TndFelBBV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hJdk1vcU05TkJLNStXTmRUMU1CcjlxcmhPYmNsZ0d0TzAvaUs3aEpSY0Q3alpIZwpnMnVrU01iUkR1VUo0ZjFSUlNveFBDZWJrcktyNllNQmRTZ2IrZFIyRWJVQ2NReU5oMFJ3L1ovQlNSQ29SSGxUClhPb29iazlnUUN2WHNROUlUK3lTNFlaaE5iNFQ0eXE4bDBpQlJkYkRBb0dBTE11Y2p6cWJibTB0d3hoTHZkR2QKeEFoUnY5TTFBdndyLzkySklqZDNVOG9mOEZGdldZQW5ualg2Y0pGaE0rK28vU2pYbUx4NGcxVWcyVXZJSUthMworWjR2bmtKdVRsdG1ITWFhRUNDbXhTOHRqTWt1bXpqWmRXTkp5TWJCMHlqYUpnWFo2USt6Tzl5UkhnNURFMXg3CkxZRmhaVVJDcE8vR1RkSG9YTjJIQm1NQ2dZRUF1ZXRWNU5OMjJ2bW1wcTlRZ3JUdUZHQkVFaFQrdkhpWE1rMGcKZDIyelpGOXh2WXhMbXJvWGhJTUJ4VHJkWFJDbndkWHF2dVFKNjdybjVOTVhrNW9rZTZQOFJWMDQvTEJTN0VMZgpBd2wrV3dMMUh2b0dWeFBCMGNmeE9scFlkRHpKa3JuYlZ2WS9QTjhMdkRmdy9oOG1WczA0RUNGb1pqcG9kM0xpCjNPR1NqLzhDZ1lFQWthekw5UDJTVHVPck1HYncrK2xSVER2RVlSUXp2b3U0UEFudHlOQUtNSFo3MmNwc0pRRG8KMXdIelFweHRwc0I3bzNoMTEweFdId2xMQ3BzaXFueExoVlRIek9WUVFaQnR5cjhMTVMwVDY5UVc1ekhmcS9hZQpSeGtYdDR0bmUrL0dQdzFPMlN6d3IxcmxUV2tNRGxoM2VEU3R2TjVaaW9qZXM2OVMwb3QzZWVMPQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo|
|secret|credential_secret_key|None|False|Credential secret key. Provide a Bearer Token, Rapid7 Insight, OpsGenie, Pendo or using "CUSTOM_SECRET_INPUT" in the Default Headers field for Custom authentication type|None|9de5069c5afe602b2ea0a04b66beb2c0|
|ssl_verify|boolean|True|True|Verify TLS/SSL certificate|None|True|

Example input:

```
Expand All @@ -59,11 +62,11 @@ Example input:
## Technical Details

### Actions


#### DELETE

This action is used to make a DELETE request.
This action is used to make a DELETE request

##### Input

Expand Down Expand Up @@ -115,7 +118,7 @@ Example output:

#### GET

This action is used to make a GET request.
This action is used to make a GET request

##### Input

Expand Down Expand Up @@ -167,7 +170,7 @@ Example output:

#### PATCH

This action is used to make a PATCH request.
This action is used to make a PATCH request

##### Input

Expand Down Expand Up @@ -219,7 +222,7 @@ Example output:

#### POST

This action is used to make a POST request.
This action is used to make a POST request

##### Input

Expand Down Expand Up @@ -271,7 +274,7 @@ Example output:

#### PUT

This action is used to make a PUT request.
This action is used to make a PUT request

##### Input

Expand Down Expand Up @@ -320,18 +323,17 @@ Example output:
"status": 200
}
```

### Triggers

*This plugin does not contain any triggers.*

### Tasks

*This plugin does not contain any tasks.*
*This plugin does not contain any tasks.*

### Custom Types

*This plugin does not contain any custom output types.*
*This plugin does not contain any custom output types.*

## Troubleshooting

Expand All @@ -341,6 +343,7 @@ Any issues connecting to the remote service should be present in the log of the

# Version History

* 6.0.3 - Added empty `__init__.py` file to `unit_test` folder | Refreshed with new tooling
* 6.0.2 - Fixed a bug that would cause an incorrect error message whenever a 400 error was received and the response object was a list
* 6.0.1 - Improved ability of 'Body Any' input to handle non-standard characters and JSON input
* 6.0.0 - All actions: Changed body as array to body as any (string input)
Expand Down
12 changes: 9 additions & 3 deletions plugins/rest/komand_rest/actions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# GENERATED BY KOMAND SDK - DO NOT EDIT
from .delete.action import Delete
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT

from .get.action import Get
from .patch.action import Patch

from .post.action import Post

from .put.action import Put

from .patch.action import Patch

from .delete.action import Delete

2 changes: 1 addition & 1 deletion plugins/rest/komand_rest/actions/delete/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# GENERATED BY KOMAND SDK - DO NOT EDIT
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT
from .action import Delete
18 changes: 10 additions & 8 deletions plugins/rest/komand_rest/actions/delete/schema.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# GENERATED BY KOMAND SDK - DO NOT EDIT
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT
import insightconnect_plugin_runtime
import json


class Component:
DESCRIPTION = "Make a DELETE request"
DESCRIPTION = "This action is used to make a DELETE request"


class Input:
BODY_ANY = "body_any"
BODY_OBJECT = "body_object"
HEADERS = "headers"
ROUTE = "route"


class Output:
BODY_OBJECT = "body_object"
BODY_STRING = "body_string"
HEADERS = "headers"
STATUS = "status"


class DeleteInput(insightconnect_plugin_runtime.Input):
schema = json.loads("""
schema = json.loads(r"""
{
"type": "object",
"title": "Variables",
Expand Down Expand Up @@ -54,7 +54,8 @@ class DeleteInput(insightconnect_plugin_runtime.Input):
},
"required": [
"route"
]
],
"definitions": {}
}
""")

Expand All @@ -63,7 +64,7 @@ def __init__(self):


class DeleteOutput(insightconnect_plugin_runtime.Output):
schema = json.loads("""
schema = json.loads(r"""
{
"type": "object",
"title": "Variables",
Expand Down Expand Up @@ -92,7 +93,8 @@ class DeleteOutput(insightconnect_plugin_runtime.Output):
"description": "Status code of the response from the server",
"order": 3
}
}
},
"definitions": {}
}
""")

Expand Down
2 changes: 1 addition & 1 deletion plugins/rest/komand_rest/actions/get/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# GENERATED BY KOMAND SDK - DO NOT EDIT
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT
from .action import Get
18 changes: 10 additions & 8 deletions plugins/rest/komand_rest/actions/get/schema.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# GENERATED BY KOMAND SDK - DO NOT EDIT
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT
import insightconnect_plugin_runtime
import json


class Component:
DESCRIPTION = "Make a GET request"
DESCRIPTION = "This action is used to make a GET request"


class Input:
BODY_ANY = "body_any"
BODY_OBJECT = "body_object"
HEADERS = "headers"
ROUTE = "route"


class Output:
BODY_OBJECT = "body_object"
BODY_STRING = "body_string"
HEADERS = "headers"
STATUS = "status"


class GetInput(insightconnect_plugin_runtime.Input):
schema = json.loads("""
schema = json.loads(r"""
{
"type": "object",
"title": "Variables",
Expand Down Expand Up @@ -54,7 +54,8 @@ class GetInput(insightconnect_plugin_runtime.Input):
},
"required": [
"route"
]
],
"definitions": {}
}
""")

Expand All @@ -63,7 +64,7 @@ def __init__(self):


class GetOutput(insightconnect_plugin_runtime.Output):
schema = json.loads("""
schema = json.loads(r"""
{
"type": "object",
"title": "Variables",
Expand Down Expand Up @@ -92,7 +93,8 @@ class GetOutput(insightconnect_plugin_runtime.Output):
"description": "Status code of the response from the server",
"order": 3
}
}
},
"definitions": {}
}
""")

Expand Down
2 changes: 1 addition & 1 deletion plugins/rest/komand_rest/actions/patch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# GENERATED BY KOMAND SDK - DO NOT EDIT
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT
from .action import Patch
Loading

0 comments on commit fd8d819

Please sign in to comment.