Use the renderRequest action to send custom HTTP requests

Use the renderRequest action to send custom HTTP requests

The renderRequest action works similarly to curl by allowing you to send HTTP requests to a URL. However, unlike curl, renderRequest automatically handles several tasks for you, such as:

  • Managing authentication

  • Applying findReplace processing

  • Replacing special variables

  • Integrating with CLI scripts and run actions

Some clients also support additional customization tailored to their context.


Parameters

You can customize the behavior of the renderRequest action using the following parameters:

Parameter

Default

Description

Parameter

Default

Description

file

 

Saves the response output to a file.

encoding

 

Specifies the file encoding for the output file.

requestParameters

 

Adds request parameters to the URL for non-POST requests, or includes them as POST data. For example: field1=value1&field2=value2&field3=value3. You can also send JSON or other types of data as needed.

acceptType

type

Sets the HTTP Accept header. Use this if it differs from the type parameter.

type

HTML

Sets the content type for the request. You can use any valid type, or one of the following shortcuts: HTML, XML, JSON, URL_ENCODED, FORM_URL_ENCODED, MULTIPART_RELATED.

requestType

GET

Specifies the HTTP method to use, such as GET, POST, PUT, or DELETE.

request

 

Specifies a partial URL to append to the server URL. This parameter is required unless the client sets the URL using its own parameters.

findReplace

 

Processes the response using CLI findReplace support. Specify a comma-separated list of colon-separated text replacement pairs. Wrap values with single quotes if they contain delimiters.

findReplaceRegex

 

Works like findReplace, but uses regular expressions instead of plain text. Specify a comma-separated list of colon-separated regex replacement pairs. Use single quotes for values containing delimiters.


Client-specific parameters

Some clients offer additional parameters that let you simplify requests using project, issue, page, or plan references.

Jira

Parameter

Description

Parameter

Description

project

  • Validates the specified project. - Replaces @projectId@ in requestParameters. - If request is not provided, sets the URL to /browse/<project key>.

issue

  • Validates the specified issue. - If request is not provided, sets the URL to /browse/<issue key>.

Confluence

Parameter

Description

Parameter

Description

space

Ignored unless title is also provided.

title

  • Ignored unless space is provided. - Validates the page exists. - If request is not provided, sets the URL to /pages/viewpage.action?pageId=<contentId>. - If request is provided, replaces @contentId@ in requestParameters.


Example

Here’s an example of using renderRequest to fetch project details in Jira:

jira --action renderRequest --project TEST --requestParameters 'expand=description'

This command automatically resolves the correct URL for the TEST project and appends the query string expand=description.