public class RestValueService extends Object
| Modifier and Type | Method and Description |
|---|---|
static FormValidation |
doBasicValidation(String restEndpoint,
com.cloudbees.plugins.credentials.common.StandardCredentials credentials)
A basic validation method usable for configuration validation
|
static ResultContainer<List<String>> |
get(String restEndpoint,
com.cloudbees.plugins.credentials.common.StandardCredentials credentials,
MimeType mimeType,
Integer cacheTime,
String expression,
String filter,
ValueOrder order)
Returns a
ResultContainer capsuling a optional String error message and a list of parsed string values. |
public static ResultContainer<List<String>> get(String restEndpoint, com.cloudbees.plugins.credentials.common.StandardCredentials credentials, MimeType mimeType, Integer cacheTime, String expression, String filter, ValueOrder order)
ResultContainer capsuling a optional String error message and a list of parsed string values.
This method uses its parameters to query a REST/Web endpoint to receive a MimeType response, which then
gets parsed with a supported Path expression to extract a list of string values.
restEndpoint - A http/https web address to the REST/Web endpointcredentials - The credentials required to access said endpointmimeType - The MIME type of the expected REST/Web responsecacheTime - Time for how long the REST response gets cached for in minutesexpression - The Json-Path or xPath expression to filter the valuesfilter - additional regex filter on any parsed valuesorder - Set a ValueOrder to optionally reorder the valuesResultContainer that capsules either the desired values or a user friendly error message.public static FormValidation doBasicValidation(String restEndpoint, com.cloudbees.plugins.credentials.common.StandardCredentials credentials)
restEndpoint - A http/https web address to the REST/Web endpointcredentials - The credentials required to access said endpointFormValidation to be used in the Jenkins configuration UICopyright © 2020. All rights reserved.