\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Bibin Gokuldas (bibingokuldas)} \pdfinfo{ /Title (servicenow-rest-cheat-sheet.pdf) /Creator (Cheatography) /Author (Bibin Gokuldas (bibingokuldas)) /Subject (ServiceNow REST - Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{CF0000} \definecolor{LightBackground}{HTML}{FCEFEF} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{ServiceNow REST - Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Bibin Gokuldas (bibingokuldas)} via \textcolor{DarkBackground}{\uline{cheatography.com/69673/cs/17659/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Bibin Gokuldas (bibingokuldas) \\ \uline{cheatography.com/bibingokuldas} \\ \uline{\seqsplit{bibingokuldas}.com/} \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 29th October, 2018.\\ Updated 20th November, 2018.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{2} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{REST API Basics}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{8.4cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/bibingokuldas_1540808652_RESTAPI-Basics.jpg}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.56 cm} x{5.44 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Scripted REST APIs}} \tn % Row 0 \SetRowColor{LightBackground} API URIs & \textasciicircum{}This part the for the scripted rest has to define name\_space, api\_id, resource\_path, version\textasciicircum{} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} API Query Parameter & \textasciicircum{}When defining a scripted resource, which parameter is mandatory for the request can also be defined\textasciicircum{} \tn % Row Count 8 (+ 4) % Row 2 \SetRowColor{LightBackground} API Error Objects* & \textasciicircum{}Scripted REST APIs provide multiple ways to send an error in a response to a requesting client.\textasciicircum{} \tn % Row Count 12 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{\textasciicircum{}*Multiple error objects are available in scripted REST API scripts to report error information to requesting clients.All scripted REST API error objects use the sn\_ws\_err namespace.\textasciicircum{} \newline \textasciicircum{}Error objects available are 400,404,406,409,415\textasciicircum{}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{REST API Best Practices}} \tn % Row 0 \SetRowColor{LightBackground} Follow REST API Conventions & \textasciicircum{}REST API conventions define specific behaviour for each type of method. For ex : {\emph{GET}} : to Query the data, {\emph{POST}} : to create Data,{\emph{PUT and PATCH}} : to Update data, {\emph{DELETE}} : to delete records.\textasciicircum{} \tn % Row Count 10 (+ 10) % Row 1 \SetRowColor{white} Use Versioning to control changes to API & \textasciicircum{}Use versioning to implement new functionalities, so that the existing functionalities will not impact\textasciicircum{} \tn % Row Count 16 (+ 6) % Row 2 \SetRowColor{LightBackground} Return an Informative HTTP Status code & \textasciicircum{}Return a status code, which inform the requestor about the success and failures(defined in the response codes section)\textasciicircum{} \tn % Row Count 22 (+ 6) % Row 3 \SetRowColor{white} Return useful error information & \textasciicircum{}Provide the requestor with enough information of why the failure occurred. Error message is a mix of error message and error code\textasciicircum{} \tn % Row Count 29 (+ 7) % Row 4 \SetRowColor{LightBackground} Enforce and test Access Controls & \textasciicircum{}Enforce existing access controls and require additional access to modify the data. Use the GlideRecordSecure* API in scripted RESI services\textasciicircum{} \tn % Row Count 37 (+ 8) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{REST API Best Practices (cont)}} \tn % Row 5 \SetRowColor{LightBackground} Build Tests to verify functionality & \textasciicircum{}Tests should validate the response code, headers, and body content as appropriate for each resource you implement. You can also use tests to validate authentication requirements, and to confirm that errors return useful responses.\textasciicircum{} \tn % Row Count 12 (+ 12) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{\textasciicircum{}*GlideRecordSecure API Ensure that the ACLs are defined on the underlying data are applied to the requested user.\textasciicircum{}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{REST Security}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{How is REST API Secure?} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\textasciicircum{}The REST API uses basic authentication or OAuth to enforce access controls to web resources. ACLs are defined on tables to restrict the data viewership.\textasciicircum{}} \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Will all tables be available for the REST API Access?} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\textasciicircum{}By default, Yes. All tables including system tables, and scoped tables are available.\textasciicircum{}} \tn % Row Count 9 (+ 4) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{How can I restrict a table Access through web services?} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\textasciicircum{}In the table properties, uncheck the option for Allow access to this table via web services.\textasciicircum{}} \tn % Row Count 13 (+ 4) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Does REST API support CORS?} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\textasciicircum{}Cross Origin Resource Security is supported.\textasciicircum{}} \tn % Row Count 15 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{How can I Define CORS Rules?} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\textasciicircum{}CORS Rules can be defined in sys\_cors\_rule. Which allows to specify a domain and Selection of methods to expose.\textasciicircum{}} \tn % Row Count 19 (+ 4) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{How to disable CORS Support for Instance?} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\textasciicircum{}CORS support on instance is defined by glide.rest.cors.enabled set it to false for No CORS\textasciicircum{}} \tn % Row Count 22 (+ 3) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Can I use OAuth with REST?} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\textasciicircum{}Yes, use OAuth token for REST Requests\textasciicircum{}} \tn % Row Count 24 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Can I use MFA with REST?} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\textasciicircum{}Yes again, with a REST Request, if MFA is enabled then append token to end of users password ex:userid:passwrdtoken. Encode using base64 encoding\textasciicircum{}} \tn % Row Count 29 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.216 cm} x{3.192 cm} x{3.192 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Building Blocks REST API}} \tn % Row 0 \SetRowColor{LightBackground} API & \textasciicircum{}API allows to select a specific Application Programming interface, which is available in SNOW\textasciicircum{} & \textasciicircum{}Ex TableAPI,AggregateAPI\textasciicircum{} \tn % Row Count 6 (+ 6) % Row 1 \SetRowColor{white} \seqsplit{Namespace} & \textasciicircum{}REST APIs provided by ServiceNow has {\bf{now}} namespace\textasciicircum{} & \textasciicircum{}Scripted REST may use a different one\textasciicircum{} \tn % Row Count 10 (+ 4) % Row 2 \SetRowColor{LightBackground} \seqsplit{Method} & \textasciicircum{}REST enables the use of few methods like {\bf{GET}},{\bf{POST}},{\bf{DELETE}},{\bf{PATCH}}\textasciicircum{} & \textasciicircum{}Not all the APIs available from ServiceNow would have all the methods available\textasciicircum{} \tn % Row Count 16 (+ 6) % Row 3 \SetRowColor{white} \seqsplit{Request} \seqsplit{Header} & \textasciicircum{}Allows to specify a header for the Integration\textasciicircum{} & \textasciicircum{}Can add Custom header as per requirement\textasciicircum{} \tn % Row Count 19 (+ 3) % Row 4 \SetRowColor{LightBackground} Query \seqsplit{parameter} & \textasciicircum{}Allows to specify an encoded query for the REST Call\textasciicircum{} & \textasciicircum{}Can add more query parameters or even a sys\_id for some methods\textasciicircum{} \tn % Row Count 24 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{\textasciicircum{}You can prepare the sample request using the REST API Explorer in ServiceNow.\textasciicircum{} \newline \textasciicircum{}ServiceNow REST URI looks like this \textless{}LINKFORSNOW\textgreater{}/api/now/apiname/. For ex : if we are using a table API for POST then the link look something like below : POST \textless{}LINKOFServiceNow\textgreater{}/api/now/table/tablename\textasciicircum{}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{REST API Rate Limit}} \tn \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{\textasciicircum{}To prevent excessive inbound REST API requests, set rules that limit the number of inbound REST API requests processed per hour.\textasciicircum{} \newline % Row Count 3 (+ 3) \textasciicircum{}There is an option to create Rate Limit for users with specific roles, or for all users. The table for creating rate limit is {\bf{sys\_rate\_limit\_rules}}.\textasciicircum{} \newline % Row Count 7 (+ 4) \textasciicircum{}In the basic Response Header, the Rate limit would be specified for ex : x-RateLimit-Limit -{}-\textgreater{}10\textasciicircum{}% Row Count 9 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.16 cm} x{5.84 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{REST API Headers}} \tn % Row 0 \SetRowColor{LightBackground} Accept & application/json, application/xml \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{Content-Type} & pplication/json, application/xml \tn % Row Count 4 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{\textasciicircum{}By design, POST, PUT, PATCH, and DELETE operations required to provide both headers.\textasciicircum{} \newline \textasciicircum{}GET operations require only the Accept header.\textasciicircum{} \newline \textasciicircum{}There is an option override the HTTP method, such as GET or POST, by setting the X-http-method-override header.\textasciicircum{}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{p{0.72 cm} x{1.512 cm} x{2.232 cm} x{2.736 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{8.4cm}}{\bf\textcolor{white}{REST API Response Codes}} \tn % Row 0 \SetRowColor{LightBackground} 200 & Success & \textasciicircum{}Success with Response Body\textasciicircum{} & \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} 201 & Created & \textasciicircum{}Success with Response Body\textasciicircum{} & \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} 204 & Success & \textasciicircum{}Success with Response Body\textasciicircum{} & \tn % Row Count 9 (+ 3) % Row 3 \SetRowColor{white} 400 & Bad Request & \textasciicircum{}The Request URI can't match the API.\textasciicircum{} & \textasciicircum{}Invalid headers, or API incorrect\textasciicircum{} \tn % Row Count 13 (+ 4) % Row 4 \SetRowColor{LightBackground} 401 & \seqsplit{Unauthorized} & \textasciicircum{}The User is not authorized to use API\textasciicircum{} & \tn % Row Count 17 (+ 4) % Row 5 \SetRowColor{white} 403 & \seqsplit{Forbidden} & \textasciicircum{}The Operation requested is not permitted for the user\textasciicircum{} & \textasciicircum{}ACL constraint on table, Business Rule or data policies\textasciicircum{} \tn % Row Count 22 (+ 5) % Row 6 \SetRowColor{LightBackground} 404 & Not Found & \textasciicircum{}The requested resource is not found\textasciicircum{} & \textasciicircum{}ACL constraint or resource not available\textasciicircum{} \tn % Row Count 26 (+ 4) % Row 7 \SetRowColor{white} 405 & Method not allowed & \textasciicircum{}The HTTP action is not allowed or not supported by the API\textasciicircum{} & \tn % Row Count 31 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{p{0.72 cm} x{1.512 cm} x{2.232 cm} x{2.736 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{8.4cm}}{\bf\textcolor{white}{REST API Response Codes (cont)}} \tn % Row 8 \SetRowColor{LightBackground} 406 & Not \seqsplit{acceptable} & \textasciicircum{}The endpoint doesn't support the response format\textasciicircum{} & \textasciicircum{}Response format in the Request Accept Header\textasciicircum{} \tn % Row Count 5 (+ 5) % Row 9 \SetRowColor{white} 415 & \seqsplit{Unsupported} media type & \textasciicircum{}The endpoint does not support the format of the request body.\textasciicircum{} & \tn % Row Count 11 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{RESTMessageV2}} \tn % Row 0 \SetRowColor{LightBackground} execute() & \textasciicircum{}Sends the REST message to Endpoint\textasciicircum{} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} executeAsync() & \textasciicircum{}Sends the REST message asynchronously, that means the instance doesn't wait for a response from provider\textasciicircum{} \tn % Row Count 8 (+ 6) % Row 2 \SetRowColor{LightBackground} getEndpoint() & \textasciicircum{}Get the URL of the endpoint for the REST message.\textasciicircum{} \tn % Row Count 11 (+ 3) % Row 3 \SetRowColor{white} getRequestBody() & \textasciicircum{}Get the content of the REST message body.\textasciicircum{} \tn % Row Count 14 (+ 3) % Row 4 \SetRowColor{LightBackground} getRequestHeader(\textless{}headername\textgreater{})* & \textasciicircum{}Get the value for an HTTP header specified in the REST message.\textasciicircum{} \tn % Row Count 18 (+ 4) % Row 5 \SetRowColor{white} getRequestHeaders() & \textasciicircum{}Get HTTP headers that were set by the REST client and the associated values.\textasciicircum{} \tn % Row Count 22 (+ 4) % Row 6 \SetRowColor{LightBackground} \seqsplit{saveResponseBodyAsAttachment(tblname},recordid,filename)** & \textasciicircum{}Configures the REST message to save the returned response body as an attachment record.\textasciicircum{} \tn % Row Count 27 (+ 5) % Row 7 \SetRowColor{white} \seqsplit{saveResponseBodyAsAttachment(tblname},recordid,filename,encryptcontext){\emph{*}} & \textasciicircum{}Configure the REST message to save the returned response body as an encrypted attachment record.\textasciicircum{} \tn % Row Count 32 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{RESTMessageV2 (cont)}} \tn % Row 8 \SetRowColor{LightBackground} \seqsplit{setAuthenticationProfile(type},profileid){\emph{*}}* & \textasciicircum{}Set the credentials for the REST message using an existing basic auth or OAuth 2.0 profile.\textasciicircum{} \tn % Row Count 5 (+ 5) % Row 9 \SetRowColor{white} \seqsplit{setBasicAuth(username},password) & \textasciicircum{}Sets basic authentication headers for the REST message.\textasciicircum{} \tn % Row Count 8 (+ 3) % Row 10 \SetRowColor{LightBackground} \seqsplit{setEccCorrelator(correlator)} & \textasciicircum{}Associate outbound requests and the resulting response record in the ECC queue. This method only applies to REST messages sent through a MID Server.\textasciicircum{} \tn % Row Count 16 (+ 8) % Row 11 \SetRowColor{white} \seqsplit{setEccParameter(name},value) & \textasciicircum{}Override a value from the database by writing to the REST message payload. This method only applies to REST messages sent through a MID Server.\textasciicircum{} \tn % Row Count 24 (+ 8) % Row 12 \SetRowColor{LightBackground} \seqsplit{setEndpoint(endpoint)} & \textasciicircum{}Set the endpoint for the REST message.\textasciicircum{} \tn % Row Count 26 (+ 2) % Row 13 \SetRowColor{white} \seqsplit{setHttpMethod(method)} & \textasciicircum{}The HTTP method this REST message performs, such as GET or PUT.\textasciicircum{} \tn % Row Count 30 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{RESTMessageV2 (cont)}} \tn % Row 14 \SetRowColor{LightBackground} \seqsplit{setHttpTimeout(milliseconds)} & \textasciicircum{}Set the amount of time the REST message waits for a response from the web service provider before the request times out.\textasciicircum{} \tn % Row Count 7 (+ 7) % Row 15 \SetRowColor{white} setLogLevel(level) & \textasciicircum{}Set the log level for this message and the corresponding response.Valid values for level are basic, elevated, and all.\textasciicircum{} \tn % Row Count 13 (+ 6) % Row 16 \SetRowColor{LightBackground} \seqsplit{setMIDServer(midserver)} & \textasciicircum{}The name of the MID Server to use. Your instance must have an active MID Server with the specified name.\textasciicircum{} \tn % Row Count 19 (+ 6) % Row 17 \SetRowColor{white} \seqsplit{setMutualAuth(profilename)} & \textasciicircum{}Set the mutual authentication protocol profile for the REST message.\textasciicircum{} \tn % Row Count 23 (+ 4) % Row 18 \SetRowColor{LightBackground} \seqsplit{setQueryParameter(name}, value) & \textasciicircum{}Append a parameter to the end of the request URL with the form name=value.\textasciicircum{} \tn % Row Count 27 (+ 4) % Row 19 \SetRowColor{white} \seqsplit{setRequestBody(body)} & \textasciicircum{}Set the body content to send to the web service provider when using PUT or POST HTTP methods.\textasciicircum{} \tn % Row Count 32 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{RESTMessageV2 (cont)}} \tn % Row 20 \SetRowColor{LightBackground} \seqsplit{setRequestBodyFromAttachment(attachmentsysid)} & \textasciicircum{}Sets the request body using an existing attachment record.\textasciicircum{} \tn % Row Count 3 (+ 3) % Row 21 \SetRowColor{white} \seqsplit{setRequestHeader(name},value); & \textasciicircum{}Set an HTTP header in the REST message to the specified value.\textasciicircum{} \tn % Row Count 7 (+ 4) % Row 22 \SetRowColor{LightBackground} \seqsplit{setRequestorProfile(requestorcontext},requestorid) & \textasciicircum{}Override the default requestor profile for the REST message in order to retrieve an OAuth access token associated with a different requestor.\textasciicircum{} \tn % Row Count 15 (+ 8) % Row 23 \SetRowColor{white} \seqsplit{setStringParameter(name},value) & \textasciicircum{}Set a REST message function variable with the specified name from the REST message record to the specified value.\textasciicircum{} \tn % Row Count 21 (+ 6) % Row 24 \SetRowColor{LightBackground} \seqsplit{setStringParameterNoEscape(name},value) & \textasciicircum{}XML reserved characters in the value are converted to the equivalent escaped characters.\textasciicircum{} \tn % Row Count 26 (+ 5) % Row 25 \SetRowColor{white} \seqsplit{waitForResponse(seconds)} & \textasciicircum{}In seconds. Wait at most 60 seconds to get response from ECC Queue/Mid Server.\textasciicircum{} \tn % Row Count 30 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{\textasciicircum{}{\emph{By design, this method cannot return the value for a header set automatically by the system. To grant this method access to all headers, set the property glide.http.log\_debug to true.\textasciicircum{} \newline \textasciicircum{}{\bf{the input parameters for this functions are string, and recordId is the sysid of the record\textasciicircum{} \newline \textasciicircum{}}}}}encryptcontext should specify the sysid of the encryption context\textasciicircum{}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}