![]() This is a list of strings that contains all the URL parts after the REST handler prefix. For example, this object doesn't have any attributes set by the middleware or application such as er, ssion, or request.site. This is a standard Django request object, but with a few exceptions. REST handlers receive the following arguments: But, REST handlers can import any dependencies defined in your app JSON, and any of Django's built-in modules, but calling anything that depends on tup() fails. REST handlers can't import any Splunk Phantom platform code. For more information on creating containers and artifacts, see REST Containers and REST Artifact in the Splunk Phantom REST API Manual. Create appropriate containers and artifacts through the Splunk Phantom REST API, using the parsed authentication header.Parse the authentication header from the request object.Parse your desired data from the request object and the URL fragments.Splunk Phantom then calls into your function. You can find the URL by navigating to the main menu and clicking Apps > Configure New Asset > Asset Settings after your REST handler is configured and the app JSON code is updated. Enter the URL you want to use in the REST handler after the prefix rest/handler/_/.To use a REST handler, follow these steps: When you make an API request to Splunk Phantom, your code is called with a Django request object and a list of URL parts. The ability to write your own implementation is also provided, if you need more flexibility. For more information see Use a Custom Script in the REST API Reference for Splunk Phantom Manual. When reparsing your data, you can also use the REST Data Source app and supply a data transformation script. ![]() Two particularly useful ways are for reparsing your data to push it into Splunk Phantom and for using OAuth with test connectivity. When you create an app, you can use REST handlers in a variety of ways. REST handlers allow external services to call into Splunk Phantom. Use REST handlers to allow external services to call into Splunk Phantom ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |