Class RestServiceConstants
java.lang.Object
com.bonitasoft.processbuilder.extension.RestServiceConstants
Constants for REST service execution.
This class contains common constants used when making REST API calls, including default headers, timeouts, and JSON field names.
- Since:
- 1.0
- Author:
- Bonitasoft
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringForm URL encoded content type.static final StringJSON content type.static final StringJSON content type with UTF-8 charset.static final StringPlain text content type.static final StringXML content type.static final intDefault connection timeout in milliseconds (10 seconds).Default headers for JSON requests.static final intDefault read timeout in milliseconds (30 seconds).static final StringDefault User-Agent value.Default headers for XML requests.static final StringAccept header name.static final StringAuthorization header name.static final StringContent-Type header name.static final StringX-Correlation-ID header name for distributed tracing.static final StringX-Request-ID header name for request tracing.static final StringUser-Agent header name.static final intHTTP 502 Bad Gateway.static final intHTTP 400 Bad Request.static final intHTTP 201 Created.static final intHTTP 403 Forbidden.static final intHTTP 500 Internal Server Error.static final intHTTP 204 No Content.static final intHTTP 404 Not Found.static final intHTTP 200 OK.static final intHTTP 503 Service Unavailable.static final intHTTP 401 Unauthorized.static final StringJSON field name for OAuth2 audience.static final StringJSON field name for authentication configuration.static final StringJSON field name for authentication type.static final StringJSON field name for request/response body.static final StringJSON field name for OAuth2 client ID.static final StringJSON field name for OAuth2 client secret.static final StringJSON field name for content type.static final StringJSON field name for error message.static final StringJSON field name for execution time.static final StringJSON field name for follow redirects flag.static final StringJSON field name for headers.static final StringJSON field name for API key name.static final StringJSON field name for API key value.static final StringJSON field name for API key location.static final StringJSON field name for HTTP method.static final StringJSON field name for password.static final StringJSON field name for query parameters.static final StringJSON field name for OAuth2 scope.static final StringJSON field name for status code.static final StringJSON field name for timeout.static final StringJSON field name for token.static final StringJSON field name for OAuth2 token URL.static final StringJSON field name for URL.static final StringJSON field name for username.static final StringJSON field name for verify SSL flag.static final intMaximum timeout allowed in milliseconds (5 minutes).static final intMinimum timeout allowed in milliseconds (1 second).static final StringOAuth2 access token field name in response.static final StringOAuth2 expires in field name in response (seconds).static final StringOAuth2 grant type for client credentials.static final StringOAuth2 grant type for password.static final StringOAuth2 grant type for refresh token.static final StringOAuth2 refresh token field name in response.static final StringOAuth2 scope field name in response.static final StringOAuth2 token type field name in response. -
Method Summary
-
Field Details
-
DEFAULT_CONNECT_TIMEOUT_MS
public static final int DEFAULT_CONNECT_TIMEOUT_MSDefault connection timeout in milliseconds (10 seconds).- See Also:
-
DEFAULT_READ_TIMEOUT_MS
public static final int DEFAULT_READ_TIMEOUT_MSDefault read timeout in milliseconds (30 seconds).- See Also:
-
MAX_TIMEOUT_MS
public static final int MAX_TIMEOUT_MSMaximum timeout allowed in milliseconds (5 minutes).- See Also:
-
MIN_TIMEOUT_MS
public static final int MIN_TIMEOUT_MSMinimum timeout allowed in milliseconds (1 second).- See Also:
-
HEADER_ACCEPT
Accept header name.- See Also:
-
HEADER_CONTENT_TYPE
Content-Type header name.- See Also:
-
HEADER_AUTHORIZATION
Authorization header name.- See Also:
-
HEADER_USER_AGENT
User-Agent header name.- See Also:
-
HEADER_REQUEST_ID
X-Request-ID header name for request tracing.- See Also:
-
HEADER_CORRELATION_ID
X-Correlation-ID header name for distributed tracing.- See Also:
-
DEFAULT_USER_AGENT
Default User-Agent value.- See Also:
-
CONTENT_TYPE_JSON
JSON content type.- See Also:
-
CONTENT_TYPE_JSON_UTF8
JSON content type with UTF-8 charset.- See Also:
-
CONTENT_TYPE_XML
XML content type.- See Also:
-
CONTENT_TYPE_FORM
Form URL encoded content type.- See Also:
-
CONTENT_TYPE_TEXT
Plain text content type.- See Also:
-
OAUTH2_GRANT_CLIENT_CREDENTIALS
OAuth2 grant type for client credentials.- See Also:
-
OAUTH2_GRANT_PASSWORD
OAuth2 grant type for password.- See Also:
-
OAUTH2_GRANT_REFRESH_TOKEN
OAuth2 grant type for refresh token.- See Also:
-
OAUTH2_ACCESS_TOKEN
OAuth2 access token field name in response.- See Also:
-
OAUTH2_TOKEN_TYPE
OAuth2 token type field name in response.- See Also:
-
OAUTH2_EXPIRES_IN
OAuth2 expires in field name in response (seconds).- See Also:
-
OAUTH2_REFRESH_TOKEN
OAuth2 refresh token field name in response.- See Also:
-
OAUTH2_SCOPE
OAuth2 scope field name in response.- See Also:
-
JSON_URL
JSON field name for URL.- See Also:
-
JSON_METHOD
JSON field name for HTTP method.- See Also:
-
JSON_HEADERS
JSON field name for headers.- See Also:
-
JSON_QUERY_PARAMS
JSON field name for query parameters.- See Also:
-
JSON_BODY
JSON field name for request/response body.- See Also:
-
JSON_CONTENT_TYPE
JSON field name for content type.- See Also:
-
JSON_AUTH
JSON field name for authentication configuration.- See Also:
-
JSON_AUTH_TYPE
JSON field name for authentication type.- See Also:
-
JSON_TIMEOUT_MS
JSON field name for timeout.- See Also:
-
JSON_FOLLOW_REDIRECTS
JSON field name for follow redirects flag.- See Also:
-
JSON_VERIFY_SSL
JSON field name for verify SSL flag.- See Also:
-
JSON_STATUS_CODE
JSON field name for status code.- See Also:
-
JSON_ERROR_MESSAGE
JSON field name for error message.- See Also:
-
JSON_EXECUTION_TIME_MS
JSON field name for execution time.- See Also:
-
JSON_USERNAME
JSON field name for username.- See Also:
-
JSON_PASSWORD
JSON field name for password.- See Also:
-
JSON_TOKEN
JSON field name for token.- See Also:
-
JSON_KEY_NAME
JSON field name for API key name.- See Also:
-
JSON_KEY_VALUE
JSON field name for API key value.- See Also:
-
JSON_LOCATION
JSON field name for API key location.- See Also:
-
JSON_TOKEN_URL
JSON field name for OAuth2 token URL.- See Also:
-
JSON_CLIENT_ID
JSON field name for OAuth2 client ID.- See Also:
-
JSON_CLIENT_SECRET
JSON field name for OAuth2 client secret.- See Also:
-
JSON_SCOPE
JSON field name for OAuth2 scope.- See Also:
-
JSON_AUDIENCE
JSON field name for OAuth2 audience.- See Also:
-
HTTP_OK
public static final int HTTP_OKHTTP 200 OK.- See Also:
-
HTTP_CREATED
public static final int HTTP_CREATEDHTTP 201 Created.- See Also:
-
HTTP_NO_CONTENT
public static final int HTTP_NO_CONTENTHTTP 204 No Content.- See Also:
-
HTTP_BAD_REQUEST
public static final int HTTP_BAD_REQUESTHTTP 400 Bad Request.- See Also:
-
HTTP_UNAUTHORIZED
public static final int HTTP_UNAUTHORIZEDHTTP 401 Unauthorized.- See Also:
-
HTTP_FORBIDDEN
public static final int HTTP_FORBIDDENHTTP 403 Forbidden.- See Also:
-
HTTP_NOT_FOUND
public static final int HTTP_NOT_FOUNDHTTP 404 Not Found.- See Also:
-
HTTP_INTERNAL_ERROR
public static final int HTTP_INTERNAL_ERRORHTTP 500 Internal Server Error.- See Also:
-
HTTP_BAD_GATEWAY
public static final int HTTP_BAD_GATEWAYHTTP 502 Bad Gateway.- See Also:
-
HTTP_SERVICE_UNAVAILABLE
public static final int HTTP_SERVICE_UNAVAILABLEHTTP 503 Service Unavailable.- See Also:
-
DEFAULT_JSON_HEADERS
Default headers for JSON requests. -
DEFAULT_XML_HEADERS
Default headers for XML requests.
-