patch (REST plugin)

Perform a PATCH method REST call against an endpoint.

If no body is returned, an empty string will be present in FDR_RESPONSE_STRING.

Environment/Instance Properties

Property Name

Property Code

Required

Description





Project Properties

Property Name

Property Code

Required

Description





Inputs

Input Name

Input Code

Required

Description

REST URLFDR_REQUEST_URLYes

URL to the desired REST Service

@since 5.5.0.3 this input supports FlexDeploy property replacement. i.e. you can use ${{PROP1}} in the input value.

Query StringFDR_QUERY_STRINGNo

Query String to be used. Use Groovy if desired to use FlexDeploy variables in the query string.

'a=b&c=d&e='+FD_TEMP_DIR+'&f=g'

or, if not using Groovy, simply

a=b&c=d

Spaces will not be trimmed from the string.

@since 5.3.0.1 The query string input also allows FlexDeploy property replacement to be used

UsernameFDR_USERNoThe username for authentication
PasswordFDR_PASSWORDNoThe password for authentication

Preemptive Authentication

FDR_PREEMPTIVE_AUTHNo

Use preemptive Basic authentication (provide authentication before being asked)

if false, non-preemptive Universal authentication is used.

Request Media TypeFDR_REQUEST_MEDIA_TYPENoThe media type to request from the server
Body Media TypeFDR_REQUEST_BODY_MEDIA_TYPEYesThe media type of the body
Body PathFDR_REQUEST_BODY_PATHNo*

The file path containing the request body.

*Either Body or Body Path must be supplied.

@since 5.5.0.3 this input supports FlexDeploy property replacement. i.e. you can use ${{PROP1}} in the input value.

BodyFDR_REQUEST_BODYNo*

The String to use as the request body.

*Either Body or Body Path must be supplied.

@since 5.5.0.3 this input supports FlexDeploy property replacement. i.e. you can use ${{PROP1}} in the input value.

Ignore SSL Errors

FDR_IGNORE_SSL_ERRORSNo If checked, SSL errors will be ignored. Otherwise they will cause the operation to fail.
Response ActionFDR_RESPONSE_ACTIONYes

What action should be taken upon completion of this request? Possible options are:

  • ReturnAsOutput - Save the response body and response code to the outputs described below
  • SaveToTemp - Save the response body to a response file in the temp directory. 
    • File name will be 'response.json', 'response.xml', or 'response.txt' depending on the response type.
  • SaveToArtifacts - Save the response body to a response file in the artifacts directory. Be sure to check 'produces artifacts' if intending to save the file to artifacts.
    • File name will be 'response.json', 'response.xml', or 'response.txt' depending on the response type.

@since 5.3.0.1

HeadersFDR_HEADERSNo

Headers to send with the request. Formatted as key=value. One key/value pair per line.  For example:

  • my-custom-header=abc123
  • x-client-secret=${{FD_CLIENT_SECRET}}

The headers input also allows FlexDeploy property replacement to be used as seen in the x-client-secret header above

@since 5.3.0.1

Validation ScriptFDR_VALIDATION_SCRIPTNo

Groovy validation script to be run against the response body. This input expects a groovy script as plain text, meaning you should not enable the groovy script flag on the plugin input itself. 

Available variables:

  • PAYLOAD - accessed as a Json object or a simple string if the return type is not Json
  • RESPONSE_CODE - integer response code

Example script:

PAYLOAD.myField && PAYLOAD.myField.equals('myValue')

@since 5.3.0.1

Validation ActionFDR_VALIDATION_ACTIONNo

What action should be taken if the Groovy Validation Script fails?  Valid options are:

  • JustLog - Simply log the failed result and continue as if successful.
  • GenerateTestResults - Generate a simple test results file. The results will not show up in the test results tab unless this is used in a test workflow
  • FailExecution - Throw an error and fail this plugin execution

@since 5.3.0.1

Connect TimeoutFDR_CONNECT_TIMEOUTNo

Time to wait to allow a connection to be established. Setting to 0 will wait forever.

@since 5.3.0.1

Read TimeoutFDR_READ_TIMEOUTNo

Time to wait for a response after establishing a connection. Setting to 0 will wait forever.

@since 5.3.0.1

Outputs

Output Name

Required

Description

FDR_RESPONSE_CODE

No

The Integer response code of from the REST response

FDR_RESPONSE_STRINGNoThe first Response Entity is returned as a String.

Artifacts

This operation doesn’t consume or produce any artifacts.

Endpoint Selection

This operation will select all available endpoints associated to the Environment/Instance.

Endpoint Execution

This operation will execute on any one of the selected endpoints and will be random in the determination of which one.

The following macros are not currently supported in the footer:
  • style