HTTP
19 min
the http connector enables the creation and execution of custom http requests to interact with various web services and apis, enhancing automation capabilities within swimlane the http connector for swimlane turbine provides a versatile interface to interact with various web services and apis directly from the swimlane platform it enables users to craft custom http requests, including get, post, put, patch, and delete methods, to any endpoint, with support for dynamic url construction, custom headers, and payload formatting this integration empowers security teams to automate interactions with external systems, enrich data, and execute actions across their security stack without writing code, enhancing the efficiency and responsiveness of their security workflows prerequisites to effectively utilize the http connector within swimlane turbine, ensure you have the following prerequisites oauth 2 0 client credentials for secure authentication url endpoint for the http request client id unique identifier for the oauth client client secret secret key associated with the oauth client token url endpoint to retrieve the oauth token http basic authentication for simple access control url endpoint for the http request username user identifier for basic authentication password corresponding password for the user api key authentication for service specific authorization url endpoint for the http request api key personalized token for accessing the api api key name name of the header or query parameter to send the api key api key location location where the api key should be included (header or query) http bearer token authentication for token based security and so on capabilities this connector provides the following capabilities send an http request limitations this connector works for any api that conforms to a standard authentication scheme any api that has implemented its own custom method is not supported by this connector asset setup please read the api documentation of the product you would like to connect to swimlane in order to understand which authentication type is required this connector supports the following authentication types no auth, basic, bearer token, api key/token oauth2 0 client credentials configuring an asset host ( required ) = the hostname of the product's api authentication type ( required ) = type of authentication to use for this api options no auth , basic , bearer , api key , oauth2 client credentials verify ssl = toggle ssl verification support http proxy = a proxy url where all requests can get routed through no auth authentication not recommended and most likely not supported by your api nothing is required to authenticate basic authentication this means you have select authentication type to be basic basic username ( required ) = the api username basic password ( required ) = the api password, sometimes this is an api token bearer token authentication this means you have select authentication type to be bearer bearer token ( required ) = the bearer token for the api api key authentication this means you have select authentication type to be api key api key name ( required ) = the api key name api key value ( required ) = value of the api key api key location ( required ) = location of the api key name and value options query params or headers oauth2 0 client credentials authentication this means you have select authentication type to be oauth2 client credentials oauth2 client id ( required ) = client id oauth2 client secret ( required ) = client secret oauth2 token url ( required ) = the full url, including host, of where to get the access token oauth2 scope ( required ) = space separated string of scopes to apply to the access token actions setup after configuring an asset for the api you can create as many generic http request actions as you would like endpoint ( required ) = the endpoint of the api to send a request to this includes everything that comes after the host except for query parameters method ( required ) = http request method and typically one of get , post , patch , delete , put when provided, the following inputs must be valid json strings for creating dynamic strings please use the new string interpolation feature documentation can be found here input configuration string interpolation https //swimlane com/knowledge center/docs/administrator guide/integrations/configure task input#map script or api input field parameters query parameters = optional url query parameters to send with the request headers = optional headers to send with the request request body = request payload as json configurations api key authentication authenticates using an api key configuration parameters parameter description type required url a url to the target host string required apikey api key value string required apikey name the header key name for which to apply the api key string required apikey in the location of the api key options header, cookie or query string required verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional headers additional headers to send with each request such as a user agent object optional http basic authentication authenticates using username and password configuration parameters parameter description type required url a url to the target host string required username username string required password password string required verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional headers additional headers to send with each request such as a user agent object optional http bearer authentication authenticates using bearer token such as a jwt, etc configuration parameters parameter description type required url a url to the target host string required token the api key, token, etc string required verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional headers additional headers to send with each request such as a user agent object optional oauth 2 0 client credentials authenticates using oauth 2 0 client credentials configuration parameters parameter description type required url a url to the target host string required token url string required client id the client id string required client secret the client secret string required scope permission scopes for this action array optional verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional headers additional headers to send with each request such as a user agent object optional actions send http request builds and sends a custom http request to specified endpoints, allowing for flexible web interactions input argument name type required description endpoint string optional path to the endpoint after url in asset use double brackets with path parameters for dynamic urls method string optional method of the request such as post, get, put, patch, delete (note, others are available to use) data body object optional body to send as data, this allows you to set the content type in the headers manually headers object optional request headers to send with the individual request output parameter type description status code number the http response status code data object the json response body response text string output field response text reason string the http reason, often times an error message can be here ok means success example \[ { "status code" 200, "response headers" { "content type" "application/json", "date" "thu, 01 jan 2024 00 00 00 gmt" }, "reason" "ok", "response text" "string" } ] response headers header description example content type the media type of the resource application/json date the date and time at which the message was originated thu, 01 jan 2024 00 00 00 gmt