├── .github
└── FUNDING.yml
├── .gitignore
├── .vs
├── API_Consumer
│ └── v15
│ │ ├── .suo
│ │ └── Server
│ │ └── sqlite3
│ │ ├── db.lock
│ │ └── storage.ide
├── SQL-APIConsumer
│ ├── v15
│ │ ├── .suo
│ │ └── Server
│ │ │ └── sqlite3
│ │ │ ├── storage.ide
│ │ │ ├── storage.ide-shm
│ │ │ └── storage.ide-wal
│ └── v16
│ │ ├── .suo
│ │ └── Server
│ │ └── sqlite3
│ │ ├── db.lock
│ │ └── storage.ide
└── slnx.sqlite
├── APICaller_GET ResultSet.png
├── APICaller_GET_headers ResultSet.png
├── API_Consumer
├── API_Consumer.dbmdl
├── API_Consumer.jfm
├── Consumers
│ ├── APIConsumer.cs
│ └── Helper.cs
├── DTO
│ ├── BankInfoBasic.cs
│ ├── BankInfoDetail.cs
│ ├── ExtendedResult.cs
│ └── Header.cs
├── Key.pfx
├── Procedures
│ ├── APICallerGeneric.cs
│ ├── APICaller_GET.cs
│ ├── APICaller_POST.cs
│ ├── GET_BankInfoBasicByRN.cs
│ └── UtilFunctions.cs
├── Properties
│ └── AssemblyInfo.cs
├── SQL-APIConsumer.sqlproj
├── SQL-APIConsumer.sqlproj.user
├── bin
│ └── Debug
│ │ ├── API_Consumer.dacpac
│ │ ├── API_Consumer.dll
│ │ ├── API_Consumer.pdb
│ │ ├── API_Consumer.publish.sql
│ │ ├── API_Consumer_1.publish.sql
│ │ ├── API_Consumer_2.publish.sql
│ │ ├── API_Consumer_3.publish.sql
│ │ ├── DeploymentReport.txt
│ │ ├── DeploymentReport_1.txt
│ │ ├── DeploymentReport_2.txt
│ │ ├── DeploymentReport_3.txt
│ │ ├── Newtonsoft.Json.dll
│ │ ├── SQL-APIConsumer.dacpac
│ │ ├── System.Net.Http.dll
│ │ ├── System.Net.Http.xml
│ │ └── es
│ │ └── System.Net.Http.resources.dll
├── dll
│ ├── APIConsumer.dll
│ ├── Newtonsoft.Json.dll
│ └── System.Net.Http.dll
└── obj
│ └── Debug
│ ├── API_CONSUMER.generated.sql
│ ├── API_Consumer.dll
│ ├── API_Consumer.pdb
│ ├── API_Consumer.sqlproj.CopyComplete
│ ├── API_Consumer.sqlproj.FileListAbsolute.txt
│ ├── API_Consumer.sqlprojResolveAssemblyReference.cache
│ ├── SQL-APIConsumer.sqlproj.CopyComplete
│ └── SQL-APIConsumer.sqlproj.FileListAbsolute.txt
├── Diagram.png
├── LICENSE
├── README.md
├── SQL-APIConsumer.sln
├── _config.yml
└── images
├── POST_Extended_Result.png
├── POST_Extended_query.png
├── Web_GET_Extended_Query.png
└── Web_GET_Extended_Result.png
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 | custom: ["paypal.me/gerar2diaz"]
3 | ko_fi: geraldodiaz
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # This .gitignore file was automatically created by Microsoft(R) Visual Studio.
3 | ################################################################################
4 |
5 | /.vs/SQL-APIConsumer/v15/Server/sqlite3/db.lock
6 | /API_Consumer/SQL-APIConsumer.dbmdl
7 | /API_Consumer/SQL-APIConsumer.jfm
8 | /API_Consumer/bin/Debug/SQL-APIConsumer_1.publish.sql
9 | /API_Consumer/bin/Debug/SQL-APIConsumer_2.publish.sql
10 | /API_Consumer/bin/Debug/SQL-APIConsumer.publish.sql
11 | /API_Consumer/bin/Debug/DeploymentReport_6.txt
12 | /API_Consumer/bin/Debug/DeploymentReport_4.txt
13 | /API_Consumer/bin/Debug/DeploymentReport_5.txt
14 | /API_Consumer/dll/
15 | /API_Consumer/debug/
16 | /API_Consumer/bin/
17 | /API_Consumer/obj/
18 |
--------------------------------------------------------------------------------
/.vs/API_Consumer/v15/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/.vs/API_Consumer/v15/.suo
--------------------------------------------------------------------------------
/.vs/API_Consumer/v15/Server/sqlite3/db.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/.vs/API_Consumer/v15/Server/sqlite3/db.lock
--------------------------------------------------------------------------------
/.vs/API_Consumer/v15/Server/sqlite3/storage.ide:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/.vs/API_Consumer/v15/Server/sqlite3/storage.ide
--------------------------------------------------------------------------------
/.vs/SQL-APIConsumer/v15/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/.vs/SQL-APIConsumer/v15/.suo
--------------------------------------------------------------------------------
/.vs/SQL-APIConsumer/v15/Server/sqlite3/storage.ide:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/.vs/SQL-APIConsumer/v15/Server/sqlite3/storage.ide
--------------------------------------------------------------------------------
/.vs/SQL-APIConsumer/v15/Server/sqlite3/storage.ide-shm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/.vs/SQL-APIConsumer/v15/Server/sqlite3/storage.ide-shm
--------------------------------------------------------------------------------
/.vs/SQL-APIConsumer/v15/Server/sqlite3/storage.ide-wal:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/.vs/SQL-APIConsumer/v15/Server/sqlite3/storage.ide-wal
--------------------------------------------------------------------------------
/.vs/SQL-APIConsumer/v16/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/.vs/SQL-APIConsumer/v16/.suo
--------------------------------------------------------------------------------
/.vs/SQL-APIConsumer/v16/Server/sqlite3/db.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/.vs/SQL-APIConsumer/v16/Server/sqlite3/db.lock
--------------------------------------------------------------------------------
/.vs/SQL-APIConsumer/v16/Server/sqlite3/storage.ide:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/.vs/SQL-APIConsumer/v16/Server/sqlite3/storage.ide
--------------------------------------------------------------------------------
/.vs/slnx.sqlite:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/.vs/slnx.sqlite
--------------------------------------------------------------------------------
/APICaller_GET ResultSet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/APICaller_GET ResultSet.png
--------------------------------------------------------------------------------
/APICaller_GET_headers ResultSet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/APICaller_GET_headers ResultSet.png
--------------------------------------------------------------------------------
/API_Consumer/API_Consumer.dbmdl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/API_Consumer.dbmdl
--------------------------------------------------------------------------------
/API_Consumer/API_Consumer.jfm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/API_Consumer.jfm
--------------------------------------------------------------------------------
/API_Consumer/Consumers/APIConsumer.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.IO;
5 | using System.Net;
6 | using System.Runtime.Serialization;
7 | using API_Consumer;
8 |
9 | namespace SQLAPI_Consumer
10 | {
11 | ///
12 | /// This class will be used for consume API using the URL provided.
13 | /// Actually only GET & POST Method are supported.
14 | ///
15 | public static class APIConsumer
16 | {
17 | ///
18 | /// Fixed Context type supported.
19 | ///
20 | private const string CONTENTTYPE = "application/json; charset=utf-8";
21 |
22 | ///
23 | /// Fixed Context type supported.
24 | ///
25 | private const string CONTENTTYPE_URLENCODED = "application/x-www-form-urlencoded";
26 |
27 | ///
28 | /// Header Content-Type needed in generic calls.
29 | ///
30 | private const string Header_ContentType= "Content-Type";
31 |
32 |
33 | ///
34 | /// Fixed string for POST method
35 | ///
36 | private const string POST_WebMethod = "POST";
37 |
38 | ///
39 | /// Fixed string for GET method
40 | ///
41 | private const string GET_WebMethod = "GET";
42 |
43 | ///
44 | /// DEFAULT_EXECUTION_RESULT
45 | ///
46 | public const int DEFAULT_EXECUTION_RESULT = 0;
47 |
48 | ///
49 | /// FAILED_EXECUTION_RESULT
50 | ///
51 | public const int FAILED_EXECUTION_RESULT = -1;
52 |
53 | ///
54 | /// DEFAULT_COLUMN_RESULT
55 | ///
56 | public const string DEFAULT_COLUMN_RESULT = "Result";
57 |
58 | ///
59 | /// DEFAULT_COLUMN_RESULT
60 | ///
61 | public const string DEFAULT_COLUMN_ERROR = "Error";
62 |
63 | private enum ParamsName { webMethod , URL }
64 |
65 | ///
66 | /// POST to Resful API sending Json body.
67 | ///
68 | /// API URL
69 | /// Content Application By Default Json
70 | /// Header Authorization token, user-passwrod, JWT, etc.
71 | /// String Api result
72 | public static string POSTMethod(string url, string JsonBody, string Authorization = "")
73 | {
74 | string ContentResult = string.Empty;
75 | try
76 | {
77 | ServicePointManager.Expect100Continue = true;
78 | ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
79 | | SecurityProtocolType.Ssl3;
80 |
81 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
82 | request.ContentType = CONTENTTYPE;
83 | request.Method = POST_WebMethod;
84 |
85 | if (!String.IsNullOrEmpty(Authorization))
86 | request.Headers.Add(HttpRequestHeader.Authorization, Authorization);
87 |
88 | if (!String.IsNullOrEmpty(JsonBody))
89 | {
90 | using (var streamWriter = new StreamWriter(request.GetRequestStream()))
91 | {
92 | streamWriter.Write(JsonBody);
93 | streamWriter.Flush();
94 | }
95 | }
96 |
97 | var httpResponse = (HttpWebResponse)request.GetResponse();
98 | using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
99 | {
100 | var result = streamReader.ReadToEnd();
101 | ContentResult = result;
102 | }
103 | }
104 | catch (WebException ex)
105 | {
106 | using (var stream = ex.Response.GetResponseStream())
107 | using (var reader = new StreamReader(stream))
108 | {
109 | var result = reader.ReadToEnd();
110 | ContentResult = result;
111 | }
112 | }
113 | catch (Exception ex)
114 | {
115 | ContentResult = ex.Message.ToString();
116 | throw ex;
117 | }
118 |
119 | return ContentResult;
120 | }
121 |
122 |
123 | ///
124 | /// POST to Resful API sending Json body.
125 | ///
126 | /// API URL
127 | /// Content Application By Default Json
128 | /// String Api result
129 | public static string POSTMethod(string url, string JsonBody)
130 | {
131 | string ContentResult = string.Empty ;
132 | try
133 | {
134 | SetSSL();
135 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
136 | request.ContentType = CONTENTTYPE;
137 | request.Method = POST_WebMethod;
138 |
139 | if (!String.IsNullOrEmpty(JsonBody))
140 | {
141 | using (var streamWriter = new StreamWriter(request.GetRequestStream()))
142 | {
143 | streamWriter.Write(JsonBody);
144 | streamWriter.Flush();
145 | }
146 | }
147 |
148 | var httpResponse = (HttpWebResponse)request.GetResponse();
149 | using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
150 | {
151 | var result = streamReader?.ReadToEnd();
152 | ContentResult = result;
153 | }
154 | }
155 | catch (WebException ex)
156 | {
157 | using (var stream = ex.Response?.GetResponseStream())
158 | {
159 | if (stream != null)
160 | {
161 | using (var reader = new StreamReader(stream))
162 | {
163 | var result = reader.ReadToEnd();
164 | ContentResult = result;
165 | }
166 | }
167 | else
168 | {
169 | ContentResult = ex.Message.ToString();
170 | }
171 | }
172 | }
173 | catch (Exception ex)
174 | {
175 | ContentResult = ex.Message.ToString();
176 | throw ex;
177 | }
178 |
179 | return ContentResult;
180 | }
181 |
182 | ///
183 | /// POST to Resful API sending Json body.
184 | ///
185 | /// API URL
186 | /// Content Application By Default Json
187 | /// Headers added in Json format: Authorization token, user-passwrod, JWT, etc.
188 | /// String Api result
189 | public static string POSTMethod_Header(string url, string JsonBody = "", string JsonHeaders = "")
190 | {
191 | string ContentResult = string.Empty;
192 | try
193 | {
194 | SetSSL();
195 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
196 | request.ContentType = CONTENTTYPE;
197 | request.Method = POST_WebMethod;
198 |
199 | if (!string.IsNullOrEmpty(JsonHeaders))
200 | {
201 | List _headers = JsonConvert.DeserializeObject>(JsonHeaders);
202 |
203 | foreach (var Header in _headers)
204 | {
205 | if (!string.IsNullOrEmpty(Header.Name) && !string.IsNullOrEmpty(Header.Value))
206 | request.Headers.Add(Header.Name, Header.Value);
207 | }
208 | }
209 |
210 | using (var streamWriter = new StreamWriter(request.GetRequestStream()))
211 | {
212 | if(!String.IsNullOrEmpty(JsonBody))
213 | streamWriter.Write(JsonBody);
214 |
215 | streamWriter.Flush();
216 | }
217 |
218 | var httpResponse = (HttpWebResponse)request.GetResponse();
219 | using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
220 | {
221 | var result = streamReader.ReadToEnd();
222 | ContentResult = result;
223 | }
224 | }
225 | catch (WebException ex)
226 | {
227 | using (var stream = ex.Response?.GetResponseStream())
228 | {
229 | if (stream != null)
230 | {
231 | using (var reader = new StreamReader(stream))
232 | {
233 | var result = reader.ReadToEnd();
234 | ContentResult = result;
235 | }
236 | }
237 | else
238 | {
239 | ContentResult = ex.Message.ToString();
240 | }
241 | }
242 | }
243 | catch (Exception ex)
244 | {
245 | ContentResult = ex.Message.ToString();
246 | throw ex;
247 | }
248 |
249 | return ContentResult;
250 | }
251 |
252 | ///
253 | /// POST to Resful API sending Json body.
254 | ///
255 | /// API URL
256 | /// Content Application By Default Json
257 | /// Headers added in Json format: Authorization token, user-passwrod, JWT, etc.
258 | /// String Api result
259 | public static string POSTMethod_Extended(ref ExtendedResult extResult, string url, string JsonBody = "", string JsonHeaders = "")
260 | {
261 | string ContentResult = string.Empty;
262 | try
263 | {
264 | SetSSL();
265 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
266 |
267 | request.Method = POST_WebMethod;
268 |
269 | if (!string.IsNullOrEmpty(JsonHeaders))
270 | {
271 | List _headers = JsonConvert.DeserializeObject>(JsonHeaders);
272 |
273 | foreach (var Header in _headers)
274 | {
275 | if (!string.IsNullOrEmpty(Header.Name) && !string.IsNullOrEmpty(Header.Value))
276 | {
277 | if (Header.Name.Contains(Header_ContentType))
278 | {
279 | request.ContentType = Header.Value;
280 | }
281 | else
282 | {
283 | request.Headers.Add(Header.Name, Header.Value);
284 | }
285 | }
286 | }
287 | }
288 |
289 | // Set default Content-Type
290 | if (string.IsNullOrEmpty(request.ContentType))
291 | {
292 | request.ContentType = CONTENTTYPE;
293 | }
294 |
295 | if (request.ContentType.ToLower() == CONTENTTYPE_URLENCODED.ToLower())
296 | {
297 | byte[] byteArray = System.Text.Encoding.UTF8.GetBytes((!String.IsNullOrEmpty(JsonBody)) ? JsonBody : "");
298 | // Set the ContentLength property of the WebRequest.
299 | request.ContentLength = byteArray.Length;
300 |
301 | using (var streamWriter = request.GetRequestStream())
302 | {
303 | streamWriter.Write(byteArray, 0, byteArray.Length);
304 | // Close the Stream object.
305 | streamWriter.Close();
306 | // Get the response.
307 |
308 | streamWriter.Flush();
309 | }
310 | }
311 | else
312 | {
313 | using (var streamWriter = new StreamWriter(request.GetRequestStream()))
314 | {
315 | if (!String.IsNullOrEmpty(JsonBody))
316 | streamWriter.Write(JsonBody);
317 |
318 | streamWriter.Flush();
319 | }
320 | }
321 |
322 | var httpResponse = (HttpWebResponse)request.GetResponse();
323 |
324 | if (httpResponse != null)
325 | {
326 | extResult.ContentType = httpResponse.ContentType;
327 | extResult.Server = httpResponse.Server;
328 | extResult.StatusCode = ((int)httpResponse?.StatusCode).ToString();
329 | extResult.StatusDescription = httpResponse.StatusDescription;
330 | }
331 |
332 | using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
333 | {
334 | var result = streamReader.ReadToEnd();
335 | extResult.Result = ContentResult = result;
336 |
337 | for (int i = 0; i < httpResponse.Headers.Count; ++i)
338 | {
339 | extResult.headers.Add(
340 | new Headers()
341 | {
342 | Name = httpResponse.Headers.Keys[i],
343 | Value = httpResponse.Headers[i]
344 | }
345 | );
346 | }
347 | }
348 | }
349 | catch (WebException ex)
350 | {
351 | using (var stream = ex.Response?.GetResponseStream())
352 | {
353 | if (stream != null)
354 | {
355 | var response = ex.Response as HttpWebResponse;
356 | if (response != null)
357 | {
358 | extResult.StatusCode = ((int)response.StatusCode).ToString();
359 | extResult.StatusDescription = response.StatusDescription;
360 | extResult.ContentType = response.ContentType;
361 | extResult.Server = response.Server;
362 | }
363 |
364 | using (var reader = new StreamReader(stream))
365 | {
366 | var result = reader.ReadToEnd();
367 | extResult.Result = ContentResult = result;
368 | }
369 | }
370 | else
371 | {
372 | extResult.Result = ContentResult = ex.Message.ToString();
373 | extResult.StatusCode = ((int) HttpStatusCode.InternalServerError).ToString();
374 | extResult.StatusDescription = HttpStatusCode.InternalServerError.ToString();
375 | }
376 |
377 | if (string.IsNullOrEmpty(extResult.Result))
378 | {
379 | extResult.Result = ContentResult;
380 | }
381 | }
382 | }
383 | catch (Exception ex)
384 | {
385 | ContentResult = ex.Message.ToString();
386 | extResult.Result = ContentResult;
387 | extResult.StatusCode = ((int)HttpStatusCode.InternalServerError).ToString();
388 | extResult.StatusDescription = HttpStatusCode.InternalServerError.ToString();
389 | throw ex;
390 | }
391 |
392 | return ContentResult;
393 | }
394 |
395 | ///
396 | /// POST to Resful API sending Json body.
397 | ///
398 | /// API URL
399 | /// Content Application By Default Json
400 | /// Headers added in Json format: Authorization token, user-passwrod, JWT, etc.
401 | /// String Api result
402 | public static string POSTMethod_urlencoded(string url, string JsonBody, string JsonHeaders = "")
403 | {
404 | string ContentResult = string.Empty;
405 | try
406 | {
407 | SetSSL();
408 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
409 | request.ContentType = CONTENTTYPE_URLENCODED;
410 | request.Method = POST_WebMethod;
411 |
412 | if (!string.IsNullOrEmpty(JsonHeaders))
413 | {
414 | List _headers = JsonConvert.DeserializeObject>(JsonHeaders);
415 |
416 | foreach (var Header in _headers)
417 | {
418 | if (!string.IsNullOrEmpty(Header.Name) && !string.IsNullOrEmpty(Header.Value))
419 | request.Headers.Add(Header.Name, Header.Value);
420 | }
421 | }
422 |
423 | byte[] byteArray = System.Text.Encoding.UTF8.GetBytes((!String.IsNullOrEmpty(JsonBody)) ? JsonBody : "");
424 | // Set the ContentLength property of the WebRequest.
425 | request.ContentLength = byteArray.Length;
426 |
427 | using (var streamWriter = request.GetRequestStream())
428 | {
429 | streamWriter.Write(byteArray, 0, byteArray.Length);
430 | // Close the Stream object.
431 | streamWriter.Close();
432 | // Get the response.
433 |
434 |
435 | streamWriter.Flush();
436 | }
437 |
438 | var httpResponse = (HttpWebResponse)request.GetResponse();
439 | using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
440 | {
441 | var result = streamReader.ReadToEnd();
442 | ContentResult = result;
443 | }
444 | }
445 | catch (WebException ex)
446 | {
447 | using (var stream = ex.Response?.GetResponseStream())
448 | {
449 | if (stream != null)
450 | {
451 | using (var reader = new StreamReader(stream))
452 | {
453 | var result = reader.ReadToEnd();
454 | ContentResult = result;
455 | }
456 | }
457 | else
458 | {
459 | ContentResult = ex.Message.ToString();
460 | }
461 | }
462 | }
463 | catch (Exception ex)
464 | {
465 | ContentResult = ex.Message.ToString();
466 | throw ex;
467 | }
468 |
469 | return ContentResult;
470 | }
471 |
472 | ///
473 | /// Request GET Method to the URL API provided.
474 | ///
475 | /// API URL
476 | /// Header Authorization
477 | /// String Api result
478 | public static string GETMethod(string url, string Authorization = "")
479 | {
480 | string ContentResult = string.Empty;
481 | try
482 | {
483 | SetSSL();
484 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
485 | request.ContentType = CONTENTTYPE;
486 | request.Method = GET_WebMethod;
487 |
488 | if (!String.IsNullOrEmpty(Authorization))
489 | request.Headers.Add(HttpRequestHeader.Authorization, Authorization);
490 |
491 | var httpResponse = (HttpWebResponse)request.GetResponse();
492 | using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
493 | {
494 | var result = streamReader.ReadToEnd();
495 | ContentResult = result;
496 | }
497 | }
498 | catch (WebException ex)
499 | {
500 | using (var stream = ex.Response?.GetResponseStream())
501 | {
502 | if (stream != null)
503 | {
504 | using (var reader = new StreamReader(stream))
505 | {
506 | var result = reader.ReadToEnd();
507 | ContentResult = result;
508 | }
509 | }
510 | else
511 | {
512 | ContentResult = ex.Message.ToString();
513 | }
514 | }
515 | }
516 | catch (Exception ex)
517 | {
518 | ContentResult = ex.Message.ToString();
519 | throw ex;
520 | }
521 |
522 | return ContentResult;
523 | }
524 |
525 | ///
526 | /// Request GET Method to the URL API provided.
527 | ///
528 | /// API URL
529 | /// Header Authorization
530 | /// String Api result
531 | public static string GETMethod_Headers(string url, string Headers)
532 | {
533 | string ContentResult = string.Empty;
534 | try
535 | {
536 | SetSSL();
537 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
538 | request.ContentType = CONTENTTYPE;
539 | request.Method = GET_WebMethod;
540 |
541 | if (!string.IsNullOrEmpty(Headers))
542 | {
543 | List _headers = JsonConvert.DeserializeObject>(Headers);
544 |
545 | foreach (var Header in _headers)
546 | {
547 | if (!string.IsNullOrEmpty(Header.Name) && !string.IsNullOrEmpty(Header.Value))
548 | request.Headers.Add(Header.Name, Header.Value);
549 | }
550 | }
551 |
552 | var httpResponse = (HttpWebResponse)request.GetResponse();
553 | using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
554 | {
555 | var result = streamReader.ReadToEnd();
556 | ContentResult = result;
557 | }
558 | }
559 | catch (WebException ex)
560 | {
561 | using (var stream = ex.Response?.GetResponseStream())
562 | {
563 | if (stream != null)
564 | {
565 | using (var reader = new StreamReader(stream))
566 | {
567 | var result = reader.ReadToEnd();
568 | ContentResult = result;
569 | }
570 | }
571 | else
572 | {
573 | ContentResult = ex.Message.ToString();
574 | }
575 | }
576 | }
577 | catch (Exception ex)
578 | {
579 | ContentResult = ex.Message.ToString();
580 | throw ex;
581 | }
582 |
583 | return ContentResult;
584 | }
585 |
586 | ///
587 | /// Request GET Method to the URL API provided.
588 | ///
589 | /// API URL
590 | /// Header Authorization
591 | /// String Api result
592 | public static string GETMethod_Headers(string url, string JsonBody = "", string Headers = "")
593 | {
594 | string ContentResult = string.Empty;
595 | try
596 | {
597 | SetSSL();
598 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
599 | request.ContentType = CONTENTTYPE;
600 | request.Method = GET_WebMethod;
601 |
602 | if (!string.IsNullOrEmpty(Headers))
603 | {
604 | List _headers = JsonConvert.DeserializeObject>(Headers);
605 |
606 | foreach (var Header in _headers)
607 | {
608 | if (!string.IsNullOrEmpty(Header.Name) && !string.IsNullOrEmpty(Header.Value))
609 | request.Headers.Add(Header.Name, Header.Value);
610 | }
611 | }
612 |
613 | using (var streamWriter = new StreamWriter(request.GetRequestStream()))
614 | {
615 | streamWriter.Write(JsonBody);
616 | streamWriter.Flush();
617 | }
618 |
619 | var httpResponse = (HttpWebResponse)request.GetResponse();
620 | using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
621 | {
622 | var result = streamReader.ReadToEnd();
623 | ContentResult = result;
624 | }
625 | }
626 | catch (WebException ex)
627 | {
628 | using (var stream = ex.Response?.GetResponseStream())
629 | {
630 | if (stream != null)
631 | {
632 | using (var reader = new StreamReader(stream))
633 | {
634 | var result = reader.ReadToEnd();
635 | ContentResult = result;
636 | }
637 | }
638 | else
639 | {
640 | ContentResult = ex.Message.ToString();
641 | }
642 | }
643 | }
644 | catch (Exception ex)
645 | {
646 | ContentResult = ex.Message.ToString();
647 | throw ex;
648 | }
649 |
650 | return ContentResult;
651 | }
652 |
653 | ///
654 | /// Request GET Method to the URL API provided.
655 | ///
656 | /// API URL
657 | /// Id
658 | /// Authorization
659 | /// String Api result
660 | public static string GETMethod(string url, string Id, string Authorization = "")
661 | {
662 | string ContentResult = string.Empty;
663 | try
664 | {
665 | SetSSL();
666 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(string.Concat(url,"/",Id));
667 | request.ContentType = CONTENTTYPE;
668 | request.Method = GET_WebMethod;
669 |
670 | if (!string.IsNullOrEmpty(Authorization))
671 | request.Headers.Add(HttpRequestHeader.Authorization, Authorization);
672 |
673 | var httpResponse = (HttpWebResponse)request.GetResponse();
674 | using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
675 | {
676 | var result = streamReader.ReadToEnd();
677 | ContentResult = result;
678 | }
679 | }
680 | catch (WebException ex)
681 | {
682 | using (var stream = ex.Response?.GetResponseStream())
683 | {
684 | if (stream != null)
685 | {
686 | using (var reader = new StreamReader(stream))
687 | {
688 | var result = reader.ReadToEnd();
689 | ContentResult = result;
690 | }
691 | }
692 | else
693 | {
694 | ContentResult = ex.Message.ToString();
695 | }
696 | }
697 | }
698 | catch (Exception ex)
699 | {
700 | ContentResult = ex.Message.ToString();
701 | throw ex;
702 | }
703 |
704 | return ContentResult;
705 | }
706 |
707 | ///
708 | /// Request GET Method to the URL API provided.
709 | ///
710 | /// Object used to deserialize the result
711 | /// API URL
712 | /// Authorization header
713 | /// String Api result
714 | public static string GETMethod(string url, ref T ObjectResult, string Authorization = "")
715 | {
716 | string ContentResult = string.Empty;
717 | try
718 | {
719 | SetSSL();
720 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
721 | request.ContentType = CONTENTTYPE;
722 | request.Method = GET_WebMethod;
723 |
724 | if (!string.IsNullOrEmpty(Authorization))
725 | request.Headers.Add(HttpRequestHeader.Authorization, Authorization);
726 |
727 | var httpResponse = (HttpWebResponse)request.GetResponse();
728 | using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
729 | {
730 | var result = streamReader.ReadToEnd();
731 | ObjectResult = JsonConvert.DeserializeObject(result);
732 | ContentResult = result;
733 | }
734 | }
735 | catch (WebException ex)
736 | {
737 | using (var stream = ex.Response?.GetResponseStream())
738 | {
739 | if (stream != null)
740 | {
741 | using (var reader = new StreamReader(stream))
742 | {
743 | var result = reader.ReadToEnd();
744 | ContentResult = result;
745 | }
746 | }
747 | else
748 | {
749 | ContentResult = ex.Message.ToString();
750 | }
751 | }
752 | }
753 | catch (Exception ex)
754 | {
755 | ContentResult = ex.Message.ToString();
756 | throw ex;
757 | }
758 |
759 | return ContentResult;
760 | }
761 |
762 | ///
763 | /// Request GET Method to the URL API provided.
764 | ///
765 | /// Object used to deserialize the result
766 | /// API URL
767 | /// Authorization header
768 | /// String Api result
769 | public static string GETMethod(string url, string Id, ref T ObjectResult, string Authorization = "")
770 | {
771 | string ContentResult = string.Empty;
772 | try
773 | {
774 | SetSSL();
775 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(string.Concat(url,"/",Id));
776 | request.ContentType = CONTENTTYPE;
777 | request.Method = GET_WebMethod;
778 |
779 | if (!string.IsNullOrEmpty(Authorization))
780 | request.Headers.Add(HttpRequestHeader.Authorization, Authorization);
781 |
782 | var httpResponse = (HttpWebResponse)request.GetResponse();
783 | using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
784 | {
785 | var result = streamReader.ReadToEnd();
786 | ObjectResult = JsonConvert.DeserializeObject(result);
787 | ContentResult = result;
788 | }
789 | }
790 | catch (WebException ex)
791 | {
792 | using (var stream = ex.Response?.GetResponseStream())
793 | {
794 | if (stream != null)
795 | {
796 | using (var reader = new StreamReader(stream))
797 | {
798 | var result = reader.ReadToEnd();
799 | ContentResult = result;
800 | }
801 | }
802 | else
803 | {
804 | ContentResult = ex.Message.ToString();
805 | }
806 | }
807 | }
808 | catch (Exception ex)
809 | {
810 | ContentResult = ex.Message.ToString();
811 | throw ex;
812 | }
813 |
814 | return ContentResult;
815 | }
816 |
817 | ///
818 | /// Request GET Method to the URL API provided.
819 | ///
820 | /// API URL
821 | /// Header Authorization
822 | /// String Api result
823 | public static string GETMethod_Extended(ref ExtendedResult extResult, string url, string JsonBody = "", string Headers = "" )
824 | {
825 | string ContentResult = string.Empty;
826 | try
827 | {
828 | SetSSL();
829 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
830 | //request.ContentType = ContentType;
831 | request.Method = GET_WebMethod;
832 |
833 | if (!string.IsNullOrEmpty(Headers))
834 | {
835 | List _headers = JsonConvert.DeserializeObject>(Headers);
836 |
837 | foreach (var Header in _headers)
838 | {
839 | if (!string.IsNullOrEmpty(Header.Name) && !string.IsNullOrEmpty(Header.Value))
840 | {
841 | if (Header.Name.Contains(Header_ContentType))
842 | {
843 | request.ContentType = Header.Value;
844 | }
845 | else
846 | {
847 | request.Headers.Add(Header.Name, Header.Value);
848 | }
849 |
850 | }
851 |
852 | }
853 | }
854 |
855 | // Set default Content-Type
856 | if (string.IsNullOrEmpty(request.ContentType))
857 | {
858 | request.ContentType = CONTENTTYPE;
859 | }
860 |
861 | if (request.ContentType.ToLower() == CONTENTTYPE_URLENCODED.ToLower())
862 | {
863 | byte[] byteArray = System.Text.Encoding.UTF8.GetBytes((!String.IsNullOrEmpty(JsonBody)) ? JsonBody : "");
864 | // Set the ContentLength property of the WebRequest.
865 | request.ContentLength = byteArray.Length;
866 |
867 | using (var streamWriter = request.GetRequestStream())
868 | {
869 | streamWriter.Write(byteArray, 0, byteArray.Length);
870 | // Close the Stream object.
871 | streamWriter.Close();
872 | // Get the response.
873 |
874 | streamWriter.Flush();
875 | }
876 | }
877 | else if (!String.IsNullOrEmpty(JsonBody)
878 | && !request.Method.ToUpper().Contains("GET"))
879 | {
880 | using (var streamWriter = new StreamWriter(request.GetRequestStream()))
881 | {
882 | streamWriter.Write(JsonBody);
883 | streamWriter.Flush();
884 | }
885 | }
886 |
887 | var httpResponse = (HttpWebResponse)request.GetResponse();
888 |
889 | if (httpResponse != null)
890 | {
891 | extResult.ContentType = httpResponse.ContentType;
892 | extResult.Server = httpResponse.Server;
893 | extResult.Result = ContentResult;
894 | extResult.StatusCode = ((int)httpResponse.StatusCode).ToString();
895 | extResult.StatusDescription = httpResponse.StatusDescription;
896 | }
897 |
898 | using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
899 | {
900 | var result = streamReader.ReadToEnd();
901 | extResult.Result = ContentResult = result;
902 |
903 | for (int i = 0; i < httpResponse.Headers.Count; ++i)
904 | {
905 | extResult.headers.Add(
906 | new Headers()
907 | {
908 | Name = httpResponse.Headers.Keys[i],
909 | Value = httpResponse.Headers[i]
910 | }
911 | );
912 | }
913 |
914 | }
915 | }
916 | catch (WebException ex)
917 | {
918 | using (var stream = ex.Response?.GetResponseStream())
919 | {
920 | if (stream != null)
921 | {
922 | var response = ex.Response as HttpWebResponse;
923 | if (response != null)
924 | {
925 | extResult.StatusCode = ((int)response.StatusCode).ToString();
926 | extResult.StatusDescription = response.StatusDescription;
927 | extResult.ContentType = response.ContentType;
928 | extResult.Server = response.Server;
929 | }
930 |
931 | using (var reader = new StreamReader(stream))
932 | {
933 | var result = reader.ReadToEnd();
934 | extResult.Result = ContentResult = result;
935 | }
936 | }
937 | else
938 | {
939 | ContentResult = ex.Message.ToString();
940 | extResult.StatusCode = ((int)HttpStatusCode.InternalServerError).ToString();
941 | extResult.StatusDescription = HttpStatusCode.InternalServerError.ToString();
942 | }
943 |
944 | if (string.IsNullOrEmpty(extResult.Result))
945 | {
946 | extResult.Result = ContentResult;
947 | }
948 | }
949 | }
950 | catch (Exception ex)
951 | {
952 | ContentResult = ex.Message.ToString();
953 | extResult.Result = ContentResult;
954 | extResult.StatusCode = ((int)HttpStatusCode.InternalServerError).ToString();
955 | extResult.StatusDescription = HttpStatusCode.InternalServerError.ToString();
956 | throw ex;
957 | }
958 |
959 | return ContentResult;
960 | }
961 |
962 |
963 | ///
964 | /// POST to Resful API sending Json body.
965 | ///
966 | /// API URL
967 | /// Content Application By Default Json
968 | /// Headers added in Json format: Authorization token, user-passwrod, JWT, etc.
969 | /// String Api result
970 | public static string WebMethod(string httpMethod, string url, string JsonBody = "", string JsonHeaders = "")
971 | {
972 | string ContentResult = string.Empty;
973 | try
974 | {
975 | SetSSL();
976 |
977 | validateParams(ParamsName.webMethod, httpMethod);
978 | validateParams(ParamsName.URL, url);
979 |
980 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
981 | // request.ContentType = Header_ContentType;
982 | request.Method = httpMethod;
983 |
984 |
985 | if (!string.IsNullOrEmpty(JsonHeaders))
986 | {
987 | List _headers = JsonConvert.DeserializeObject>(JsonHeaders);
988 |
989 | foreach (var Header in _headers)
990 | {
991 | if (!string.IsNullOrEmpty(Header.Name) && !string.IsNullOrEmpty(Header.Value))
992 | {
993 | if (Header.Name.Contains(Header_ContentType))
994 | {
995 | request.ContentType = Header.Value;
996 | }
997 | else
998 | {
999 | request.Headers.Add(Header.Name, Header.Value);
1000 | }
1001 |
1002 | }
1003 |
1004 | }
1005 | }
1006 |
1007 | // Set default Content-Type
1008 | if (string.IsNullOrEmpty(request.ContentType))
1009 | {
1010 | request.ContentType = CONTENTTYPE;
1011 | }
1012 |
1013 | if (request.ContentType.ToLower() == CONTENTTYPE_URLENCODED.ToLower())
1014 | {
1015 | byte[] byteArray = System.Text.Encoding.UTF8.GetBytes((!String.IsNullOrEmpty(JsonBody)) ? JsonBody : "");
1016 | // Set the ContentLength property of the WebRequest.
1017 | request.ContentLength = byteArray.Length;
1018 |
1019 | using (var streamWriter = request.GetRequestStream())
1020 | {
1021 | streamWriter.Write(byteArray, 0, byteArray.Length);
1022 | // Close the Stream object.
1023 | streamWriter.Close();
1024 | // Get the response.
1025 |
1026 | streamWriter.Flush();
1027 | }
1028 | }
1029 | else if (!String.IsNullOrEmpty(JsonBody)
1030 | && !httpMethod.ToUpper().Contains("GET"))
1031 | {
1032 | using (var streamWriter = new StreamWriter(request.GetRequestStream()))
1033 | {
1034 | streamWriter.Write(JsonBody);
1035 | streamWriter.Flush();
1036 | }
1037 | }
1038 |
1039 | var httpResponse = (HttpWebResponse)request.GetResponse();
1040 | using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
1041 | {
1042 | var result = streamReader.ReadToEnd();
1043 | ContentResult = result;
1044 | }
1045 | }
1046 | catch (WebException ex)
1047 | {
1048 | using (var stream = ex.Response?.GetResponseStream())
1049 | {
1050 | if (stream != null)
1051 | {
1052 | using (var reader = new StreamReader(stream))
1053 | {
1054 | var result = reader.ReadToEnd();
1055 | ContentResult = result;
1056 | }
1057 | }
1058 | else
1059 | {
1060 | ContentResult = ex.Message.ToString();
1061 | }
1062 | }
1063 | }
1064 | catch (Exception ex)
1065 | {
1066 | ContentResult = ex.Message.ToString();
1067 | throw ex;
1068 | }
1069 |
1070 | return ContentResult;
1071 | }
1072 |
1073 | ///
1074 | /// Generic web method request.
1075 | ///
1076 | /// DTO which will hold the result set
1077 | /// Web method action
1078 | /// URL
1079 | /// Body
1080 | /// Headers
1081 | ///
1082 | public static string WebMethod_Extended(ref ExtendedResult extResult, string httpMethod, string url, string JsonBody = "", string Headers = "")
1083 | {
1084 | string ContentResult = string.Empty;
1085 | try
1086 | {
1087 | SetSSL();
1088 |
1089 | validateParams(ParamsName.webMethod, httpMethod);
1090 | validateParams(ParamsName.URL, url);
1091 |
1092 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
1093 |
1094 | request.Method = httpMethod;
1095 |
1096 | if (!string.IsNullOrEmpty(Headers))
1097 | {
1098 | List _headers = JsonConvert.DeserializeObject>(Headers);
1099 |
1100 | foreach (var Header in _headers)
1101 | {
1102 | if (!string.IsNullOrEmpty(Header.Name) && !string.IsNullOrEmpty(Header.Value))
1103 | {
1104 | if (Header.Name.Contains(Header_ContentType))
1105 | {
1106 | request.ContentType = Header.Value;
1107 | }
1108 | else
1109 | {
1110 | request.Headers.Add(Header.Name, Header.Value);
1111 | }
1112 | }
1113 | }
1114 | }
1115 |
1116 | // Set default Content-Type
1117 | if (string.IsNullOrEmpty(request.ContentType))
1118 | {
1119 | request.ContentType = CONTENTTYPE;
1120 | }
1121 |
1122 | if (request.ContentType.ToLower() == CONTENTTYPE_URLENCODED.ToLower())
1123 | {
1124 | byte[] byteArray = System.Text.Encoding.UTF8.GetBytes((!String.IsNullOrEmpty(JsonBody)) ? JsonBody : "");
1125 | // Set the ContentLength property of the WebRequest.
1126 | request.ContentLength = byteArray.Length;
1127 |
1128 | using (var streamWriter = request.GetRequestStream())
1129 | {
1130 | streamWriter.Write(byteArray, 0, byteArray.Length);
1131 | // Close the Stream object.
1132 | streamWriter.Close();
1133 | // Get the response.
1134 |
1135 | streamWriter.Flush();
1136 | }
1137 | }
1138 | else if (!String.IsNullOrEmpty(JsonBody)
1139 | && !httpMethod.ToUpper().Contains("GET") )
1140 | {
1141 | using (var streamWriter = new StreamWriter(request.GetRequestStream()))
1142 | {
1143 | streamWriter.Write(JsonBody);
1144 | streamWriter.Flush();
1145 | }
1146 | }
1147 |
1148 | var httpResponse = (HttpWebResponse)request.GetResponse();
1149 |
1150 | if (httpResponse != null)
1151 | {
1152 | extResult.ContentType = httpResponse.ContentType;
1153 | extResult.Server = httpResponse.Server;
1154 | extResult.StatusCode = ((int)httpResponse.StatusCode).ToString();
1155 | extResult.StatusDescription = httpResponse.StatusDescription;
1156 | }
1157 |
1158 | using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
1159 | {
1160 | var result = streamReader.ReadToEnd();
1161 | extResult.Result = ContentResult = result;
1162 |
1163 | for (int i = 0; i < httpResponse.Headers.Count; ++i)
1164 | {
1165 | extResult.headers.Add(
1166 | new Headers()
1167 | {
1168 | Name = httpResponse.Headers.Keys[i],
1169 | Value = httpResponse.Headers[i]
1170 | }
1171 | );
1172 | }
1173 |
1174 | }
1175 | }
1176 | catch (WebException ex)
1177 | {
1178 | using (var stream = ex.Response?.GetResponseStream())
1179 | {
1180 | if (stream != null)
1181 | {
1182 | var response = ex.Response as HttpWebResponse;
1183 | if (response != null)
1184 | {
1185 | extResult.StatusCode = ((int)response.StatusCode).ToString();
1186 | extResult.StatusDescription = response.StatusDescription;
1187 | extResult.ContentType = response.ContentType;
1188 | extResult.Server = response.Server;
1189 | }
1190 |
1191 | using (var reader = new StreamReader(stream))
1192 | {
1193 | var result = reader.ReadToEnd();
1194 | extResult.Result = ContentResult = result;
1195 | }
1196 | }
1197 | else
1198 | {
1199 | ContentResult = ex.Message.ToString();
1200 | extResult.StatusCode = ((int)HttpStatusCode.InternalServerError).ToString();
1201 | extResult.StatusDescription = HttpStatusCode.InternalServerError.ToString();
1202 | }
1203 |
1204 | if (string.IsNullOrEmpty(extResult.Result))
1205 | {
1206 | extResult.Result = ContentResult;
1207 | }
1208 | }
1209 | }
1210 | catch (Exception ex)
1211 | {
1212 | ContentResult = ex.Message.ToString();
1213 | extResult.Result = ContentResult;
1214 | extResult.StatusCode = ((int)HttpStatusCode.InternalServerError).ToString();
1215 | extResult.StatusDescription = HttpStatusCode.InternalServerError.ToString();
1216 | throw ex;
1217 | }
1218 |
1219 | return ContentResult;
1220 | }
1221 |
1222 | private static void validateParams(ParamsName pname, string paramVal)
1223 | {
1224 | string[] methods = { "POST", "GET", "PUT", "PATCH", "DELETE" };
1225 |
1226 | switch (pname)
1227 | {
1228 | case ParamsName.webMethod:
1229 |
1230 | if (string.IsNullOrEmpty(paramVal) || !ContainAnyOf(paramVal, methods))
1231 | {
1232 | throw new ArgumentNullException(pname.ToString(), "Please provide a valid HTTP method (GET,POST,PUT,PATCH, DELETE).");
1233 | }
1234 | if (string.IsNullOrEmpty(paramVal))
1235 | {
1236 | throw new ArgumentNullException(pname.ToString(), "Please provide a valid HTTP method (GET,POST,PUT,PATCH, DELETE).");
1237 | }
1238 |
1239 | break;
1240 | case ParamsName.URL:
1241 | if (string.IsNullOrEmpty(paramVal))
1242 | {
1243 | throw new ArgumentNullException(pname.ToString(), "Please provide a valid URL.");
1244 | }
1245 | break;
1246 | }
1247 | }
1248 |
1249 | ///
1250 | /// Created this method to avoid using Contains from Linq library. (Less dependencies)
1251 | ///
1252 | ///
1253 | ///
1254 | ///
1255 | private static bool ContainAnyOf(string word, string[] array)
1256 | {
1257 | for (int i = 0; i < array.Length; i++)
1258 | {
1259 | if (word.ToUpper() == array[i])
1260 | {
1261 | return true;
1262 | }
1263 | }
1264 | return false;
1265 | }
1266 |
1267 | private static void SetSSL()
1268 | {
1269 | System.Net.ServicePointManager.ServerCertificateValidationCallback = (senderX, certificate, chain, sslPolicyErrors) => { return true; };
1270 | ServicePointManager.Expect100Continue = true;
1271 | ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
1272 | | SecurityProtocolType.Ssl3
1273 | | (SecurityProtocolType)3072;
1274 | }
1275 | }
1276 | }
1277 |
--------------------------------------------------------------------------------
/API_Consumer/Consumers/Helper.cs:
--------------------------------------------------------------------------------
1 | using API_Consumer;
2 | using Microsoft.SqlServer.Server;
3 | using Newtonsoft.Json;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Data;
7 | using System.Security.Cryptography;
8 | using System.Text;
9 |
10 | namespace SQLAPI_Consumer
11 | {
12 | ///
13 | /// Utility used for return result set to SQL.
14 | ///
15 | public static class Helper
16 | {
17 | ///
18 | /// Static method used to Send multiple columns as result set thought Lists of string.
19 | ///
20 | /// Columns names showed in SQL Result set
21 | /// Values to be sent
22 | public static void SendResults(SqlMetaData[] Header, List Data)
23 | {
24 | SqlDataRecord Record = new SqlDataRecord(Header);
25 |
26 | if (!SqlContext.Pipe.IsSendingResults)
27 | SqlContext.Pipe.SendResultsStart(Record);
28 |
29 | if (SqlContext.Pipe.IsSendingResults)
30 | {
31 | foreach (var item in Data)
32 | {
33 | Record.SetValues(item);
34 |
35 | SqlContext.Pipe.SendResultsRow(Record);
36 | }
37 |
38 | SqlContext.Pipe.SendResultsEnd();
39 | }
40 | }
41 |
42 | ///
43 | /// Static method used to Send multiples columns as result set thought multiples variables.
44 | ///
45 | /// Columns names showed in SQL Result set
46 | /// Values to be sent
47 | public static void SendResults(SqlMetaData[] Header, params object[] values)
48 | {
49 | SqlDataRecord Record = new SqlDataRecord(Header);
50 |
51 | if (!SqlContext.Pipe.IsSendingResults)
52 | SqlContext.Pipe.SendResultsStart(Record);
53 |
54 | if (SqlContext.Pipe.IsSendingResults)
55 | {
56 | Record.SetValues(values);
57 |
58 | SqlContext.Pipe.SendResultsRow(Record);
59 |
60 | SqlContext.Pipe.SendResultsEnd();
61 | }
62 | }
63 |
64 | ///
65 | /// Static method used to send and specific value as a result.
66 | ///
67 | /// Name of column showed in SQL Result set.
68 | /// Value to be sent.
69 | public static void SendResultValue(string ColumnName, string Value)
70 | {
71 | SqlDataRecord Record = new SqlDataRecord(new SqlMetaData[] { new SqlMetaData(ColumnName, SqlDbType.VarChar, SqlMetaData.Max) });
72 |
73 | if (!SqlContext.Pipe.IsSendingResults)
74 | SqlContext.Pipe.SendResultsStart(Record);
75 |
76 | if (SqlContext.Pipe.IsSendingResults)
77 | {
78 | Record.SetValues(Value);
79 |
80 | SqlContext.Pipe.SendResultsRow(Record);
81 |
82 | SqlContext.Pipe.SendResultsEnd();
83 | }
84 | }
85 |
86 | ///
87 | /// Static method used to send and specific value as a result.
88 | ///
89 | /// Name of column showed in SQL Result set.
90 | /// Value to be sent.
91 | public static void SendResultValue(ExtendedResult extResult)
92 | {
93 | var Header = new SqlMetaData[]
94 | {
95 | new SqlMetaData(nameof(extResult.Result), SqlDbType.VarChar,SqlMetaData.Max),
96 | new SqlMetaData(nameof(extResult.ContentType), SqlDbType.VarChar,100),
97 | new SqlMetaData(nameof(extResult.Server), SqlDbType.VarChar,100),
98 | new SqlMetaData(nameof(extResult.StatusCode), SqlDbType.VarChar,100),
99 | new SqlMetaData(nameof(extResult.StatusDescription), SqlDbType.VarChar,100),
100 | new SqlMetaData(nameof(extResult.headers), SqlDbType.VarChar,SqlMetaData.Max)
101 | };
102 |
103 | SqlDataRecord Record = new SqlDataRecord(Header);
104 |
105 | if (!SqlContext.Pipe.IsSendingResults)
106 | SqlContext.Pipe.SendResultsStart(Record);
107 |
108 | if (SqlContext.Pipe.IsSendingResults)
109 | {
110 | Record.SetValues(
111 | extResult.Result
112 | , extResult.ContentType
113 | , extResult.Server
114 | , extResult.StatusCode
115 | , extResult.StatusDescription
116 | , JsonConvert.SerializeObject(extResult.headers)
117 | );
118 |
119 | SqlContext.Pipe.SendResultsRow(Record);
120 |
121 | SqlContext.Pipe.SendResultsEnd();
122 | }
123 | }
124 |
125 | ///
126 | /// Static method used to send an empty Result to SQL.
127 | ///
128 | /// Name of column showed in SQL Result set.
129 | public static void SendEmptyResult(string ColumnName)
130 | {
131 | SqlDataRecord Record = new SqlDataRecord(new SqlMetaData[] { new SqlMetaData(ColumnName, SqlDbType.VarChar, SqlMetaData.Max) });
132 |
133 | if (!SqlContext.Pipe.IsSendingResults)
134 | SqlContext.Pipe.SendResultsStart(Record);
135 |
136 | if (SqlContext.Pipe.IsSendingResults)
137 | {
138 | SqlContext.Pipe.SendResultsRow(Record);
139 |
140 | SqlContext.Pipe.SendResultsEnd();
141 | }
142 | }
143 |
144 | ///
145 | /// Static method used to send an empty ResultSet to SQL.
146 | ///
147 | /// Set of columns to be showed in SQL Result set.
148 | public static void SendEmptyResult(SqlMetaData[] Header)
149 | {
150 | SqlDataRecord Record = new SqlDataRecord(Header);
151 |
152 | if (!SqlContext.Pipe.IsSendingResults)
153 | SqlContext.Pipe.SendResultsStart(Record);
154 |
155 | if (SqlContext.Pipe.IsSendingResults)
156 | {
157 | SqlContext.Pipe.SendResultsRow(Record);
158 |
159 | SqlContext.Pipe.SendResultsEnd();
160 | }
161 | }
162 |
163 | private static readonly Encoding SignatureEncoding = Encoding.UTF8;
164 |
165 | ///
166 | /// public method to return that return SHA256
167 | ///
168 | /// parameters in URL
169 | /// SK
170 | /// string SHA256
171 | public static string CreateSignature(string message, string secret)
172 | {
173 |
174 | byte[] keyBytes = SignatureEncoding.GetBytes(secret);
175 | byte[] messageBytes = SignatureEncoding.GetBytes(message);
176 | HMACSHA256 hmacsha256 = new HMACSHA256(keyBytes);
177 |
178 | byte[] bytes = hmacsha256.ComputeHash(messageBytes);
179 |
180 | return BitConverter.ToString(bytes).Replace("-", "").ToLower();
181 | }
182 |
183 | ///
184 | /// Timestamp for signature
185 | ///
186 | /// string
187 | public static string GetTimestamp()
188 | {
189 | var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
190 | var timestamp = (long)(DateTime.Now.ToUniversalTime() - epoch).TotalMilliseconds;
191 | return timestamp.ToString();
192 | //long milliseconds = System.DateTimeOffset.Now.ToUnixTimeMilliseconds();
193 | //return milliseconds.ToString();
194 | }
195 |
196 | ///
197 | /// Get string's array of bytes
198 | ///
199 | /// Base64 string
200 | public static string GetBytes_Encoding(string _type, string _value)
201 | {
202 | string byteArray;
203 |
204 | if (_type == "UTF8")
205 | {
206 | byteArray = GetBytes_Encoding_UTF8(_value);
207 | }
208 | else
209 | {
210 | byteArray = GetBytes_Encoding_ASCII(_value);
211 | }
212 |
213 | return byteArray;
214 | }
215 |
216 | ///
217 | /// Get string's array of bytes Encoded ASCII
218 | ///
219 | /// Base64 string
220 | public static string GetBytes_Encoding_ASCII(string _value)
221 | {
222 | var byteArray = Encoding.ASCII.GetBytes(_value);
223 |
224 | return Convert.ToBase64String(byteArray);
225 | }
226 |
227 | ///
228 | /// Get string's array of bytes Encoded UTF8
229 | ///
230 | /// Base64 string
231 | public static string GetBytes_Encoding_UTF8(string _value)
232 | {
233 | var byteArray = Encoding.UTF8.GetBytes(_value);
234 |
235 | return Convert.ToBase64String(byteArray);
236 | }
237 | }
238 | }
239 |
--------------------------------------------------------------------------------
/API_Consumer/DTO/BankInfoBasic.cs:
--------------------------------------------------------------------------------
1 | namespace SQLAPI_Consumer
2 | {
3 | ///
4 | /// Sample DTO: Used to return BankInfo data.
5 | ///
6 | public class BankInfoBasic
7 | {
8 | public string Name { get; set; }
9 | public string rn { get; set; }
10 | public int Code { get; set; }
11 | public string Message { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/API_Consumer/DTO/BankInfoDetail.cs:
--------------------------------------------------------------------------------
1 | namespace SQLAPI_Consumer
2 | {
3 | ///
4 | /// Sample DTO: Used to return BankInfoDetailed data.
5 | ///
6 | public class BankInfoDetail
7 | {
8 | public string Institution_status_code { get; set; }
9 | public string Address { get; set; }
10 | public string City { get; set; }
11 | public string State { get; set; }
12 | public string New_routing_number { get; set; }
13 | public string Office_code { get; set; }
14 | public string Message { get; set; }
15 | public string Zip { get; set; }
16 | public string Routing_number { get; set; }
17 | public int Code { get; set; }
18 | public string Data_view_code { get; set; }
19 | public string Telephone { get; set; }
20 | public string Customer_name { get; set; }
21 | public string Record_type_code { get; set; }
22 | public string Change_date { get; set; }
23 | public string rn { get; set; }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/API_Consumer/DTO/ExtendedResult.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace API_Consumer
6 | {
7 | public class ExtendedResult
8 | {
9 | public string Result { get; set; }
10 | //public System.Collections.Specialized.NameValueCollection Headers;
11 | public List headers = new List();
12 | public string StatusCode { get; set; }
13 | public string StatusDescription { get; set; }
14 | public string Status { get; set; }
15 | public string ContentType { get; set; }
16 | public string Server { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/API_Consumer/DTO/Header.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace API_Consumer
6 | {
7 | public class Headers
8 | {
9 | public string Name;
10 | public string Value;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/API_Consumer/Key.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/Key.pfx
--------------------------------------------------------------------------------
/API_Consumer/Procedures/APICallerGeneric.cs:
--------------------------------------------------------------------------------
1 | using SQLAPI_Consumer;
2 | using System;
3 | using System.Data.SqlTypes;
4 |
5 | ///
6 | /// Generic Post Api Consumer thought CLR Proc
7 | ///
8 | public partial class StoredProcedures
9 | {
10 | ///
11 | /// It's a generic procedure used to consume Api throught POST method.
12 | /// It could either returns a result or not.
13 | ///
14 | /// Consumer POST Method of Api
15 | /// Json to be sent as body
16 | [Microsoft.SqlServer.Server.SqlProcedure]
17 | public static SqlInt32 APICaller_WebMethod(SqlString httpMethod, SqlString URL, SqlString JsonBody)
18 | {
19 | SqlInt32 ExecutionResult = APIConsumer.DEFAULT_EXECUTION_RESULT;
20 | try
21 | {
22 | string Result = APIConsumer.WebMethod(httpMethod.ToString(),URL.ToString(), JsonBody.ToString());
23 |
24 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_RESULT, Result);
25 |
26 | }
27 | catch (Exception ex)
28 | {
29 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_ERROR, ex.Message.ToString());
30 | ExecutionResult = APIConsumer.FAILED_EXECUTION_RESULT;
31 | }
32 | return ExecutionResult;
33 | }
34 |
35 | ///
36 | /// It's a generic procedure used to consume Api throught POST method.
37 | /// It could either returns a result or not.
38 | ///
39 | /// Consumer POST Method of Api
40 | /// Authorization Header
41 | /// Json to be sent as body
42 | [Microsoft.SqlServer.Server.SqlProcedure]
43 | public static SqlInt32 APICaller_Web_Headers(SqlString httpMethod, SqlString URL, SqlString Headers, SqlString JsonBody)
44 | {
45 | SqlInt32 ExecutionResult = APIConsumer.DEFAULT_EXECUTION_RESULT;
46 |
47 | try
48 | {
49 | string Result = APIConsumer.WebMethod(httpMethod.ToString(), URL.ToString(), JsonBody.ToString(), Headers.ToString());
50 |
51 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_RESULT, Result);
52 |
53 | }
54 | catch (Exception ex)
55 | {
56 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_ERROR, ex.Message.ToString());
57 | ExecutionResult = APIConsumer.FAILED_EXECUTION_RESULT;
58 | }
59 |
60 | return ExecutionResult;
61 | }
62 |
63 |
64 |
65 | ///
66 | /// It's a generic procedure used to consume API throught POST method.
67 | /// It could either returns a result or not.
68 | /// Content Type must be suplied as headers
69 | ///
70 | /// Consumer POST Method of Api
71 | /// Authorization Header
72 | /// Json to be sent as body
73 | [Microsoft.SqlServer.Server.SqlProcedure]
74 | public static SqlInt32 APICaller_Web_Extended(SqlString httpMethod, SqlString URL, SqlString Headers, SqlString JsonBody)
75 | {
76 | SqlInt32 ExecutionResult = APIConsumer.DEFAULT_EXECUTION_RESULT;
77 | API_Consumer.ExtendedResult ExtResult = new API_Consumer.ExtendedResult();
78 |
79 | try
80 | {
81 | string Result = APIConsumer.WebMethod_Extended(ref ExtResult,httpMethod.ToString() , URL.ToString(), JsonBody.ToString(), Headers.ToString());
82 |
83 | Helper.SendResultValue(ExtResult);
84 | }
85 | catch (Exception ex)
86 | {
87 | Helper.SendResultValue(ExtResult);
88 |
89 | ExecutionResult = APIConsumer.FAILED_EXECUTION_RESULT;
90 | }
91 |
92 | return ExecutionResult;
93 | }
94 |
95 | }
96 |
--------------------------------------------------------------------------------
/API_Consumer/Procedures/APICaller_GET.cs:
--------------------------------------------------------------------------------
1 | //using Microsoft.SqlServer.Server;
2 | //using Newtonsoft.Json;
3 | using SQLAPI_Consumer;
4 | using System;
5 | using System.Data;
6 | using System.Data.SqlTypes;
7 |
8 | ///
9 | /// Generic Get Api Consumer thought CLR Proc
10 | ///
11 | public partial class StoredProcedures
12 | {
13 | ///
14 | /// It's a generic procedure used to consume Api throught GET method.
15 | /// Returns the result as a varchar(max). Could be used to return Json.
16 | ///
17 | /// Api GET Method
18 | [Microsoft.SqlServer.Server.SqlProcedure]
19 | public static SqlInt32 APICaller_GET (SqlString URL)
20 | {
21 | SqlInt32 ExecutionResult = APIConsumer.DEFAULT_EXECUTION_RESULT;
22 |
23 | try
24 | {
25 | string Result = APIConsumer.GETMethod(URL.ToString());
26 |
27 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_RESULT, Result);
28 |
29 | }
30 | catch (Exception ex)
31 | {
32 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_ERROR, ex.Message.ToString());
33 | ExecutionResult = APIConsumer.FAILED_EXECUTION_RESULT;
34 | }
35 |
36 | return ExecutionResult;
37 | }
38 |
39 | ///
40 | /// It's a generic procedure used to consume Api throught GET method.
41 | /// Returns the result as a varchar(max). Could be used to return Json.
42 | ///
43 | /// Api GET Method
44 | /// Authorization Header
45 | [Microsoft.SqlServer.Server.SqlProcedure]
46 | public static SqlInt32 APICaller_GET_Auth(SqlString URL, SqlString Authorization)
47 | {
48 | SqlInt32 ExecutionResult = APIConsumer.DEFAULT_EXECUTION_RESULT;
49 |
50 | try
51 | {
52 | string Result = APIConsumer.GETMethod(URL.ToString(), Authorization.ToString());
53 |
54 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_RESULT, Result);
55 |
56 | }
57 | catch (Exception ex)
58 | {
59 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_ERROR, ex.Message.ToString());
60 | ExecutionResult = APIConsumer.FAILED_EXECUTION_RESULT;
61 | }
62 |
63 | return ExecutionResult;
64 | }
65 |
66 | ///
67 | /// It's a generic procedure used to consume Api throught GET method.
68 | /// Returns the result as a varchar(max). Could be used to return Json.
69 | ///
70 | /// Api GET Method
71 | /// Json Headers
72 | [Microsoft.SqlServer.Server.SqlProcedure]
73 | public static SqlInt32 APICaller_GET_Headers(SqlString URL, SqlString Headers)
74 | {
75 | SqlInt32 ExecutionResult = APIConsumer.DEFAULT_EXECUTION_RESULT;
76 |
77 | try
78 | {
79 | string Result = APIConsumer.GETMethod_Headers(URL.ToString(), Headers.ToString());
80 |
81 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_RESULT, Result);
82 |
83 | }
84 | catch (Exception ex)
85 | {
86 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_ERROR, ex.Message.ToString());
87 | ExecutionResult = APIConsumer.FAILED_EXECUTION_RESULT;
88 | }
89 |
90 | return ExecutionResult;
91 | }
92 |
93 | ///
94 | /// It's a generic procedure used to consume Api throught GET method.
95 | /// Returns the result as a varchar(max). Could be used to return Json.
96 | ///
97 | /// Api GET Method
98 | /// Json Headers
99 | /// Json Body
100 | [Microsoft.SqlServer.Server.SqlProcedure]
101 | public static SqlInt32 APICaller_GET_JsonBody_Header(SqlString URL, SqlString Headers, SqlString JsonBody)
102 | {
103 | SqlInt32 ExecutionResult = APIConsumer.DEFAULT_EXECUTION_RESULT;
104 | try
105 | {
106 | string Result = APIConsumer.GETMethod_Headers(URL.ToString(),JsonBody.ToString(), Headers.ToString());
107 |
108 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_RESULT, Result);
109 |
110 | }
111 | catch (Exception ex)
112 | {
113 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_ERROR, ex.Message.ToString());
114 | ExecutionResult = APIConsumer.FAILED_EXECUTION_RESULT;
115 | }
116 |
117 | return ExecutionResult;
118 | }
119 |
120 | ///
121 | /// It's a generic procedure used to consume Api throught GET method.
122 | /// Returns the result as a varchar(max). Could be used to return Json.
123 | /// Content Type must be suplied as headers
124 | ///
125 | /// Api GET Method
126 | /// Json Headers
127 | /// Json Body
128 | [Microsoft.SqlServer.Server.SqlProcedure]
129 | public static SqlInt32 APICaller_GET_Extended(SqlString URL, SqlString JsonBody, SqlString Headers)
130 | {
131 | SqlInt32 ExecutionResult = APIConsumer.DEFAULT_EXECUTION_RESULT;
132 | API_Consumer.ExtendedResult ExtResult = new API_Consumer.ExtendedResult();
133 |
134 | try
135 | {
136 | string Result = APIConsumer.GETMethod_Extended(ref ExtResult, URL.ToString(), JsonBody.ToString(), Headers.ToString());
137 |
138 | Helper.SendResultValue(ExtResult);
139 |
140 | }
141 | catch (Exception ex)
142 | {
143 | Helper.SendResultValue(ExtResult);
144 | ExecutionResult = APIConsumer.FAILED_EXECUTION_RESULT;
145 | }
146 |
147 | return ExecutionResult;
148 | }
149 | }
150 |
--------------------------------------------------------------------------------
/API_Consumer/Procedures/APICaller_POST.cs:
--------------------------------------------------------------------------------
1 | using SQLAPI_Consumer;
2 | using System;
3 | using System.Data.SqlTypes;
4 |
5 | ///
6 | /// Generic Post Api Consumer thought CLR Proc
7 | ///
8 | public partial class StoredProcedures
9 | {
10 | ///
11 | /// It's a generic procedure used to consume Api throught POST method.
12 | /// It could either returns a result or not.
13 | ///
14 | /// Consumer POST Method of Api
15 | /// Json to be sent as body
16 | [Microsoft.SqlServer.Server.SqlProcedure]
17 | public static SqlInt32 APICaller_POST(SqlString URL, SqlString JsonBody)
18 | {
19 | SqlInt32 ExecutionResult = APIConsumer.DEFAULT_EXECUTION_RESULT;
20 | try
21 | {
22 | string Result = APIConsumer.POSTMethod(URL.ToString(), JsonBody.ToString());
23 |
24 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_RESULT, Result);
25 |
26 | }
27 | catch (Exception ex)
28 | {
29 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_ERROR, ex.Message.ToString());
30 | ExecutionResult = APIConsumer.FAILED_EXECUTION_RESULT;
31 | }
32 | return ExecutionResult;
33 | }
34 |
35 | ///
36 | /// It's a generic procedure used to consume Api throught POST method.
37 | /// It could either returns a result or not.
38 | ///
39 | /// Consumer POST Method of Api
40 | /// Authorization Header
41 | /// Json to be sent as body
42 | [Microsoft.SqlServer.Server.SqlProcedure]
43 | public static SqlInt32 APICaller_POST_Auth(SqlString URL, SqlString Authorization, SqlString JsonBody)
44 | {
45 | SqlInt32 ExecutionResult = APIConsumer.DEFAULT_EXECUTION_RESULT;
46 | try
47 | {
48 | string Result = APIConsumer.POSTMethod(URL.ToString(), JsonBody.ToString(), Authorization.ToString());
49 |
50 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_RESULT, Result);
51 |
52 | }
53 | catch (Exception ex)
54 | {
55 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_ERROR, ex.Message.ToString());
56 | ExecutionResult = APIConsumer.FAILED_EXECUTION_RESULT;
57 | }
58 |
59 | return ExecutionResult;
60 | }
61 |
62 | ///
63 | /// It's a generic procedure used to consume Api throught POST method.
64 | /// It could either returns a result or not.
65 | ///
66 | /// Consumer POST Method of Api
67 | /// Authorization Header
68 | /// Json to be sent as body
69 | [Microsoft.SqlServer.Server.SqlProcedure]
70 | public static SqlInt32 APICaller_POST_JsonBody_Headers(SqlString URL, SqlString Headers, SqlString JsonBody)
71 | {
72 | SqlInt32 ExecutionResult = APIConsumer.DEFAULT_EXECUTION_RESULT;
73 |
74 | try
75 | {
76 | string Result = APIConsumer.POSTMethod_Header(URL.ToString(), JsonBody.ToString(), Headers.ToString());
77 |
78 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_RESULT, Result);
79 |
80 | }
81 | catch (Exception ex)
82 | {
83 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_ERROR, ex.Message.ToString());
84 | ExecutionResult = APIConsumer.FAILED_EXECUTION_RESULT;
85 | }
86 |
87 | return ExecutionResult;
88 | }
89 |
90 | ///
91 | /// It's a generic procedure used to consume Api throught POST method.
92 | /// It could either returns a result or not.
93 | ///
94 | /// Consumer POST Method of Api
95 | /// Authorization Header
96 | [Microsoft.SqlServer.Server.SqlProcedure]
97 | public static SqlInt32 APICaller_POST_Headers(SqlString URL, SqlString Headers)
98 | {
99 | SqlInt32 ExecutionResult = APIConsumer.DEFAULT_EXECUTION_RESULT;
100 | try
101 | {
102 | string Result = APIConsumer.POSTMethod_Header(URL.ToString(), Headers.ToString());
103 |
104 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_RESULT, Result);
105 |
106 | }
107 | catch (Exception ex)
108 | {
109 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_ERROR, ex.Message.ToString());
110 | ExecutionResult = APIConsumer.FAILED_EXECUTION_RESULT;
111 | }
112 |
113 | return ExecutionResult;
114 |
115 | }
116 |
117 | ///
118 | /// It's a generic procedure used to consume API throught POST method.
119 | /// It could either returns a result or not.
120 | /// Content Type must be suplied as headers
121 | ///
122 | /// Consumer POST Method of Api
123 | /// Authorization Header
124 | /// Json to be sent as body
125 | [Microsoft.SqlServer.Server.SqlProcedure]
126 | public static SqlInt32 APICaller_POST_Extended(SqlString URL, SqlString Headers, SqlString JsonBody)
127 | {
128 | SqlInt32 ExecutionResult = APIConsumer.DEFAULT_EXECUTION_RESULT;
129 | API_Consumer.ExtendedResult ExtResult = new API_Consumer.ExtendedResult();
130 |
131 | try
132 | {
133 | string Result = APIConsumer.POSTMethod_Extended(ref ExtResult, URL.ToString(), JsonBody.ToString(), Headers.ToString());
134 |
135 | Helper.SendResultValue(ExtResult);
136 |
137 | }
138 | catch (Exception ex)
139 | {
140 | Helper.SendResultValue(ExtResult);
141 | ExecutionResult = APIConsumer.FAILED_EXECUTION_RESULT;
142 | }
143 |
144 | return ExecutionResult;
145 | }
146 |
147 | ///
148 | /// It's a generic procedure used to consume Api throught POST method.
149 | /// It could either returns a result or not.
150 | /// Content type application/x-www-form-urlencoded
151 | ///
152 | /// Consumer POST Method of Api
153 | /// Authorization Header
154 | /// Json to be sent as body
155 | [Microsoft.SqlServer.Server.SqlProcedure]
156 | public static SqlInt32 APICaller_POST_Encoded(SqlString URL, SqlString Headers, SqlString JsonBody)
157 | {
158 | SqlInt32 ExecutionResult = APIConsumer.DEFAULT_EXECUTION_RESULT;
159 | try
160 | {
161 | string Result = APIConsumer.POSTMethod_urlencoded(URL.ToString(), JsonBody.ToString(), Headers.ToString());
162 |
163 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_RESULT, Result);
164 |
165 | }
166 | catch (Exception ex)
167 | {
168 | Helper.SendResultValue(APIConsumer.DEFAULT_COLUMN_ERROR, ex.Message.ToString());
169 | ExecutionResult = APIConsumer.FAILED_EXECUTION_RESULT;
170 | }
171 |
172 | return ExecutionResult;
173 | }
174 | }
175 |
--------------------------------------------------------------------------------
/API_Consumer/Procedures/GET_BankInfoBasicByRN.cs:
--------------------------------------------------------------------------------
1 | using SQLAPI_Consumer;
2 | using Microsoft.SqlServer.Server;
3 | using System;
4 | using System.Data;
5 | using System.Data.SqlTypes;
6 |
7 | ///
8 | /// It's a sample procedure that returns specific result: Deserializing DTO.
9 | ///
10 | public partial class StoredProcedures
11 | {
12 | ///
13 | /// Sample of consuming Get API returning specific results using DTO.
14 | ///
15 | /// Api Get Method
16 | /// Routing number
17 | [Microsoft.SqlServer.Server.SqlProcedure]
18 | public static void GET_BankInfoBasicByRN (SqlString URL, SqlString rn)
19 | {
20 | try
21 | {
22 | var BankInfoResult = new BankInfoBasic();
23 | string Result = APIConsumer.GETMethod(URL.ToString(), rn.ToString(), ref BankInfoResult);
24 |
25 | var Header = new SqlMetaData[]
26 | {
27 | new SqlMetaData(nameof(BankInfoResult.Code), SqlDbType.VarChar,100),
28 | new SqlMetaData(nameof(BankInfoResult.Name), SqlDbType.VarChar,50),
29 | new SqlMetaData(nameof(BankInfoResult.Message), SqlDbType.VarChar,100),
30 | new SqlMetaData(nameof(BankInfoResult.rn), SqlDbType.VarChar,100),
31 | };
32 |
33 | Helper.SendResults(Header
34 | , BankInfoResult.Code
35 | , BankInfoResult.Name
36 | , BankInfoResult.Message
37 | , BankInfoResult.rn
38 | );
39 |
40 | }
41 | catch (Exception ex)
42 | {
43 | throw new Exception(ex.Message.ToString());
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/API_Consumer/Procedures/UtilFunctions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Data;
3 | using System.Data.SqlClient;
4 | using System.Data.SqlTypes;
5 | using Microsoft.SqlServer.Server;
6 | using SQLAPI_Consumer;
7 |
8 | public partial class UserDefinedFunctions
9 | {
10 | ///
11 | /// Get TimeStamp from server.
12 | ///
13 | /// string Timestamp
14 | [Microsoft.SqlServer.Server.SqlFunction]
15 | public static SqlString GetTimestamp()
16 | {
17 | SqlString valueReturned = Helper.GetTimestamp();
18 | return valueReturned;
19 | }
20 |
21 | ///
22 | /// Get TimeStamp from server.
23 | ///
24 | /// string Timestamp
25 | [Microsoft.SqlServer.Server.SqlFunction]
26 | public static SqlString Create_HMACSHA256(SqlString message, SqlString SecretKey)
27 | {
28 | SqlString valueReturned = Helper.CreateSignature(
29 | message.ToString()
30 | , SecretKey.ToString()
31 | );
32 | return valueReturned;
33 | }
34 |
35 | ///
36 | /// Get Enconde ASCII string.
37 | ///
38 | /// string enconded
39 | [Microsoft.SqlServer.Server.SqlFunction]
40 | public static SqlString fn_GetBytes(SqlString value)
41 | {
42 | SqlString valueReturned = Helper.GetBytes_Encoding(
43 | ""
44 | ,value.ToString()
45 | );
46 | return valueReturned;
47 | }
48 |
49 | ///
50 | /// Get Enconde string ASCII-UTF8 from server.
51 | ///
52 | /// string enconded
53 | [Microsoft.SqlServer.Server.SqlFunction]
54 | public static SqlString fn_GetBytes_Ext(SqlString Enconde_type, SqlString value)
55 | {
56 | SqlString valueReturned = Helper.GetBytes_Encoding(
57 | Enconde_type.ToString(),
58 | value.ToString()
59 | );
60 | return valueReturned;
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/API_Consumer/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 |
3 | // General Information about an assembly is controlled through the following
4 | // set of attributes. Change these attribute values to modify the information
5 | // associated with the SQLCLR assembly.
6 | [assembly: AssemblyTitle("SQL-APIConsumer")]
7 | [assembly: AssemblyDescription("")]
8 | [assembly: AssemblyConfiguration("")]
9 | [assembly: AssemblyCompany("Geraldo Diaz")]
10 | [assembly: AssemblyProduct("SQL_APIConsumer")]
11 | [assembly: AssemblyCopyright("geraldo.diaz@outlook.com")]
12 | [assembly: AssemblyTrademark("Geraldo Diaz")]
13 | [assembly: AssemblyCulture("")]
14 |
15 | // Version information for an assembly consists of the following four values:
16 | //
17 | // Major Version
18 | // Minor Version
19 | // Build Number
20 | // Revision
21 | //
22 | [assembly: AssemblyVersion("2.3.6.1")]
23 | [assembly: AssemblyFileVersion("2.3.6.1")]
24 |
--------------------------------------------------------------------------------
/API_Consumer/SQL-APIConsumer.sqlproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | SQL-APIConsumer
8 | 2.0
9 | 4.1
10 | {3026ef9e-7af6-4baf-b9c6-338f536e091a}
11 | Microsoft.Data.Tools.Schema.Sql.Sql130DatabaseSchemaProvider
12 | Database
13 |
14 |
15 | API_Consumer
16 | API_Consumer
17 | 1033, CI
18 | BySchemaAndSchemaType
19 | True
20 | v4.0
21 | CS
22 | Properties
23 | False
24 | True
25 | True
26 | False
27 | Key.pfx
28 | UNSAFE
29 |
30 | 2.1.0.0
31 |
32 |
33 | bin\Release\
34 | $(MSBuildProjectName).sql
35 | False
36 | pdbonly
37 | true
38 | false
39 | true
40 | prompt
41 | 4
42 |
43 |
44 | bin\Debug\
45 | $(MSBuildProjectName).sql
46 | false
47 | true
48 | full
49 | false
50 | true
51 | true
52 | prompt
53 | 4
54 | AnyCPU
55 | On
56 |
57 |
58 | 11.0
59 |
60 | True
61 | 11.0
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 | dll\Newtonsoft.Json.dll
92 | True
93 | True
94 | UNSAFE
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
--------------------------------------------------------------------------------
/API_Consumer/SQL-APIConsumer.sqlproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | (Blank)
5 | StartNone
6 |
7 |
--------------------------------------------------------------------------------
/API_Consumer/bin/Debug/API_Consumer.dacpac:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/bin/Debug/API_Consumer.dacpac
--------------------------------------------------------------------------------
/API_Consumer/bin/Debug/API_Consumer.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/bin/Debug/API_Consumer.dll
--------------------------------------------------------------------------------
/API_Consumer/bin/Debug/API_Consumer.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/bin/Debug/API_Consumer.pdb
--------------------------------------------------------------------------------
/API_Consumer/bin/Debug/API_Consumer.publish.sql:
--------------------------------------------------------------------------------
1 | /*
2 | Deployment script for interactionsTransaction
3 |
4 | This code was generated by a tool.
5 | Changes to this file may cause incorrect behavior and will be lost if
6 | the code is regenerated.
7 | */
8 |
9 | GO
10 | SET ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CONCAT_NULL_YIELDS_NULL, QUOTED_IDENTIFIER ON;
11 |
12 | SET NUMERIC_ROUNDABORT OFF;
13 |
14 |
15 | GO
16 | :setvar DatabaseName "interactionsTransaction"
17 | :setvar DefaultFilePrefix "interactionsTransaction"
18 | :setvar DefaultDataPath "D:\SQLDATA\"
19 | :setvar DefaultLogPath "D:\SQLLOG\"
20 |
21 | GO
22 | :on error exit
23 | GO
24 | /*
25 | Detect SQLCMD mode and disable script execution if SQLCMD mode is not supported.
26 | To re-enable the script after enabling SQLCMD mode, execute the following:
27 | SET NOEXEC OFF;
28 | */
29 | :setvar __IsSqlCmdEnabled "True"
30 | GO
31 | IF N'$(__IsSqlCmdEnabled)' NOT LIKE N'True'
32 | BEGIN
33 | PRINT N'SQLCMD mode must be enabled to successfully execute this script.';
34 | SET NOEXEC ON;
35 | END
36 |
37 |
38 | GO
39 | IF EXISTS (SELECT 1
40 | FROM [master].[dbo].[sysdatabases]
41 | WHERE [name] = N'$(DatabaseName)')
42 | BEGIN
43 | ALTER DATABASE [$(DatabaseName)]
44 | SET ANSI_NULLS ON,
45 | ANSI_PADDING ON,
46 | ANSI_WARNINGS ON,
47 | ARITHABORT ON,
48 | CONCAT_NULL_YIELDS_NULL ON,
49 | QUOTED_IDENTIFIER ON,
50 | ANSI_NULL_DEFAULT ON,
51 | CURSOR_DEFAULT LOCAL
52 | WITH ROLLBACK IMMEDIATE;
53 | END
54 |
55 |
56 | GO
57 | IF EXISTS (SELECT 1
58 | FROM [master].[dbo].[sysdatabases]
59 | WHERE [name] = N'$(DatabaseName)')
60 | BEGIN
61 | ALTER DATABASE [$(DatabaseName)]
62 | SET PAGE_VERIFY NONE
63 | WITH ROLLBACK IMMEDIATE;
64 | END
65 |
66 |
67 | GO
68 | ALTER DATABASE [$(DatabaseName)]
69 | SET TARGET_RECOVERY_TIME = 0 SECONDS
70 | WITH ROLLBACK IMMEDIATE;
71 |
72 |
73 | GO
74 | IF EXISTS (SELECT 1
75 | FROM [master].[dbo].[sysdatabases]
76 | WHERE [name] = N'$(DatabaseName)')
77 | BEGIN
78 | ALTER DATABASE [$(DatabaseName)]
79 | SET QUERY_STORE (CLEANUP_POLICY = (STALE_QUERY_THRESHOLD_DAYS = 367))
80 | WITH ROLLBACK IMMEDIATE;
81 | END
82 |
83 |
84 | GO
85 | USE [$(DatabaseName)];
86 |
87 |
88 | GO
89 | PRINT N'Creating [API_Consumer]...';
90 |
91 |
92 | GO
93 | CREATE ASSEMBLY [API_Consumer]
94 | AUTHORIZATION [dbo]
95 | FROM 0x4D5A90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000800000000E1FBA0E00B409CD21B8014CCD21546869732070726F6772616D2063616E6E6F742062652072756E20696E20444F53206D6F64652E0D0D0A2400000000000000504500004C010300B4BF925B0000000000000000E00002210B010B00004E000000060000000000005E6C000000200000008000000000001000200000000200000400000000000000060000000000000000C000000002000000000000030060850000100000100000000010000010000000000000100000000000000000000000106C00004B00000000800000B80200000000000000000000000000000000000000A000000C000000D86A00001C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000080000000000000000000000082000004800000000000000000000002E74657874000000644C000000200000004E000000020000000000000000000000000000200000602E72737263000000B8020000008000000004000000500000000000000000000000000000400000402E72656C6F6300000C00000000A0000000020000005400000000000000000000000000004000004200000000000000000000000000000000406C00000000000048000000020005002C2E0000AC3C00000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000133001000B00000001000011027B010000040A2B00062A2202037D010000042A133001000B00000002000011027B020000040A2B00062A2202037D020000042A133001000B00000002000011027B030000040A2B00062A2202037D030000042A133001000B00000002000011027B040000040A2B00062A2202037D040000042A1E02280500000A2A133001000B00000003000011027B050000040A2B00062A2202037D050000042A133001000B00000001000011027B060000040A2B00062A2202037D060000042A133001000B00000001000011027B070000040A2B00062A2202037D070000042A133001000B00000004000011027B080000040A2B00062A2202037D080000042A133001000B00000005000011027B090000040A2B00062A2202037D090000042A133001000B00000006000011027B0A0000040A2B00062A2202037D0A0000042A1E02280500000A2A133001000B00000001000011027B0B0000040A2B00062A2202037D0B0000042A133001000B00000001000011027B0C0000040A2B00062A2202037D0C0000042A133001000B00000001000011027B0D0000040A2B00062A2202037D0D0000042A133001000B00000002000011027B0E0000040A2B00062A2202037D0E0000042A133001000B00000007000011027B0F0000040A2B00062A2202037D0F0000042A1E02280500000A2A133001000B00000001000011027B100000040A2B00062A2202037D100000042A133001000B00000002000011027B110000040A2B00062A2202037D110000042A133001000B00000002000011027B120000040A2B00062A2202037D120000042A133001000B00000002000011027B130000040A2B00062A2202037D130000042A133001000B00000001000011027B140000040A2B00062A2202037D140000042A133001000B00000002000011027B150000040A2B00062A2202037D150000042A1E02280500000A2A133001000B00000001000011027B160000040A2B00062A2202037D160000042A133001000B00000002000011027B170000040A2B00062A2202037D170000042A133001000B00000002000011027B180000040A2B00062A2202037D180000042A133001000B00000002000011027B190000040A2B00062A2202037D190000042A1E02280500000A2A133001000B00000001000011027B1A0000040A2B00062A2202037D1A0000042A133001000B00000002000011027B1B0000040A2B00062A2202037D1B0000042A133001000B00000002000011027B1C0000040A2B00062A2202037D1C0000042A133001000B00000002000011027B1D0000040A2B00062A2202037D1D0000042A1E02280500000A2A133001000B00000001000011027B1E0000040A2B00062A2202037D1E0000042A133001000B00000002000011027B1F0000040A2B00062A2202037D1F0000042A133001000B00000002000011027B200000040A2B00062A2202037D200000042A133001000B00000002000011027B210000040A2B00062A2202037D210000042A1E02280500000A2A133001000B00000001000011027B220000040A2B00062A2202037D220000042A133001000B00000002000011027B230000040A2B00062A2202037D230000042A133001000B00000008000011027B240000040A2B00062A2202037D240000042A133001000B00000004000011027B250000040A2B00062A2202037D250000042A133001000B00000009000011027B260000040A2B00062A2202037D260000042A133001000B0000000A000011027B270000040A2B00062A2202037D270000042A133001000B0000000B000011027B280000040A2B00062A2202037D280000042A1E02280500000A2A133001000B00000002000011027B290000040A2B00062A2202037D290000042A133001000B0000000C000011027B2A0000040A2B00062A2202037D2A0000042A1E02280500000A2A133001000B00000001000011027B2B0000040A2B00062A2202037D2B0000042A133001000B0000000D000011027B2C0000040A2B00062A2202037D2C0000042A133001000B0000000C000011027B2D0000040A2B00062A2202037D2D0000042A133001000B00000002000011027B2E0000040A2B00062A2202037D2E0000042A133001000B00000002000011027B2F0000040A2B00062A2202037D2F0000042A133001000B00000002000011027B300000040A2B00062A2202037D300000042A133001000B00000002000011027B310000040A2B00062A2202037D310000042A133001000B00000002000011027B320000040A2B00062A2202037D320000042A133001000B00000002000011027B330000040A2B00062A2202037D330000042A133001000B00000004000011027B340000040A2B00062A2202037D340000042A133001000B00000001000011027B350000040A2B00062A2202037D350000042A1E02280500000A2A133001000B00000001000011027B360000040A2B00062A2202037D360000042A133001000B00000002000011027B370000040A2B00062A2202037D370000042A133001000B00000002000011027B380000040A2B00062A2202037D380000042A133001000B00000002000011027B390000040A2B00062A2202037D390000042A133001000B00000004000011027B3A0000040A2B00062A2202037D3A0000042A1E02280500000A2A133001000B00000002000011027B3B0000040A2B00062A2202037D3B0000042A133001000B0000000C000011027B3C0000040A2B00062A2202037D3C0000042A133001000B0000000A000011027B3D0000040A2B00062A2202037D3D0000042A133001000B00000009000011027B3E0000040A2B00062A2202037D3E0000042A133001000B0000000B000011027B3F0000040A2B00062A2202037D3F0000042A1E02280500000A2A133001000B00000001000011027B400000040A2B00062A2202037D400000042A133001000B00000001000011027B410000040A2B00062A2202037D410000042A133001000B0000000E000011027B420000040A2B00062A2202037D420000042A133001000B0000000E000011027B430000040A2B00062A2202037D430000042A133001000B00000002000011027B440000040A2B00062A2202037D440000042A133001000B00000002000011027B450000040A2B00062A2202037D450000042A133001000B0000000E000011027B460000040A2B00062A2202037D460000042A133001000B00000004000011027B470000040A2B00062A2202037D470000042A133001000B00000003000011027B480000040A2B00062A2202037D480000042A1E02280500000A2A1B300400820000000F00001100000F00FE16060000016F0700000A0F01FE16060000016F0700000A28A10000060A289F000006730800000A0B280900000A076F0A00000A00280900000A6F0B00000A16FE010D092D2F0007178D01000001130411041607A211046F0C00000A26280900000A076F0D00000A00280900000A6F0E00000A000000DE040C00087A002A000001100000000001007B7C00041100000113300500220000001000001100178D070000010C081672010000701F161F326A730F00000AA2080A060B2B00072A1E02280500000A2A00001B300200BC00000011000011001F9C0A0002281000000A74140000010B0772190000706F1100000A000772590000706F1200000A00076F1300000A731400000A0C0008036F1500000A00086F1600000A0000DE120814FE01130811082D07086F1700000A00DC00076F1800000A741A0000010D096F1900000A731A00000A13040011046F1B00000A130511056F0700000A1200281C00000A2600DE14110414FE01130811082D0811046F1700000A00DC0000DE0613060011067A0006731D00000A13072B0011072A01280000020035001348001200000000020074001C9000140000000000000400A4A80006110000011B3002002700000012000011000002280100002B0A00DE130B0003076F1F00000A6F0700000A51160CDE0500170C2B0000082A0001100000000001000B0C001311000001133001000B00000001000011027B4C0000040A2B00062A2202037D4C0000042A133001000B00000013000011027B4D0000040A2B00062A2202037D4D0000042A133001000B00000014000011027B4E0000040A2B00062A2202037D4E0000042A133001000B00000015000011027B4F0000040A2B00062A2202037D4F0000042A133001000B00000007000011027B500000040A2B00062A2202037D500000042A133001000B0000000C000011027B510000040A2B00062A2202037D510000042A133001000B0000000E000011027B520000040A2B00062A2202037D520000042A133001000B0000000E000011027B530000040A2B00062A2202037D530000042A133001000B0000000E000011027B540000040A2B00062A2202037D540000042A133001000B0000000E000011027B550000040A2B00062A2202037D550000042A133001000B00000016000011027B560000040A2B00062A2202037D560000042A133001000B0000000D000011027B570000040A2B00062A2202037D570000042A133001000B00000004000011027B580000040A2B00062A2202037D580000042A133001000B00000001000011027B590000040A2B00062A2202037D590000042A133001000B00000004000011027B5A0000040A2B00062A2202037D5A0000042A133001000B0000000D000011027B5B0000040A2B00062A2202037D5B0000042A133001000B00000017000011027B5C0000040A2B00062A2202037D5C0000042A133001000B00000018000011027B5D0000040A2B00062A2202037D5D0000042A133001000B00000019000011027B5E0000040A2B00062A2202037D5E0000042A1E02280500000A2A42534A4201000100000000000C00000076342E302E33303331390000000005006C00000014200000237E0000802000008C13000023537472696E6773000000000C340000640000002355530070340000100000002347554944000000803400002C08000023426C6F620000000000000002000001571DA209090C000000FA253300160000010000001E000000110000005E000000C9000000610000001F0000000300000015010000190000000E0000005B000000B6000000010000000100000004000000010000000100000000000A0001000000000006004F0148010600A20248010600E602CB020600480848010600B10B48010A00BE0CA90C0A00F10CD60C0600FF10EC102300131100000600421122110600621122110600801122110A009B11D60C0A00BA11D60C0A00C811D60C0A00D311D60C0600321248010A003C129D0C0E00511246120E0063124612060097128D120600AF128D120600BC128D120600D31248010E00E71246120E00FF124612060021138D1206002E138D120600431348011200621352130000000001000000000001000100010010001B0027000500010001000100100034002700050005000A00010010004400270005000B00170001001000630027000500100022000100100076002700050016002F00010010008600270005001A003800010010009600270005001E00410001001000A4002700050022004A0001001000B200270005002900590001001000C700270005002B005E0001001000E700270005003600750001001000FB00270005003B0080000100100010012700050040008B000100100018010000050049009E00810110002901270005004900A100010010003501270005004C00A3000100B00120000100C40123000100DB0123000100F101230001004D03620001006C03200001008F0320000100B10366000100CE036A000100E80372000100B00120000100EC04200001000F05200001003205230001004D0599000100B00120000100C40123000100DB0123000100F10123000100C60520000100DD0523000100B00120000100C40123000100DB0123000100F10123000100B00120000100C40123000100DB0123000100F10123000100B00120000100C40123000100DB0123000100F10123000100B00120000100E00623000100F706CE000100B103660001001407D20001003907D60001005F07DA000100E607230001000508FB000100B001200001002509130101004609FB000100DB01230001005F0923000100780923000100910923000100A70923000100BE0923000100B10366000100D70920000100B00120000100850A230001009B0A23000100B30A23000100B103660001003E0B230001004609FB000100600BD6000100790BD20001005F07DA000100B00120000100EC0420000100190C2D010100310C2D0101003205230001004C0C23000100660C2D010100B103660001004D0362005680120D230056801E0D230056802B0D23000100B00120000100F30E89060100140F8D060100330F910601004D05990001004609FB000100190C2D010100570F2D010100310C2D010100660C2D010100710F95060100900F13010100B20F66000100D70920000100B10366000100CD0F13010100EC0F980601000910A00601002B10A806502000000000860856010A00010067200000000086085D010E000100702000000000860864011300020087200000000086086E01170002009020000000008608780113000300A720000000008608810117000300B0200000000086088A0113000400C7200000000086089A0117000400D020000000008618AA011C000500D82000000000860828022E000500EF200000000086083A0233000500F8200000000086084C020A0006000F2100000000860862020E000600182100000000860878020A0007002F210000000086088D020E0007003821000000008608AB02390008004F21000000008608BB023E0008005821000000008608ED02440009006F21000000008608FA024D0009007821000000008608070357000A008F210000000086082A035C000A009821000000008618AA011C000B00A02100000000860856010A000B00B7210000000086085D010E000B00C02100000000860850040A000C00D72100000000860866040E000C00E0210000000086087C040A000D00F72100000000860892040E000D000022000000008608A80413000E001722000000008608B60417000E002022000000008608C4048E000F003722000000008608D80493000F004022000000008618AA011C001000482200000000860856010A0010005F220000000086085D010E00100068220000000086086401130011007F220000000086086E011700110088220000000086087801130012009F22000000008608810117001200A8220000000086088A0113001300BF220000000086089A0117001300C8220000000086089C050A001400DF22000000008608A6050E001400E822000000008608B00513001500FF22000000008608BB05170015000823000000008618AA011C001600102300000000860856010A00160027230000000086085D010E001600302300000000860864011300170047230000000086086E01170017005023000000008608780113001800672300000000860881011700180070230000000086088A011300190087230000000086089A01170019009023000000008618AA011C001A00982300000000860856010A001A00AF230000000086085D010E001A00B823000000008608640113001B00CF230000000086086E0117001B00D823000000008608780113001C00EF23000000008608810117001C00F8230000000086088A0113001D000F240000000086089A0117001D001824000000008618AA011C001E00202400000000860856010A001E0037240000000086085D010E001E004024000000008608640113001F0057240000000086086E0117001F006024000000008608780113002000772400000000860881011700200080240000000086088A011300210097240000000086089A0117002100A024000000008618AA011C002200A82400000000860856010A002200BF240000000086085D010E002200C824000000008608020613002300DF240000000086080C0617002300E8240000000086081606A2002400FF240000000086082606A70024000825000000008608AB02390025001F25000000008608BB023E00250028250000000086083606AD0026003F250000000086084E06B200260048250000000086086606B80027005F250000000086087F06BD00270068250000000086089806C30028007F25000000008608BC06C80028008825000000008618AA011C0029009025000000008608960713002900A725000000008608A80717002900B025000000008608BA07F2002A00C725000000008608D007F6002A00D025000000008618AA011C002B00D82500000000860856010A002B00EF250000000086085D010E002B00F825000000008608530802012C000F2600000000860867080A012C0018260000000086087B08F2002D002F260000000086088708F6002D003826000000008608780113002E004F26000000008608810117002E005826000000008608930813002F006F260000000086089F0817002F007826000000008608AB08130030008F26000000008608B708170030009826000000008608C30813003100AF26000000008608CC0817003100B826000000008608D50813003200CF26000000008608DF0817003200D826000000008608E90813003300EF26000000008608F50817003300F826000000008608AB02390034000F27000000008608BB023E003400182700000000860801090A0035002F2700000000860813090E0035003827000000008618AA011C003600402700000000860856010A00360057270000000086085D010E00360060270000000086083F0A130037007727000000008608480A170037008027000000008608510A1300380097270000000086085C0A17003800A027000000008608670A13003900B727000000008608760A17003900C027000000008608AB0239003A00D727000000008608BB023E003A00E027000000008618AA011C003B00E827000000008608E60A13003B00FF27000000008608FB0A17003B0008280000000086087B08F2003C001F280000000086088708F6003C002828000000008608100BB8003D003F280000000086081C0BBD003D004828000000008608280BAD003E005F28000000008608330BB2003E0068280000000086089806C3003F007F28000000008608BC06C8003F008828000000008618AA011C004000902800000000860856010A004000A7280000000086085D010E004000B02800000000860850040A004100C72800000000860866040E004100D028000000008608B90B22014200E728000000008608C40B27014200F028000000008608CF0B220143000729000000008608DD0B270143001029000000008608A804130044002729000000008608B604170044003029000000008608EB0B130045004729000000008608F80B170045005029000000008608050C2201460067290000000086080F0C270146007029000000008608AB02390047008729000000008608BB023E004700902900000000860828022E004800A7290000000086083A0233004800B029000000008618AA011C004900B829000000009600C80C36014900582A000000009100FD0C3E014B00862A000000008618AA011C004B00902A000000009600390D14064B00802B0000000091004A0D1E064D00C42B00000000860856010A004F00DB2B0000000086085D010E004F00E42B000000008608610D26065000FB2B000000008608750D2B065000042C000000008608890D310651001B2C0000000086089B0D36065100242C000000008608AD0D3C0652003B2C000000008608C40D41065200442C000000008608C4048E0053005B2C000000008608D80493005300642C0000000086087B08F20054007B2C0000000086088708F6005400842C000000008608B90B220155009B2C000000008608C40B27015500A42C000000008608DB0D22015600BB2C000000008608E80D27015600C42C000000008608CF0B22015700DB2C000000008608DD0B27015700E42C000000008608050C22015800FB2C0000000086080F0C27015800042D000000008608F50D470659001B2D000000008608070E4B065900242D000000008608190E02015A003B2D0000000086082E0E0A015A00442D000000008608430E39005B005B2D000000008608510E3E005B00642D00000000860801090A005C007B2D00000000860813090E005C00842D000000008608AB0239005D009B2D000000008608BB023E005D00A42D0000000086085F0E02015E00BB2D000000008608710E0A015E00C42D000000008608830E50065F00DB2D000000008608930E59065F00E42D000000008608A30E63066000FB2D000000008608B80E6C066000042E000000008608CD0E760661001B2E000000008608E00E7F066100242E000000008618AA011C00620000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100BD1000000200C11000000100CF1000000200D31000000100DD1000000200E21000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B71000000100B7104100AA01DE065100AA010E005900AA011C006100AA011C000900AA011C006900AA011C000900B11113007100AA0133077900DB113A078100E4113F078100F511450771000A124907810014123F07810023121C003900AA015E0799005C12720799007212170099008212170099009E127807B100AA017D07B900C7121700B900CD121C00C100DF121C009900F3128307C9000F137807D900AA017D07E10039131300E900491388070C00AA019507F1006E13B9078900801313000E00240144010E00280183010E002C01D60120002300E40621002300E4062E00130004082E000B00FB072E001B000D0840002300E40641002300E40660002300E40661002300E40680002300E40681002300E406A0002300E406A1002300E406C0002300E406C1002300E406E0002300E406E1002300E40600012300E40601012300E40621012300E40640012300E40641012300E40660012300E40661012300E40680012300E40681012300E406A0012300E406A1012300E406C0012300E406C1012300E406E0012300E406E1012300E40600022300E40601022300E40620022300E40621022300E40640022300E40641022300E40660022300E40661022300E40680022300E40681022300E406A0022300E406A1022300E406C1022300E406E0022300E406E1022300E40600032300E40601032300E40620032300E40621032300E40640032300E40641032300E40660032300E40661032300E40680032300E40681032300E406A0032300E406A1032300E406C0032300E406C1032300E406E0032300E406E1032300E40600042300E40601042300E40621042300E40640042300E40641042300E40660042300E40661042300E40680042300E40681042300E406A0042300E406A1042300E406C0042300E406C1042300E406E0042300E406E1042300E40600052300E40601052300E40620052300E40621052300E40640052300E40641052300E40660052300E40661052300E40680052300E40681052300E406A0052300E406A1052300E406C1052300E406E0052300E406E1052300E40600062300E40601062300E40620062300E40621062300E40640062300E40641062300E40660062300E40661062300E40680062300E40681062300E406A0062300E406A1062300E406C0062300E406C1062300E406E1062300E40600072300E40601072300E40620072300E40621072300E40640072300E40641072300E40660072300E40661072300E40680072300E40681072300E406A0072300E406A1072300E406C0072300E406C1072300E406E0072300E406E1072300E40601082300E40620082300E40621082300E40640082300E40641082300E40660082300E40661082300E40680082300E40681082300E406A0082300E406A1082300E406C0082300E406C1082300E406E0082300E406E1082300E40600092300E40601092300E40640092300E40660092300E40680092300E40681092300E406A0092300E406A1092300E406C0092300E406C1092300E406E0092300E406E1092300E406000A2300E406010A2300E406200A2300E406210A2300E406400A2300E406410A2300E406600A2300E406610A2300E406800A2300E406810A2300E406A00A2300E406A10A2300E406C00A2300E406C10A2300E406E00A2300E406E10A2300E406010B2300E406200B2300E406210B2300E406400B2300E406410B2300E406600B2300E406610B2300E406800B2300E406810B2300E406A10B2300E406C00B2300E406C10B2300E406E00B2300E406000C2300E406200C2300E406400C2300E406600C2300E406800C2300E406A00C2300E406C00C2300E406E00C2300E406000D2300E406200D2300E406400D2300E406600D2300E406800D2300E406A00D2300E406C00D2300E406E00D2300E406000E2300E406200E2300E406400E2300E406600E2300E406A00E2300E406C00E2300E406E00E2300E406000F2300E406200F2300E406400F2300E406600F2300E406800F2300E406A00F2300E406C00F2300E40600102300E40620102300E40640102300E40660102300E40680102300E406A0102300E406C0102300E406E0102300E40600112300E40620112300E40660112300E40680112300E406A0112300E406C0112300E406E0112300E40600122300E40620122300E40640122300E40660122300E40680122300E406A0122300E406C0122300E406E0122300E40600132300E40620132300E40640132300E40660132300E40680132300E406C0133300E40660142300E40680142300E406A0142300E406C0142300E406E0142300E40600152300E40620152300E40640152300E40660152300E40680152300E406A0152300E406C0152300E406E0152300E40600162300E40620162300E40640162300E40660162300E40680162300E406A0162300E406C0162300E406E0162300E40600172300E40620172300E40640172300E40660172300E40680172300E406A0172300E406C0172300E406E0172300E40600182300E40620182300E40640182300E40660182300E40680182300E406A0182300E406C0182300E406E0182300E40600192300E406E906ED06F106F606FB06040709070E07130718071D07220726072E074F0766079B07C507CD07D207D707DC07E007E907F207020001000300050004000B00050010000600160007001A0008001E00090022000A0029000B002B000C0036000D003B000E0040001100490000000E022600000011022A00000017022A0000001C022A000000A400760000001804260000002A04260000003B047B0000004704800000004400890000000E02260000006E052600000080052600000092052A00000076009D0000000E022600000011022A00000017022A0000001C022A000000F50526000000FB052A0000000E022600000011022A00000017022A0000001C022A0000000E022600000011022A00000017022A0000001C022A0000000E022600000011022A00000017022A0000001C022A0000000E022600000090072A0000001B00DE0000003B047B000000E700E3000000B200E8000000C700ED00000028082A0000003608FE0000000E0226000000F6091A010000060AFE00000017022A0000000E0A2A000000160A2A0000001E0A2A000000230A2A000000290A2A0000003B047B000000310A260000000E0226000000CF0A2A000000D40A2A000000DB0A2A0000003B047B000000910B2A000000060AFE000000A20BE8000000AA0BE3000000C700ED0000000E02260000006E05260000007D0C31010000840C3101000092052A0000008E0C2A000000970C310100003B047B000000A400760000000E02260000008600B00600009600B50600006300BA06000076009D000000060AFE0000007D0C310100004B1031010000840C31010000970C310100005410BF06000062101A01000073107B000000310A260000003B047B0000007D101A0100008B10C30600009710CC060000A810D50602000100030001000200030001000400050002000300050001000600070002000500070002000700090001000800090001000B000B0002000A000B0001000D000D0002000C000D0002000E000F0001000F000F0002001000110001001100110001001300130002001200130002001400150001001500150001001800170002001700170001001A00190002001900190002001B001B0001001C001B0002001D001D0001001E001D00010020001F0002001F001F0002002200210001002300210002002400230001002500230001002700250002002600250002002800270001002900270002002A00290001002B00290001002D002B0002002C002B0002002F002D00010030002D00020031002F00010032002F0002003300310001003400310001003600330002003500330001003900350002003800350002003A00370001003B00370001003D00390002003C00390001003F003B0002003E003B00020041003D00010042003D00020043003F00010044003F0001004600410002004500410002004700430001004800430001004B00450002004A00450001004D00470002004C00470002004E00490001004F004900020050004B00010051004B00010053004D00020052004D00020054004F00010055004F0002005600510001005700510001005A00530002005900530002005B00550001005C00550002005E00570001005F005700010061005900020060005900020062005B00010063005B00020064005D00010065005D00020066005F00010067005F0001006900610002006800610001006B00630002006A00630002006C00650001006D00650001006F00670002006E006700010071006900020070006900020072006B00010073006B00020075006D00010076006D00010078006F00020077006F0002007900710001007A00710001007C00730002007B00730001007E00750002007D007500020080007700010081007700020082007900010083007900010085007B00020084007B00020086007D00010087007D00020088007F00010089007F0001008C00810002008B00810002008D00830001008E00830002008F008500010090008500010092008700020091008700020093008900010094008900020095008B00010096008B00020097008D00010098008D0001009A008F00020099008F0001009C00910002009B0091000200A30093000100A40093000100A60095000200A50095000100A80097000200A70097000200A90099000100AA0099000200AB009B000100AC009B000100AE009D000200AD009D000200AF009F000100B0009F000100B200A1000200B100A1000100B400A3000200B300A3000200B500A5000100B600A5000200B700A7000100B800A7000100BA00A9000200B900A9000200BB00AB000100BC00AB000200BD00AD000100BE00AD000100C000AF000200BF00AF000200C100B1000100C200B1000200C300B3000100C400B3000100C600B5000200C500B5000200C700B7000100C800B7008F070480000000000000000000000000000000002700000004000000000000000000000001003F010000000004000000000000000000000001009D0C0000000004000000000000000000000001004801000000000B0000000000000000000000B0075213000000000000000045015F0D3D00C0070000003C4D6F64756C653E004150495F436F6E73756D65722E646C6C005061796D656E7454797065004150495F436F6E73756D65720041677265656D656E7444657461696C0041677265656D656E7444657461696C536F757263655265666572656E63650041677265656D656E744672657175656E63790041677265656D656E74536F757263650041677265656D656E745374617475730041677265656D656E745479706500436F6E73756D6572546F6B656E00436F6E73756D6572546F6B656E414348496E666F00436F6E73756D6572546F6B656E42696C6C696E67496E666F726D6174696F6E00436F6E73756D6572546F6B656E4343496E666F0045787465726E616C546F6B656E52657175657374005061796D656E740053746F72656450726F6365647572657300415049436F6E73756D65720041677265656D656E74006D73636F726C69620053797374656D004F626A656374006765745F4964007365745F4964006765745F416C696173007365745F416C696173006765745F4E616D65007365745F4E616D65006765745F4465736372697074696F6E007365745F4465736372697074696F6E002E63746F72003C49643E6B5F5F4261636B696E674669656C64003C416C6961733E6B5F5F4261636B696E674669656C64003C4E616D653E6B5F5F4261636B696E674669656C64003C4465736372697074696F6E3E6B5F5F4261636B696E674669656C6400496400416C696173004E616D65004465736372697074696F6E006765745F436F6E73756D6572546F6B656E007365745F436F6E73756D6572546F6B656E006765745F5061796D656E745472696573436F756E74007365745F5061796D656E745472696573436F756E74006765745F41677265656D656E744F7264696E616C007365745F41677265656D656E744F7264696E616C004461746554696D65006765745F4372656174656444617465007365745F43726561746564446174650053797374656D2E436F6C6C656374696F6E732E47656E65726963004C6973746031006765745F5061796D656E7473007365745F5061796D656E7473006765745F41677265656D656E7444657461696C536F757263655265666572656E6365007365745F41677265656D656E7444657461696C536F757263655265666572656E6365003C436F6E73756D6572546F6B656E3E6B5F5F4261636B696E674669656C64003C5061796D656E745472696573436F756E743E6B5F5F4261636B696E674669656C64003C41677265656D656E744F7264696E616C3E6B5F5F4261636B696E674669656C64003C43726561746564446174653E6B5F5F4261636B696E674669656C64003C5061796D656E74733E6B5F5F4261636B696E674669656C64003C41677265656D656E7444657461696C536F757263655265666572656E63653E6B5F5F4261636B696E674669656C64005061796D656E745472696573436F756E740041677265656D656E744F7264696E616C004372656174656444617465005061796D656E7473006765745F41677265656D656E7444657461696C4964007365745F41677265656D656E7444657461696C4964006765745F41677265656D656E74536F757263654964007365745F41677265656D656E74536F757263654964006765745F5265666572656E6365007365745F5265666572656E6365006765745F41677265656D656E74536F75726365007365745F41677265656D656E74536F75726365003C41677265656D656E7444657461696C49643E6B5F5F4261636B696E674669656C64003C41677265656D656E74536F7572636549643E6B5F5F4261636B696E674669656C64003C5265666572656E63653E6B5F5F4261636B696E674669656C64003C41677265656D656E74536F757263653E6B5F5F4261636B696E674669656C640041677265656D656E7444657461696C49640041677265656D656E74536F757263654964005265666572656E6365006765745F4C61707365007365745F4C61707365006765745F466163746F72007365745F466163746F72003C4C617073653E6B5F5F4261636B696E674669656C64003C466163746F723E6B5F5F4261636B696E674669656C64004C6170736500466163746F72006765745F546F6B656E007365745F546F6B656E006765745F5061796D656E7454797065007365745F5061796D656E7454797065006765745F436F6E73756D6572546F6B656E4343496E666F007365745F436F6E73756D6572546F6B656E4343496E666F006765745F436F6E73756D6572546F6B656E414348496E666F007365745F436F6E73756D6572546F6B656E414348496E666F006765745F436F6E73756D6572546F6B656E42696C6C696E67496E666F726D6174696F6E007365745F436F6E73756D6572546F6B656E42696C6C696E67496E666F726D6174696F6E003C546F6B656E3E6B5F5F4261636B696E674669656C64003C5061796D656E74547970653E6B5F5F4261636B696E674669656C64003C436F6E73756D6572546F6B656E4343496E666F3E6B5F5F4261636B696E674669656C64003C436F6E73756D6572546F6B656E414348496E666F3E6B5F5F4261636B696E674669656C64003C436F6E73756D6572546F6B656E42696C6C696E67496E666F726D6174696F6E3E6B5F5F4261636B696E674669656C6400546F6B656E006765745F526F7574696E674E756D626572007365745F526F7574696E674E756D626572006765745F42616E6B4163636F756E744E756D626572007365745F42616E6B4163636F756E744E756D626572003C526F7574696E674E756D6265723E6B5F5F4261636B696E674669656C64003C42616E6B4163636F756E744E756D6265723E6B5F5F4261636B696E674669656C6400526F7574696E674E756D6265720042616E6B4163636F756E744E756D626572004E756C6C61626C656031006765745F436F6E73756D6572546F6B656E4964007365745F436F6E73756D6572546F6B656E4964006765745F4163636F756E74007365745F4163636F756E74006765745F53747265657431007365745F53747265657431006765745F53747265657432007365745F53747265657432006765745F43697479007365745F43697479006765745F5374617465007365745F5374617465006765745F5A6970436F6465007365745F5A6970436F6465006765745F43726561746564557365724964007365745F43726561746564557365724964003C436F6E73756D6572546F6B656E49643E6B5F5F4261636B696E674669656C64003C4163636F756E743E6B5F5F4261636B696E674669656C64003C537472656574313E6B5F5F4261636B696E674669656C64003C537472656574323E6B5F5F4261636B696E674669656C64003C436974793E6B5F5F4261636B696E674669656C64003C53746174653E6B5F5F4261636B696E674669656C64003C5A6970436F64653E6B5F5F4261636B696E674669656C64003C437265617465645573657249643E6B5F5F4261636B696E674669656C6400436F6E73756D6572546F6B656E4964004163636F756E74005374726565743100537472656574320043697479005374617465005A6970436F64650043726561746564557365724964006765745F54797065007365745F54797065006765745F56656E646F72007365745F56656E646F72006765745F4C617374446967697473007365745F4C617374446967697473003C547970653E6B5F5F4261636B696E674669656C64003C56656E646F723E6B5F5F4261636B696E674669656C64003C4C6173744469676974733E6B5F5F4261636B696E674669656C6400547970650056656E646F72004C617374446967697473006765745F5061796D656E7454797065416C696173007365745F5061796D656E7454797065416C696173006765745F414348496E666F007365745F414348496E666F006765745F4343496E666F007365745F4343496E666F003C5061796D656E7454797065416C6961733E6B5F5F4261636B696E674669656C64003C414348496E666F3E6B5F5F4261636B696E674669656C64003C4343496E666F3E6B5F5F4261636B696E674669656C64005061796D656E7454797065416C69617300414348496E666F004343496E666F00446563696D616C006765745F416D6F756E74007365745F416D6F756E74006765745F537572636861726765007365745F537572636861726765006765745F41757468436F6465007365745F41757468436F6465006765745F546F74616C007365745F546F74616C003C416D6F756E743E6B5F5F4261636B696E674669656C64003C5375726368617267653E6B5F5F4261636B696E674669656C64003C41757468436F64653E6B5F5F4261636B696E674669656C64003C546F74616C3E6B5F5F4261636B696E674669656C6400416D6F756E74005375726368617267650041757468436F646500546F74616C0053797374656D2E446174610053797374656D2E446174612E53716C54797065730053716C537472696E67005365744167726565656D656E74004D6963726F736F66742E53716C5365727665722E5365727665720053716C4D657461446174610047657441677265656D656E744D6574614461746100434F4E54454E54545950450041475245454D454E544150490041475245454D454E54544553540043616C6C41677265656D656E744150490056616C69646174654A736F6E546F426553656E640054006765745F41677265656D656E74537461747573007365745F41677265656D656E74537461747573006765745F41677265656D656E7454797065007365745F41677265656D656E7454797065006765745F41677265656D656E744672657175656E6379007365745F41677265656D656E744672657175656E6379006765745F537562546F74616C007365745F537562546F74616C006765745F53494650657263656E74616765007365745F53494650657263656E74616765006765745F4E756D6265724F665061796D656E7473007365745F4E756D6265724F665061796D656E7473006765745F537461727444617465007365745F537461727444617465006765745F55706461746564557365724964007365745F55706461746564557365724964006765745F5570646174656444617465007365745F5570646174656444617465006765745F41677265656D656E7444657461696C73007365745F41677265656D656E7444657461696C73006765745F436F6E73756D6572546F6B656E73007365745F436F6E73756D6572546F6B656E73003C41677265656D656E745374617475733E6B5F5F4261636B696E674669656C64003C41677265656D656E74547970653E6B5F5F4261636B696E674669656C64003C41677265656D656E744672657175656E63793E6B5F5F4261636B696E674669656C64003C537562546F74616C3E6B5F5F4261636B696E674669656C64003C53494650657263656E746167653E6B5F5F4261636B696E674669656C64003C4E756D6265724F665061796D656E74733E6B5F5F4261636B696E674669656C64003C5374617274446174653E6B5F5F4261636B696E674669656C64003C557064617465645573657249643E6B5F5F4261636B696E674669656C64003C55706461746564446174653E6B5F5F4261636B696E674669656C64003C41677265656D656E7444657461696C733E6B5F5F4261636B696E674669656C64003C436F6E73756D6572546F6B656E733E6B5F5F4261636B696E674669656C6400537562546F74616C0053494650657263656E74616765004E756D6265724F665061796D656E74730053746172744461746500557064617465645573657249640055706461746564446174650041677265656D656E7444657461696C7300436F6E73756D6572546F6B656E730076616C75650055524C0041677265656D656E744A736F6E0075726C00546F6B656E6A736F6E006A736F6E00657863657074696F6E0053797374656D2E446961676E6F73746963730044656275676761626C6541747472696275746500446562756767696E674D6F6465730053797374656D2E52756E74696D652E436F6D70696C6572536572766963657300436F6D70696C6174696F6E52656C61786174696F6E734174747269627574650052756E74696D65436F6D7061746962696C69747941747472696275746500436F6D70696C657247656E6572617465644174747269627574650053716C50726F63656475726541747472696275746500546F537472696E670053716C446174615265636F72640053716C436F6E746578740053716C50697065006765745F506970650053656E64526573756C74735374617274006765745F497353656E64696E67526573756C74730053657456616C7565730053656E64526573756C7473526F770053656E64526573756C7473456E6400457863657074696F6E0053716C4462547970650053797374656D2E4E6574005765625265717565737400437265617465004874747057656252657175657374007365745F436F6E74656E7454797065007365745F4D6574686F640053797374656D2E494F0053747265616D004765745265717565737453747265616D0053747265616D577269746572005465787457726974657200577269746500466C7573680049446973706F7361626C6500446973706F736500576562526573706F6E736500476574526573706F6E73650048747470576562526573706F6E736500476574526573706F6E736553747265616D0053747265616D52656164657200546578745265616465720052656164546F456E6400496E743332005472795061727365004E6577746F6E736F66742E4A736F6E004A736F6E436F6E7665727400446573657269616C697A654F626A656374006765745F4D657373616765000017410067007200650065006D0065006E00740049004400003F6100700070006C00690063006100740069006F006E002F006A0073006F006E003B00200063006800610072007300650074003D007500740066002D003800010950004F00530054000000834F284CC74E5C4881CD99956AB64AF70008B77A5C561934E0890320000804200101080320000E042001010E0320000102060802060E032800080328000E0420001224052001011224042000110905200101110908200015120D0112380920010115120D01123804200012100520010112100306122403061109070615120D011238030612100428001224042800110908280015120D01123804280012100420001218052001011218030612180428001218042000120805200101120804200012300520010112300420001228052001011228042000122C05200101122C0306120803061230030612280306122C042800120804280012300428001228042800122C0320000A042001010A02060A0328000A0720001511110108082001011511110108060615111101080728001511110108042000111505200101111503061115042800111507000201111911190500001D121D3E6100700070006C00690063006100740069006F006E002F006A0073006F006E003B00200063006800610072007300650074003D007500740066002D0038005268007400740070003A002F002F0044004500560041004D0053005300300036002E006400650076002E006C006F00630061006C003A0038003000350034002F00410067007200650065006D0065006E007400843C7B002200410067007200650065006D0065006E007400540079007000650022003A007B00220041006C0069006100730022003A0022005000410052005400490041004C0022007D002C002200410067007200650065006D0065006E00740053006F00750072006300650022003A007B00220041006C0069006100730022003A0022004500520043005F0057004500420022007D002C00220053007400610072007400440061007400650022003A00220032003000310038002D00300039002D00300037005400300034003A00300030003A00300030002E003000300030005A0022002C002200410067007200650065006D0065006E0074004600720065007100750065006E006300790022003A007B0022004E0061006D00650022003A0022004D006F006E00740068006C00790022007D002C0022004100630063006F0075006E00740022003A003100300038003000350039003000330033002C002200610067007200650065006D0065006E007400440065007400610069006C00730022003A005B007B00220063006F006E00730075006D006500720054006F006B0065006E0022003A007B0022004900640022003A00310032003100380036007D002C0022007000610079006D0065006E007400540079007000650022003A007B00220041006C0069006100730022003A0022004300430022007D002C00220063006F006E00730075006D006500720054006F006B0065006E004300430049006E0066006F0022003A007B002200540079007000650022003A00220043005200450044004900540022002C002200560065006E0064006F00720022003A002200560049005300410022007D002C00220063006F006E00730075006D006500720054006F006B0065006E0041004300480049006E0066006F0022003A007B002200420061006E006B004100630063006F0075006E0074004E0075006D0062006500720022003A00310035003400350033003400350033003400350033002C00220052006F007500740069006E0067004E0075006D0062006500720022003A00350034003600340036003500340035003600340035007D002C00220063006F006E00730075006D006500720054006F006B0065006E00420069006C006C0069006E00670049006E0066006F0072006D006100740069006F006E0022003A007B0022004100630063006F0075006E00740022003A003100380036003100360032003900330031002C0022004E0061006D00650022003A00220043006F006E00730075006D006500720020004E0061006D00650022007D002C00220041006D006F0075006E00740022003A00330035002E00350034002C00220053007500720063006800610072006700650022003A00310032002C002200640075006500440061007400650022003A00220032003000310038002D00300039002D00300037005400300034003A00300030003A00300030002E003000300030005A0022007D005D007D0009000215111101080E0E07100102020E100E042000121C05200101121C042000122005200101122004200012140520010112140320000604200101060820001511110111090920010115111101110908200015120D01120C0920010115120D01120C08200015120D0112240920010115120D0112240306121C03061220030612140206060706151111011109070615120D01120C070615120D011224042800121C042800122004280012140328000608280015111101110908280015120D01120C08280015120D0112240520010111250401000000030701080307010E0407011224040701110908070115120D01123804070112100407011218040701120804070112300407011228040701122C0307010A07070115111101080407011115062001011D121D040000124105200101123903200002052001081D1C0E0705151111010812391245021D1C072003010E11490A0B07031D121D1D121D1D121D050001124D0E04200012550520010112550420001265060002020E100805151111010805200101130014070908125112591269126D0E12451511110108020830AD4FE6B2A6AEED061001011E000E040A011E000707031E00124502040701121C040701122004070112140307010608070115111101110908070115120D01120C08070115120D0112240801000701000000000801000800000000001E01000100540216577261704E6F6E457863657074696F6E5468726F77730100000000B4BF925B00000000020000001C010000F46A0000F44C00005253445393A77F0767E48B4FA5B5030A7606B85F01000000633A5C55736572735C65313030333435315C446F63756D656E74735C56697375616C2053747564696F20323031355C50726F6A656374735C4150495F436F6E73756D65725C4150495F436F6E73756D65725C6F626A5C44656275675C4150495F436F6E73756D65722E7064620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000386C000000000000000000004E6C0000002000000000000000000000000000000000000000000000406C00000000000000005F436F72446C6C4D61696E006D73636F7265652E646C6C0000000000FF250020001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001001000000018000080000000000000000000000000000001000100000030000080000000000000000000000000000001000000000048000000588000005C02000000000000000000005C0234000000560053005F00560045005200530049004F004E005F0049004E0046004F0000000000BD04EFFE00000100000000000000000000000000000000003F000000000000000400000002000000000000000000000000000000440000000100560061007200460069006C00650049006E0066006F00000000002400040000005400720061006E0073006C006100740069006F006E00000000000000B004BC010000010053007400720069006E006700460069006C00650049006E0066006F0000009801000001003000300030003000300034006200300000002C0002000100460069006C0065004400650073006300720069007000740069006F006E000000000020000000300008000100460069006C006500560065007200730069006F006E000000000030002E0030002E0030002E003000000044001100010049006E007400650072006E0061006C004E0061006D00650000004100500049005F0043006F006E00730075006D00650072002E0064006C006C00000000002800020001004C006500670061006C0043006F0070007900720069006700680074000000200000004C00110001004F0072006900670069006E0061006C00460069006C0065006E0061006D00650000004100500049005F0043006F006E00730075006D00650072002E0064006C006C0000000000340008000100500072006F006400750063007400560065007200730069006F006E00000030002E0030002E0030002E003000000038000800010041007300730065006D0062006C0079002000560065007200730069006F006E00000030002E0030002E0030002E00300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000C000000603C00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
96 |
97 |
98 | GO
99 | ALTER ASSEMBLY [API_Consumer]
100 | DROP FILE ALL
101 | ADD FILE FROM 0x4D6963726F736F667420432F432B2B204D534620372E30300D0A1A445300000000020000020000001F0000009C000000000000001C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF380000E0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0BCA3101380000000010000000100000000000001000FFFF04000000FFFF03000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000BCA3101380000000010000000100000000000001100FFFF04000000FFFF0300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000942E3101B4BF925B0100000093A77F0767E48B4FA5B5030A7606B85F00000000000000000100000001000000000000000000000000000000DC51330100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000BCA310138000000001000000010000000000000FFFFFFFF04000000FFFF030000000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000BCA310138000000001000000010000000000000FFFFFFFF04000000FFFF030000000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F862513FC607D311905300C04FA302A1C4454B99E9E6D211903F00C04FA302A10B9D865A1166D311BD2A0000F80849BD60A66E40CF64824CB6F042D48172A7991000000000000000223462C974F8C73C39C924C5BA4A4FD700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F862513FC607D311905300C04FA302A1C4454B99E9E6D211903F00C04FA302A10B9D865A1166D311BD2A0000F80849BD60A66E40CF64824CB6F042D48172A7991000000000000000C0340EEDC9C9E0B9A3BD6174201EC636000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000870100000000000087010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FEEFFEEF01000000B401000000633A5C55736572735C65313030333435315C446F63756D656E74735C56697375616C2053747564696F20323031355C50726F6A656374735C4150495F436F6E73756D65725C4150495F436F6E73756D65725C436F6E73756D6572735C415049436F6E73756D65722E63730000633A5C75736572735C65313030333435315C646F63756D656E74735C76697375616C2073747564696F20323031355C70726F6A656374735C6170695F636F6E73756D65725C6170695F636F6E73756D65725C636F6E73756D6572735C617069636F6E73756D65722E637300633A5C55736572735C65313030333435315C446F63756D656E74735C56697375616C2053747564696F20323031355C50726F6A656374735C4150495F436F6E73756D65725C4150495F436F6E73756D65725C50726F636564757265735C5365744167726565656D656E742E637300633A5C75736572735C65313030333435315C646F63756D656E74735C76697375616C2073747564696F20323031355C70726F6A656374735C6170695F636F6E73756D65725C6170695F636F6E73756D65725C70726F636564757265735C7365746167726565656D656E742E63730007000000D80000006C000000010000006D00000046010000000000000000000005000000000000000000000000000000000000000000000000000000000000001BE23001AC0000003B1E066ED646D40101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000040000000100000006000000000000006D000000280000001BE23001FC25B12158000000010000006C0000006D00000065000000000000000000000046010000280000001BE23001CE5EF5C458000000D80000006C0000004601000065000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000003A002A11000000003803000000000000BC0000000000000000000000A1000006A4000000010000000043616C6C41677265656D656E744150490000001600031104000000F4020000BC000000A4000000010000000A0024115553797374656D001E0024115553797374656D2E436F6C6C656374696F6E732E47656E6572696300120024115553797374656D2E546578740000000012002411554150495F436F6E73756D657200000016002411554E6577746F6E736F66742E4A736F6E000000000E0024115553797374656D2E494F00000E0024115553797374656D2E4E657400160024115553797374656D2E4E65742E48747470000000001A0024115553797374656D2E546872656164696E672E5461736B73001E002411554D6963726F736F66742E53716C5365727665722E53657276657200120024115553797374656D2E44617461000000001E002011070000001100001100000000000004004353243124303030300000001E002011080000001100001100000000000004004353243424303030310000001E0020110000000011000011000000000000000041677265656D656E744944001600031140000000BC020000A2000000A8000000010000001A002011010000001100001100000000000000007265717565737400220020110300000011000011000000000000000068747470526573706F6E73650000000016000311AC0100004002000032000000CD00000001000000220020110200000011000011000000000000000073747265616D577269746572000000000200060016000311AC010000B80200003E0000000B01000001000000220020110400000011000011000000000000000073747265616D526561646572000000001600031144020000B40200001A00000018010000010000001A00201105000000110000110000000000000000726573756C7400000200060002000600020006001600031140000000F0020000040000004E0100000100000016002011060000001100001100000000000000006578000002000600020006003E000404C93FEAC6B359D649BC250902BBABB460000000004D00440032000000040200000400000010000000020000000B00000004027F050C0000009E000006020006003E002A11000000005404000000000000270000000000000000000000A200000660010000010000000056616C69646174654A736F6E546F426553656E64000000160003113C030000200400002700000060010000010000001E00201102000000120000110000000000000400435324312430303030000000160003117C030000E80300000900000061010000010000001A002011000000001200001100000000000000005F746F6B656E000002000600160003117C0300001C040000120000006D0100000100000016002011010000001200001100000000000000006578000002000600020006002E000404C93FEAC6B359D649BC250902BBABB460000000004D004400320000000401000004017F050C000000A100000602000600F200000074010000A400000001000100BC000000000000001D00000068010000000000001600008001000000170000800400000019000080050000001A000080110000001B0000801D0000001C000080290000001E000080350000001F00008036000000200000803E00000021000080450000002200008046000000EEEFFE805A000000EEEFFE805B000000240000806700000025000080740000002600008075000000270000807E000000280000808D000000290000808E000000EEEFFE80A4000000EEEFFE80A50000002A000080A6000000EEEFFE80A80000002B000080AA0000002C000080AB0000002D000080AE000000EEEFFE80AF00000030000080B90000004800008009000A000D0024000D000E0011005100110033001100290018005700110012001500330015002A0011001200000000000000000011004B0018005D001100120015003B00150046001100120000000000000000000D000E00000000000D0021000D000E0011001A00000000000D00200009000A00F2000000B4000000600100000100010027000000000000000D000000A8000000000000004B000080010000004D000080020000004E000080090000004F0000800A000000EEEFFE800C000000500000800D000000510000800E000000520000801B000000530000801F000000EEEFFE80200000005600008024000000EEEFFE80250000005700008009000A000D000E00110045000D000E00000000000D0021000D000E001100330011001E00000000000D0019000000000009000A00F4000000080000000100000000000000100000000000000020000000380000005C00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000036002A1100000000E0010000000000008200000000000000000000009E0000060000000001000000005365744167726565656D656E7400001600031104000000AC0100008200000000000000010000000A0024115553797374656D00120024115553797374656D2E44617461000000001A0024115553797374656D2E446174612E53716C436C69656E7400001A0024115553797374656D2E446174612E53716C54797065730000001E002411554D6963726F736F66742E53716C5365727665722E5365727665720012002411554150495F436F6E73756D65720000001E002011030000000F00001100000000000004004353243424303030300000001E002011040000000F0000110000000000000400435324302430303031000000160003113C000000740100007900000001000000010000001E002011000000000F000011000000000000000061677265656D656E744944001A002011010000000F00001100000000000000005265636F7264000002000600160003113C000000A8010000030000007D0000000100000016002011020000000F00001100000000000000006578000002000600020006002E000404C93FEAC6B359D649BC250902BBABB460000000004D0044003200000004010000040000000C00000001000600020006003E002A1100000000D0020000000000002200000000000000000000009F00000682000000010000000047657441677265656D656E744D6574614461746100000016000311E40100009C0200002200000082000000010000001E002011010000001000001100000000000004004353243124303030300000001E002011020000001000001100000000000004004353243024303030310000001E002011000000001000001100000000000000004D6574614461746100000000020006002E000404C93FEAC6B359D649BC250902BBABB460000000004D0044003200000004010000040193050C0000009E00000602000600F2000000FC0000000000000001000100820000000000000013000000F0000000000000000C000080010000000E000080020000000F00008022000000110000802D00000013000080390000001500008047000000EEEFFE804A000000160000804B0000001A000080610000001C0000806D0000001F000080780000002000008079000000220000807A000000EEEFFE807C000000230000807D000000240000807E0000002500008080000000EEEFFE8081000000270000800500060009000A000D0067000D004E000D0036000D003200000000000D000E0015002E0015003C00110032000D000E0009000A000000000009001D0009000A000D0016000000000005000600F20000004800000082000000010001002200000000000000040000003C000000000000002A000080010000002B0000891C0000003600008020000000370000800500060009000B000900190005000600F400000008000000D800000000000000100000007400000090000000A8000000CC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF1A092FF140000000240200000100000001000000CD00000001000000390000000100000091000000010000002100000001000000A9000000010000005D000000010000007500000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000008000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000800000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0000001800000024000000300000003C00000048000000540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001E0025110000000004000000020043616C6C41677265656D656E74415049000016002911000000000400000002003036303030306131000022002511000000003C030000020056616C69646174654A736F6E546F426553656E64000016002911000000003C0300000200303630303030613200001A002511000000000400000001005365744167726565656D656E74001600291100000000040000000100303630303030396500002200251100000000E4010000010047657441677265656D656E744D6574614461746100001600291100000000E4010000010030363030303039660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000FFFFFFFF1A092FF10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFF77093101010000000D00008E0E0032060F000000C0000000740000002C000000F0000000000000000000000016000000190000000000EEC00000000000000000FFFF000000000000FFFFFFFF00000000FFFF0000000000000000000000000C00D402000000000000640100000100000038033805000000000000000053746F72656450726F6365647572657300434441353133364600000000000000FFFF000000000000FFFFFFFF00000000FFFF0000000000000000000000000B0058040000000000004802000001000000F803380500000000000000004150495F436F6E73756D65722E415049436F6E73756D65720034363530353139440000002DBA2EF1010000040000000082000000000000000000000400000000000000000100000482000000220000000000000000000004000000000000000001000004A4000000BC0000000000000001000004000000000000000001000004600100002700000000000000010000040000000000000000020002000D01000000000100FFFFFFFF00000000870100000802000000000000FFFFFFFF00000000FFFFFFFF0200020000000100010001006B00000000000000633A5C55736572735C65313030333435315C446F63756D656E74735C56697375616C2053747564696F20323031355C50726F6A656374735C4150495F436F6E73756D65725C4150495F436F6E73756D65725C436F6E73756D6572735C415049436F6E73756D65722E637300633A5C55736572735C65313030333435315C446F63756D656E74735C56697375616C2053747564696F20323031355C50726F6A656374735C4150495F436F6E73756D65725C4150495F436F6E73756D65725C50726F636564757265735C5365744167726565656D656E742E637300000000FEEFFEEF010000000100000000010000000000000000000000FFFFFFFFFFFFFFFFFFFF0A00FFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000942E3101B4BF925B0100000093A77F0767E48B4FA5B5030A7606B85F110100002F4C696E6B496E666F002F6E616D6573002F7372632F686561646572626C6F636B002F7372632F66696C65732F633A5C75736572735C65313030333435315C646F63756D656E74735C76697375616C2073747564696F20323031355C70726F6A656374735C6170695F636F6E73756D65725C6170695F636F6E73756D65725C636F6E73756D6572735C617069636F6E73756D65722E6373002F7372632F66696C65732F633A5C75736572735C65313030333435315C646F63756D656E74735C76697375616C2073747564696F20323031355C70726F6A656374735C6170695F636F6E73756D65725C6170695F636F6E73756D65725C70726F636564757265735C7365746167726565656D656E742E637300050000000A000000010000006601000000000000110000000700000000000000050000000A000000060000002200000008000000980000000900000000000000DC5133010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000200000007501000038000000BF0200003800000000000000E4010000AC000000580000005800000028000000B40600004C040000740200002C000000E4000000030000001A000000060000001800000019000000070000000B0000000C00000008000000090000000A0000000D0000000E0000000F000000100000001100000012000000130000001400000015000000170000001600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001B0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 AS N'API_Consumer.pdb';
102 |
103 |
104 | GO
105 | PRINT N'Creating [dbo].[SetAgreeement]...';
106 |
107 |
108 | GO
109 | CREATE PROCEDURE [dbo].[SetAgreeement]
110 | @URL NVARCHAR (MAX) NULL, @AgreementJson NVARCHAR (MAX) NULL
111 | AS EXTERNAL NAME [API_Consumer].[StoredProcedures].[SetAgreeement]
112 |
113 |
114 | GO
115 | PRINT N'Update complete.';
116 |
117 |
118 | GO
119 |
--------------------------------------------------------------------------------
/API_Consumer/bin/Debug/API_Consumer_3.publish.sql:
--------------------------------------------------------------------------------
1 | /*
2 | Deployment script for TEstDB
3 |
4 | This code was generated by a tool.
5 | Changes to this file may cause incorrect behavior and will be lost if
6 | the code is regenerated.
7 | */
8 |
9 | GO
10 | SET ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CONCAT_NULL_YIELDS_NULL, QUOTED_IDENTIFIER ON;
11 |
12 | SET NUMERIC_ROUNDABORT OFF;
13 |
14 |
15 | GO
16 | :setvar DatabaseName "TEstDB"
17 | :setvar DefaultFilePrefix "TEstDB"
18 | :setvar DefaultDataPath "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER_2017\MSSQL\DATA\"
19 | :setvar DefaultLogPath "C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER_2017\MSSQL\DATA\"
20 |
21 | GO
22 | :on error exit
23 | GO
24 | /*
25 | Detect SQLCMD mode and disable script execution if SQLCMD mode is not supported.
26 | To re-enable the script after enabling SQLCMD mode, execute the following:
27 | SET NOEXEC OFF;
28 | */
29 | :setvar __IsSqlCmdEnabled "True"
30 | GO
31 | IF N'$(__IsSqlCmdEnabled)' NOT LIKE N'True'
32 | BEGIN
33 | PRINT N'SQLCMD mode must be enabled to successfully execute this script.';
34 | SET NOEXEC ON;
35 | END
36 |
37 |
38 | GO
39 | USE [$(DatabaseName)];
40 |
41 |
42 | GO
43 | IF EXISTS (SELECT 1
44 | FROM [master].[dbo].[sysdatabases]
45 | WHERE [name] = N'$(DatabaseName)')
46 | BEGIN
47 | ALTER DATABASE [$(DatabaseName)]
48 | SET ANSI_NULLS ON,
49 | ANSI_PADDING ON,
50 | ANSI_WARNINGS ON,
51 | ARITHABORT ON,
52 | CONCAT_NULL_YIELDS_NULL ON,
53 | QUOTED_IDENTIFIER ON,
54 | ANSI_NULL_DEFAULT ON,
55 | CURSOR_DEFAULT LOCAL
56 | WITH ROLLBACK IMMEDIATE;
57 | END
58 |
59 |
60 | GO
61 | IF EXISTS (SELECT 1
62 | FROM [master].[dbo].[sysdatabases]
63 | WHERE [name] = N'$(DatabaseName)')
64 | BEGIN
65 | ALTER DATABASE [$(DatabaseName)]
66 | SET PAGE_VERIFY NONE,
67 | DISABLE_BROKER
68 | WITH ROLLBACK IMMEDIATE;
69 | END
70 |
71 |
72 | GO
73 | IF IS_SRVROLEMEMBER(N'sysadmin') = 1
74 | BEGIN
75 | IF EXISTS (SELECT 1
76 | FROM [master].[dbo].[sysdatabases]
77 | WHERE [name] = N'$(DatabaseName)')
78 | BEGIN
79 | EXECUTE sp_executesql N'ALTER DATABASE [$(DatabaseName)]
80 | SET TRUSTWORTHY OFF
81 | WITH ROLLBACK IMMEDIATE';
82 | END
83 | END
84 | ELSE
85 | BEGIN
86 | PRINT N'The database settings cannot be modified. You must be a SysAdmin to apply these settings.';
87 | END
88 |
89 |
90 | GO
91 | ALTER DATABASE [$(DatabaseName)]
92 | SET TARGET_RECOVERY_TIME = 0 SECONDS
93 | WITH ROLLBACK IMMEDIATE;
94 |
95 |
96 | GO
97 | IF EXISTS (SELECT 1
98 | FROM [master].[dbo].[sysdatabases]
99 | WHERE [name] = N'$(DatabaseName)')
100 | BEGIN
101 | ALTER DATABASE [$(DatabaseName)]
102 | SET QUERY_STORE (CLEANUP_POLICY = (STALE_QUERY_THRESHOLD_DAYS = 367))
103 | WITH ROLLBACK IMMEDIATE;
104 | END
105 |
106 |
107 | GO
108 | PRINT N'Creating [dbo].[APICaller_GET_Json]...';
109 |
110 |
111 | GO
112 | CREATE PROCEDURE [dbo].[APICaller_GET_Json]
113 | @URL NVARCHAR (MAX) NULL
114 | AS EXTERNAL NAME [API_Consumer].[StoredProcedures].[APICaller_GET_Json]
115 |
116 |
117 | GO
118 | PRINT N'Creating [dbo].[APICaller_POST_Json]...';
119 |
120 |
121 | GO
122 | CREATE PROCEDURE [dbo].[APICaller_POST_Json]
123 | @URL NVARCHAR (MAX) NULL, @AgreementJson NVARCHAR (MAX) NULL
124 | AS EXTERNAL NAME [API_Consumer].[StoredProcedures].[APICaller_POST_Json]
125 |
126 |
127 | GO
128 | PRINT N'Creating [dbo].[GET_BankInfoBasicByRN]...';
129 |
130 |
131 | GO
132 | CREATE PROCEDURE [dbo].[GET_BankInfoBasicByRN]
133 | @URL NVARCHAR (MAX) NULL, @rn NVARCHAR (MAX) NULL
134 | AS EXTERNAL NAME [API_Consumer].[StoredProcedures].[GET_BankInfoBasicByRN]
135 |
136 |
137 | GO
138 | PRINT N'Update complete.';
139 |
140 |
141 | GO
142 |
--------------------------------------------------------------------------------
/API_Consumer/bin/Debug/DeploymentReport.txt:
--------------------------------------------------------------------------------
1 | ** Highlights
2 | Tables that will be rebuilt
3 | None
4 | Clustered indexes that will be dropped
5 | None
6 | Clustered indexes that will be created
7 | None
8 | Possible data issues
9 | None
10 |
11 | ** User actions
12 | Create
13 | [API_Consumer] (Assembly)
14 | [dbo].[SetAgreeement] (Procedure)
15 |
16 | ** Supporting actions
17 |
--------------------------------------------------------------------------------
/API_Consumer/bin/Debug/DeploymentReport_1.txt:
--------------------------------------------------------------------------------
1 | ** Highlights
2 | Tables that will be rebuilt
3 | None
4 | Clustered indexes that will be dropped
5 | None
6 | Clustered indexes that will be created
7 | None
8 | Possible data issues
9 | None
10 |
11 | ** User actions
12 | Create
13 | [API_Consumer] (Assembly)
14 | [dbo].[SetAgreeement] (Procedure)
15 |
16 | ** Supporting actions
17 |
--------------------------------------------------------------------------------
/API_Consumer/bin/Debug/DeploymentReport_2.txt:
--------------------------------------------------------------------------------
1 | ** Highlights
2 | Tables that will be rebuilt
3 | None
4 | Clustered indexes that will be dropped
5 | None
6 | Clustered indexes that will be created
7 | None
8 | Possible data issues
9 | None
10 |
11 | ** User actions
12 | Create
13 | [API_Consumer] (Assembly)
14 | [dbo].[APICaller_POST_Json] (Procedure)
15 | [dbo].[GET_BankInfoBasicByRN] (Procedure)
16 |
17 | ** Supporting actions
18 |
--------------------------------------------------------------------------------
/API_Consumer/bin/Debug/DeploymentReport_3.txt:
--------------------------------------------------------------------------------
1 | ** Highlights
2 | Tables that will be rebuilt
3 | None
4 | Clustered indexes that will be dropped
5 | None
6 | Clustered indexes that will be created
7 | None
8 | Possible data issues
9 | None
10 |
11 | ** User actions
12 | Create
13 | [dbo].[APICaller_GET_Json] (Procedure)
14 | [dbo].[APICaller_POST_Json] (Procedure)
15 | [dbo].[GET_BankInfoBasicByRN] (Procedure)
16 |
17 | ** Supporting actions
18 |
--------------------------------------------------------------------------------
/API_Consumer/bin/Debug/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/bin/Debug/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/API_Consumer/bin/Debug/SQL-APIConsumer.dacpac:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/bin/Debug/SQL-APIConsumer.dacpac
--------------------------------------------------------------------------------
/API_Consumer/bin/Debug/System.Net.Http.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/bin/Debug/System.Net.Http.dll
--------------------------------------------------------------------------------
/API_Consumer/bin/Debug/es/System.Net.Http.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/bin/Debug/es/System.Net.Http.resources.dll
--------------------------------------------------------------------------------
/API_Consumer/dll/APIConsumer.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/dll/APIConsumer.dll
--------------------------------------------------------------------------------
/API_Consumer/dll/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/dll/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/API_Consumer/dll/System.Net.Http.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/dll/System.Net.Http.dll
--------------------------------------------------------------------------------
/API_Consumer/obj/Debug/API_Consumer.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/obj/Debug/API_Consumer.dll
--------------------------------------------------------------------------------
/API_Consumer/obj/Debug/API_Consumer.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/obj/Debug/API_Consumer.pdb
--------------------------------------------------------------------------------
/API_Consumer/obj/Debug/API_Consumer.sqlproj.CopyComplete:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/obj/Debug/API_Consumer.sqlproj.CopyComplete
--------------------------------------------------------------------------------
/API_Consumer/obj/Debug/API_Consumer.sqlproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | c:\users\e1003451\documents\visual studio 2015\Projects\API_Consumer\API_Consumer\bin\Debug\API_Consumer.dacpac
2 | c:\users\e1003451\documents\visual studio 2015\Projects\API_Consumer\API_Consumer\bin\Debug\API_Consumer.dll
3 | c:\users\e1003451\documents\visual studio 2015\Projects\API_Consumer\API_Consumer\bin\Debug\API_Consumer.pdb
4 | c:\users\e1003451\documents\visual studio 2015\Projects\API_Consumer\API_Consumer\obj\Debug\API_Consumer.dll
5 | c:\users\e1003451\documents\visual studio 2015\Projects\API_Consumer\API_Consumer\obj\Debug\API_Consumer.pdb
6 | C:\Users\e1003451\Documents\visual studio 2015\Projects\API_Consumer\API_Consumer\obj\Debug\Model.xml
7 | C:\Users\e1003451\Documents\visual studio 2015\Projects\API_Consumer\API_Consumer\obj\Debug\refactor.xml
8 | C:\Users\e1003451\Documents\visual studio 2015\Projects\API_Consumer\API_Consumer\obj\Debug\postdeploy.sql
9 | C:\Users\e1003451\Documents\visual studio 2015\Projects\API_Consumer\API_Consumer\obj\Debug\predeploy.sql
10 | D:\Project\API_Consumer\API_Consumer\bin\Debug\API_Consumer.dacpac
11 | D:\Project\API_Consumer\API_Consumer\bin\Debug\API_Consumer.dll
12 | D:\Project\API_Consumer\API_Consumer\bin\Debug\API_Consumer.pdb
13 | D:\Project\API_Consumer\API_Consumer\bin\Debug\Newtonsoft.Json.dll
14 | D:\Project\API_Consumer\API_Consumer\bin\Debug\System.Net.Http.dll
15 | D:\Project\API_Consumer\API_Consumer\bin\Debug\System.Net.Http.xml
16 | D:\Project\API_Consumer\API_Consumer\bin\Debug\es\System.Net.Http.resources.dll
17 | D:\Project\API_Consumer\API_Consumer\obj\Debug\API_Consumer.sqlproj.CopyComplete
18 | D:\Project\API_Consumer\API_Consumer\obj\Debug\API_Consumer.dll
19 | D:\Project\API_Consumer\API_Consumer\obj\Debug\API_Consumer.pdb
20 | D:\Project\API_Consumer\API_Consumer\obj\Debug\Model.xml
21 | D:\Project\API_Consumer\API_Consumer\obj\Debug\refactor.xml
22 | D:\Project\API_Consumer\API_Consumer\obj\Debug\postdeploy.sql
23 | D:\Project\API_Consumer\API_Consumer\obj\Debug\predeploy.sql
24 |
--------------------------------------------------------------------------------
/API_Consumer/obj/Debug/API_Consumer.sqlprojResolveAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/obj/Debug/API_Consumer.sqlprojResolveAssemblyReference.cache
--------------------------------------------------------------------------------
/API_Consumer/obj/Debug/SQL-APIConsumer.sqlproj.CopyComplete:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/API_Consumer/obj/Debug/SQL-APIConsumer.sqlproj.CopyComplete
--------------------------------------------------------------------------------
/API_Consumer/obj/Debug/SQL-APIConsumer.sqlproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | D:\Project\API_Consumer\API_Consumer\bin\Debug\SQL-APIConsumer.dacpac
2 | D:\Project\API_Consumer\API_Consumer\bin\Debug\API_Consumer.dll
3 | D:\Project\API_Consumer\API_Consumer\bin\Debug\API_Consumer.pdb
4 | D:\Project\API_Consumer\API_Consumer\bin\Debug\Newtonsoft.Json.dll
5 | D:\Project\API_Consumer\API_Consumer\bin\Debug\System.Net.Http.dll
6 | D:\Project\API_Consumer\API_Consumer\bin\Debug\System.Net.Http.xml
7 | D:\Project\API_Consumer\API_Consumer\bin\Debug\es\System.Net.Http.resources.dll
8 | D:\Project\API_Consumer\API_Consumer\obj\Debug\SQL-APIConsumer.sqlprojResolveAssemblyReference.cache
9 | D:\Project\API_Consumer\API_Consumer\obj\Debug\Model.xml
10 | D:\Project\API_Consumer\API_Consumer\obj\Debug\refactor.xml
11 | D:\Project\API_Consumer\API_Consumer\obj\Debug\postdeploy.sql
12 | D:\Project\API_Consumer\API_Consumer\obj\Debug\predeploy.sql
13 | D:\Project\API_Consumer\API_Consumer\obj\Debug\SQL-APIConsumer.sqlproj.CopyComplete
14 | D:\Project\API_Consumer\API_Consumer\obj\Debug\API_Consumer.dll
15 | D:\Project\API_Consumer\API_Consumer\obj\Debug\API_Consumer.pdb
16 | D:\Project\docker-mastery\SQL-APIConsumer\API_Consumer\bin\Debug\SQL-APIConsumer.dacpac
17 | D:\Project\docker-mastery\SQL-APIConsumer\API_Consumer\bin\Debug\API_Consumer.dll
18 | D:\Project\docker-mastery\SQL-APIConsumer\API_Consumer\bin\Debug\API_Consumer.pdb
19 | D:\Project\docker-mastery\SQL-APIConsumer\API_Consumer\bin\Debug\Newtonsoft.Json.dll
20 | D:\Project\docker-mastery\SQL-APIConsumer\API_Consumer\bin\Debug\System.Net.Http.dll
21 | D:\Project\docker-mastery\SQL-APIConsumer\API_Consumer\bin\Debug\System.Net.Http.xml
22 | D:\Project\docker-mastery\SQL-APIConsumer\API_Consumer\bin\Debug\es\System.Net.Http.resources.dll
23 | D:\Project\docker-mastery\SQL-APIConsumer\API_Consumer\obj\Debug\SQL-APIConsumer.sqlproj.CoreCompileInputs.cache
24 | D:\Project\docker-mastery\SQL-APIConsumer\API_Consumer\obj\Debug\SQL-APIConsumer.sqlproj.CopyComplete
25 | D:\Project\docker-mastery\SQL-APIConsumer\API_Consumer\obj\Debug\API_Consumer.dll
26 | D:\Project\docker-mastery\SQL-APIConsumer\API_Consumer\obj\Debug\API_Consumer.pdb
27 | D:\Project\docker-mastery\SQL-APIConsumer\API_Consumer\obj\Debug\Model.xml
28 | D:\Project\docker-mastery\SQL-APIConsumer\API_Consumer\obj\Debug\refactor.xml
29 | D:\Project\docker-mastery\SQL-APIConsumer\API_Consumer\obj\Debug\postdeploy.sql
30 | D:\Project\docker-mastery\SQL-APIConsumer\API_Consumer\obj\Debug\predeploy.sql
31 | C:\Users\gdiaz\Documents\SQL Server Management Studio\SQL-APIConsumer-master\SQL-APIConsumer\API_Consumer\bin\Debug\SQL-APIConsumer.dacpac
32 | C:\Users\gdiaz\Documents\SQL Server Management Studio\SQL-APIConsumer-master\SQL-APIConsumer\API_Consumer\bin\Debug\API_Consumer.dll
33 | C:\Users\gdiaz\Documents\SQL Server Management Studio\SQL-APIConsumer-master\SQL-APIConsumer\API_Consumer\bin\Debug\API_Consumer.pdb
34 | C:\Users\gdiaz\Documents\SQL Server Management Studio\SQL-APIConsumer-master\SQL-APIConsumer\API_Consumer\bin\Debug\Newtonsoft.Json.dll
35 | C:\Users\gdiaz\Documents\SQL Server Management Studio\SQL-APIConsumer-master\SQL-APIConsumer\API_Consumer\bin\Debug\System.Net.Http.dll
36 | C:\Users\gdiaz\Documents\SQL Server Management Studio\SQL-APIConsumer-master\SQL-APIConsumer\API_Consumer\bin\Debug\System.Net.Http.xml
37 | C:\Users\gdiaz\Documents\SQL Server Management Studio\SQL-APIConsumer-master\SQL-APIConsumer\API_Consumer\bin\Debug\es\System.Net.Http.resources.dll
38 | C:\Users\gdiaz\Documents\SQL Server Management Studio\SQL-APIConsumer-master\SQL-APIConsumer\API_Consumer\obj\Debug\SQL-APIConsumer.sqlproj.CoreCompileInputs.cache
39 | C:\Users\gdiaz\Documents\SQL Server Management Studio\SQL-APIConsumer-master\SQL-APIConsumer\API_Consumer\obj\Debug\SQL-APIConsumer.sqlproj.CopyComplete
40 | C:\Users\gdiaz\Documents\SQL Server Management Studio\SQL-APIConsumer-master\SQL-APIConsumer\API_Consumer\obj\Debug\API_Consumer.dll
41 | C:\Users\gdiaz\Documents\SQL Server Management Studio\SQL-APIConsumer-master\SQL-APIConsumer\API_Consumer\obj\Debug\API_Consumer.pdb
42 |
--------------------------------------------------------------------------------
/Diagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/Diagram.png
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Geraldo Diaz
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SQL-APIConsumer
2 |
3 | Welcome to SQL-APIConsumer project!. It's Database Project built in C# whose main purpose it's allow consuming API GET/POST methods on SQL Server through CLR generics stored procedures. Keep in mind that it was developed and tested on **SQL Server 2016 and later versions**. If you need to deploy in an older version read the **Built with** section.
4 |
5 | 
6 |
7 | ## Getting Started
8 |
9 | The main procedure of this project is APICaller_Web_Extended, which can be used to call API of different web methods. It return an extended result including headers, and data of the server, within the result. In case we do need all these details, just need the results, instead we could use APICaller_WebMethod.
10 |
11 | With these two extended procedures we are able to change the content-type, through the header parameter.
12 |
13 | 1. **SqlInt32 APICaller_Web_Extended(SqlString httpMethod, SqlString URL, SqlString Headers, SqlString JsonBody)**
14 | 1. **SqlInt32 APICaller_WebMethod(SqlString httpMethod, SqlString URL, SqlString JsonBody)**
15 |
16 | **APICaller_Web_Extended**
17 |
18 | Below parameters received. This procedure return an integer depending on the execution. 0: Sucess. -1: Failed.
19 |
20 | |Parameter |Description |Posible Value |Sample
21 | | :---: | :---: |:--- |:--- |
22 | |@httpMethod | HTTP Method that would be call |GET, POST, PUT,DELETE,PATCH|'GET'|
23 | |@URL | URL intended to call |Valid URL |'https://www.routingnumbers.info/api/name.json?rn=122242597'|
24 | |@Headers | Header related to request, if needed. |'' |'[{"Name": "Content-Type", "Value" :"text/javascript; charset=utf-8" }]'|
25 | |@JsonBody | Json Body if needed. HTTP Get required a blank body |'' |''|
26 |
27 | Returned information related to HTTP Response by APICaller_Web_Extended:
28 |
29 | |Parameter |Description |
30 | | :---: |:--- |
31 | |JsonResult | Result returned by API called |
32 | |ContentType | Returned Content Type |
33 | |ServerName | Server Name called |
34 | |StatusCode | HTTP Status Code reponse. Sample: 200,404,500 |
35 | |Description | HTTP Status response. Sample: OK |
36 | |Json_Headers | Header result |
37 |
38 |
39 | ### **Sample calling APICaller_Web_Extended: GET**
40 |
41 | 
42 |
43 | 
44 |
45 | ```
46 | GO
47 | DECLARE @httpMethod nvarchar(max) = 'GET'
48 | DECLARE @URL nvarchar(max) = 'https://www.routingnumbers.info/api/name.json?rn=122242597'
49 | DECLARE @Headers nvarchar(max) = '[{"Name": "Content-Type", "Value" :"text/javascript; charset=utf-8" }]';
50 |
51 | DECLARE @JsonBody nvarchar(max) = ''
52 |
53 | Declare @ts as table
54 | (
55 | Json_Result nvarchar(max),
56 | ContentType varchar(100),
57 | ServerName varchar(100),
58 | Statuscode varchar(100),
59 | Descripcion varchar(100),
60 | Json_Headers nvarchar(max)
61 | )
62 |
63 | DECLARE @i AS INT
64 |
65 | INSERT INTO @ts
66 |
67 | EXECUTE @i = [dbo].[APICaller_Web_Extended]
68 | @httpMethod
69 | ,@URL
70 | ,@Headers
71 | ,@JsonBody
72 |
73 | SELECT * FROM @ts
74 |
75 | SELECT
76 | [name]
77 | ,[rn]
78 | ,[message]
79 | ,[code]
80 | FROM (
81 | SELECT Context = Json_Result
82 | from @ts
83 | )tb
84 | OUTER APPLY OPENJSON (context)
85 | WITH
86 | ( [name] VARCHAR(20) '$.name'
87 | , [rn] VARCHAR(20) '$.rn'
88 | , [message] VARCHAR(20) '$.message'
89 | , [code] INT '$.code'
90 | );
91 |
92 | SELECT *
93 | FROM OPENJSON((select Json_Headers from @ts))
94 | WITH (
95 | Header NVARCHAR(MAX) '$."Name"'
96 | ,Value NVARCHAR(MAX) '$."Value"'
97 | ) a
98 | ```
99 |
100 | ### **Sample calling APICaller_Web_Extended: POST**
101 |
102 | 
103 |
104 | 
105 |
106 | ```
107 | GO
108 | DECLARE @httpMethod nvarchar(max) = 'POST'
109 | DECLARE @URL nvarchar(max) = 'https://url-shortener-service.p.rapidapi.com/shorten'
110 | DECLARE @Headers nvarchar(max) = '[{ "Name": "Content-Type", "Value" :"application/x-www-form-urlencoded" }
111 | ,{ "Name": "X-RapidAPI-Host","Value" :"url-shortener-service.p.rapidapi.com"}
112 | ,{ "Name": "X-RapidAPI-Key", "Value" :"c56b333d25mshdbfec15f02f096ep19fa94jsne5189032cf7d"}
113 | ,{"Name": "useQueryString","Value" :"true"}]';
114 |
115 | DECLARE @JsonBody nvarchar(max) = 'url=https://www.linkedin.com/in/geraldo-diaz/'
116 |
117 | Declare @ts as table
118 | (
119 | Json_Result NVARCHAR(MAX),
120 | ContentType VARCHAR(100),
121 | ServerName VARCHAR(100),
122 | Statuscode VARCHAR(100),
123 | Descripcion VARCHAR(100),
124 | Json_Headers NVARCHAR(MAX)
125 | )
126 |
127 | DECLARE @i AS INT
128 |
129 | INSERT INTO @ts
130 | EXECUTE @i = [dbo].[APICaller_Web_Extended]
131 | @httpMethod
132 | ,@URL
133 | ,@Headers
134 | ,@JsonBody
135 |
136 | SELECT * FROM @ts
137 |
138 | SELECT
139 | Result = [name]
140 | FROM (
141 | SELECT Context = Json_Result
142 | from @ts
143 | )tb
144 | OUTER APPLY OPENJSON (context)
145 | WITH
146 | ( [name] VARCHAR(20) '$.result_url' );
147 |
148 | SELECT *
149 | FROM OPENJSON((select Json_Headers from @ts))
150 | WITH (
151 | Header NVARCHAR(MAX) '$."Name"'
152 | ,Value NVARCHAR(MAX) '$."Value"'
153 | ) a
154 | ```
155 |
156 | Initially the procedures below were the main objects of this project, but these were deprecated due the generic webmethod above:
157 |
158 | 1. **APICaller_GET(SqlString URL)**
159 | 1. **APICaller_POST(SqlString URL, SqlString JsonBody)**
160 |
161 | The same also support Authentications header like Token or JWT (Deprecated).
162 |
163 | 1. **APICaller_GETAuth(SqlString URL, SqlString Authorization)**
164 | 1. **APICaller_POSTAuth(SqlString URL, SqlString Authorization, SqlString JsonBody)**
165 | (More info in the wiki)
166 |
167 | It even support sending multiples headers in a Json Format (Deprecated).
168 |
169 | 1. **APICaller_GET_headers(SqlString URL, SqlString Headers)**
170 | 1. **APICaller_POST_headers(SqlString URL, SqlString Headers)**
171 | 1. **APICaller_GET_JsonBody_Header(SqlString URL, SqlString Headers, SqlString JsonBody)**
172 | 1. **APICaller_POST_JsonBody_Header(SqlString URL, SqlString Headers, SqlString JsonBody)**
173 |
174 | 1. **APICaller_POST_Encoded(SqlString URL, SqlString Headers, SqlString JsonBody)**
175 | This new procedure is exclusive for Calling API with enconded contentType (application/x-www-form-urlencoded).
176 |
177 | 1. **APICaller_GET_Extended(SqlString URL, SqlString Headers, SqlString JsonBody)**
178 | 1. **APICaller_POST_Extended(SqlString URL, SqlString Headers, SqlString JsonBody)**
179 |
180 | There are a few Utilities functions;
181 |
182 | 1. **GetTimestamp**
183 | 1. **Create_HMACSHA256(SqlString value, SqlString Key)**
184 | 1. **fn_GetBytes(SqlString value)**
185 |
186 | It include another one, that is basically an example of how to implement a customized method that return a result set based in a Data transfer object (DTO).
187 |
188 | PD:
189 | It uses HttpWebRequest instead of HttpClient in order to avoid having to use unsupported assemblies by SQL Server.
190 |
191 | ### Prerequisites
192 |
193 | Before you deploy the CLR you should set up some configuration in your SQL instance.
194 |
195 | ###### **STEP 1**
196 | Confirm that your have enable this option 'clr enabled'.
197 |
198 | ```
199 | USE TestDB
200 | GO
201 | sp_configure 'clr enabled',1
202 | RECONFIGURE
203 | ```
204 | ###### **STEP 2**
205 | Set your database to TRUSTWORTHY mode on.
206 |
207 | ```
208 | ALTER DATABASE TESTDB SET TRUSTWORTHY ON
209 | ```
210 |
211 | ###### **STEP 3**
212 | Create Assembly System.Runtim.Serialization from .Net Framework. Confirm what version of .Net you have installed and modify the path below with the correct one.
213 |
214 | ```
215 | CREATE ASSEMBLY [System.Runtime.Serialization]
216 | AUTHORIZATION dbo
217 | FROM N'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Runtime.Serialization.dll'
218 | WITH PERMISSION_SET = UNSAFE--external_access
219 | ```
220 | If you do not know the path where this dll is located. There are two ways you can get it deployed.
221 |
222 | 1. You can take it from SQL-APIConsumer\API_Consumer\dll\
223 | 1. Try running the script with the binary attached in tag v2.0.
224 |
225 | If neither of those steps works you can reach me out.
226 |
227 | If you are getting the error msg 15404, you should try the script below first. After that runs Step 3 again.
228 |
229 | ```
230 | USE [TestDB]
231 | GO
232 | EXEC dbo.sp_changedbowner @loginame = N'sa', @map = false
233 | GO
234 | ```
235 | Error mentioned above:
236 | Msg 15404, Level 16, State 11, Line 1
237 | Could not obtain information about Windows NT group/user 'xxxuser', error code 0x534.
238 |
239 |
240 | ###### **STEP 4**
241 | Create Assembly Newtonsoft.Json. If It doesn't exists you need to download and copy it in this path. Keep in mind that the compiled CLR of this project uses the version 11.0 of Newtonsoft. If you want to update it you would need to recompiled the code.
242 |
243 | ```
244 | CREATE ASSEMBLY [Newtonsoft.Json]
245 | AUTHORIZATION dbo
246 | FROM N'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Newtonsoft.Json.dll'
247 | WITH PERMISSION_SET = UNSAFE
248 | ```
249 | If you do not know the path where this dll is located or this command above doesn't work. You could try with attached script in Tag v2.0.
250 |
251 | ###### **STEP 5**
252 | Create a new folder named CLR to the following path "C:\" or any another desired path which you can get access throught SQL.
253 | And copy the .dll below from ...\API_Consumer\bin\Debug:
254 | 1. API_Consumer.dll
255 | 1. Newtonsoft.Json.dll
256 | 1. System.Net.Http.dll
257 |
258 | ```
259 | C:\CLR
260 | ```
261 | Keep in mind, if you used a different path you will also neeed to modify the script of Installing/STEP 1
262 |
263 | ### Installing
264 |
265 | Now we are ready to install (create) the clr objects of SQL-APIConsumer. Let's do it!.
266 |
267 |
268 | ###### **STEP 1**
269 | First, Let's create our Assembly:
270 |
271 | ```
272 | CREATE ASSEMBLY [API_Consumer]
273 | AUTHORIZATION dbo
274 | FROM N'C:\CLR\API_Consumer.dll'
275 | WITH PERMISSION_SET = UNSAFE
276 | ```
277 |
278 | If you do not know the path where this dll is located or this command above doesn't work. You could try with attached version in tag 2.0;
279 |
280 | ###### **STEP 2**
281 | After that we can create our CLR Stored procedures:
282 |
283 | ```
284 | GO
285 | PRINT N'Creating [dbo].[APICaller_WebMethod]...';
286 | GO
287 |
288 | CREATE PROCEDURE [dbo].[APICaller_WebMethod]
289 | @httpMethod NVARCHAR (MAX) NULL, @URL NVARCHAR (MAX) NULL, @JsonBody NVARCHAR (MAX) NULL
290 | AS EXTERNAL NAME [API_Consumer].[StoredProcedures].[APICaller_WebMethod]
291 |
292 |
293 | GO
294 | PRINT N'Creating [dbo].[APICaller_Web_Extended]...';
295 | GO
296 |
297 | CREATE PROCEDURE [dbo].[APICaller_Web_Extended]
298 | @httpMethod NVARCHAR (MAX) NULL, @URL NVARCHAR (MAX) NULL, @Headers NVARCHAR (MAX) NULL, @JsonBody NVARCHAR (MAX) NULL
299 | AS EXTERNAL NAME [API_Consumer].[StoredProcedures].[APICaller_Web_Extended]
300 |
301 | GO
302 |
303 | PRINT N'Creating [dbo].[Create_HMACSHA256]...';
304 |
305 | GO
306 | CREATE FUNCTION [dbo].[Create_HMACSHA256]
307 | (@message NVARCHAR (MAX) NULL, @SecretKey NVARCHAR (MAX) NULL)
308 | RETURNS NVARCHAR (MAX)
309 | AS
310 | EXTERNAL NAME [API_Consumer].[UserDefinedFunctions].[Create_HMACSHA256]
311 |
312 | GO
313 | PRINT N'Creating [dbo].[GetTimestamp]...';
314 |
315 | GO
316 | CREATE FUNCTION [dbo].[GetTimestamp]
317 | ( )
318 | RETURNS NVARCHAR (MAX)
319 | AS
320 | EXTERNAL NAME [API_Consumer].[UserDefinedFunctions].[GetTimestamp]
321 |
322 | GO
323 | PRINT N'Creating [dbo].[fn_GetBytes]...';
324 | GO
325 | CREATE FUNCTION [dbo].fn_GetBytes
326 | (@value NVARCHAR (MAX) NULL )
327 | RETURNS NVARCHAR (MAX)
328 | AS
329 | EXTERNAL NAME [API_Consumer].[UserDefinedFunctions].fn_GetBytes
330 | GO
331 | ```
332 |
333 | ```
334 | PRINT N'Creating [dbo].[APICaller_GET]...';
335 | GO
336 | CREATE PROCEDURE [dbo].[APICaller_GET]
337 | @URL NVARCHAR (MAX) NULL
338 | AS EXTERNAL NAME [API_Consumer].[StoredProcedures].[APICaller_GET]
339 | ```
340 |
341 | ```
342 | PRINT N'Creating [dbo].[APICaller_POST]...';
343 | GO
344 | CREATE PROCEDURE [dbo].[APICaller_POST]
345 | @URL NVARCHAR (MAX) NULL
346 | ,@JsonBody NVARCHAR (MAX) NULL
347 | AS EXTERNAL NAME [API_Consumer].[StoredProcedures].[APICaller_POST]
348 | ```
349 |
350 | ```
351 | PRINT N'Creating [dbo].[APICaller_POSTAuth]...';
352 | GO
353 | CREATE PROCEDURE [dbo].[APICaller_POSTAuth]
354 | @URL NVARCHAR (MAX) NULL
355 | ,@Token NVARCHAR (MAX) NULL
356 | ,@JsonBody NVARCHAR (MAX) NULL
357 | AS EXTERNAL NAME [API_Consumer].[StoredProcedures].[APICaller_POST_Auth]
358 | ```
359 |
360 | ```
361 | PRINT N'Creating [dbo].[APICaller_GETAuth]...';
362 | GO
363 | CREATE PROCEDURE [dbo].[APICaller_GETAuth]
364 | @URL NVARCHAR (MAX) NULL
365 | ,@Token NVARCHAR (MAX) NULL
366 | AS EXTERNAL NAME [API_Consumer].[StoredProcedures].[APICaller_GET_Auth]
367 |
368 | GO
369 |
370 | PRINT N'Creating [dbo].[APICaller_GET_Headers]...';
371 |
372 | GO
373 | CREATE PROCEDURE [dbo].[APICaller_GET_Headers]
374 | @URL NVARCHAR (MAX) NULL, @Headers NVARCHAR (MAX) NULL
375 | AS EXTERNAL NAME [API_Consumer].[StoredProcedures].[APICaller_GET_Headers]
376 |
377 | GO
378 |
379 | PRINT N'Creating [dbo].[APICaller_GET_Headers_BODY]...';
380 |
381 | GO
382 |
383 | CREATE PROCEDURE [dbo].[APICaller_GET_Headers_BODY]
384 | @URL NVARCHAR (MAX) NULL, @JsonBody NVARCHAR (MAX) NULL, @Headers NVARCHAR (MAX) NULL
385 | AS EXTERNAL NAME [API_Consumer].[StoredProcedures].APICaller_GET_JsonBody_Header
386 | GO
387 |
388 | PRINT N'Creating [dbo].[APICaller_POST_Headers]...';
389 | GO
390 | CREATE PROCEDURE [dbo].[APICaller_POST_Headers]
391 | @URL NVARCHAR (MAX) NULL, @Headers NVARCHAR (MAX) NULL
392 | AS EXTERNAL NAME [API_Consumer].[StoredProcedures].APICaller_POST_Headers
393 |
394 | GO
395 | PRINT N'Creating [dbo].[APICaller_POST_JsonBody_Header]...';
396 | GO
397 | CREATE PROCEDURE [dbo].[APICaller_POST_JsonBody_Header]
398 | @URL NVARCHAR (MAX)
399 | , @Headers NVARCHAR (MAX)
400 | , @jSON NVARCHAR (MAX)
401 | AS EXTERNAL NAME [API_Consumer].[StoredProcedures].APICaller_POST_JsonBody_Headers
402 |
403 | GO
404 | PRINT N'Creating [dbo].[APICaller_GET_Extended]...';
405 | GO
406 | CREATE PROCEDURE [dbo].[APICaller_GET_Extended]
407 | @URL NVARCHAR (MAX) NULL, @JsonBody NVARCHAR (MAX) NULL, @Headers NVARCHAR (MAX) NULL
408 | AS EXTERNAL NAME [API_Consumer].[StoredProcedures].[APICaller_GET_Extended]
409 |
410 | GO
411 | PRINT N'Creating [dbo].[APICaller_POST_Extended]...';
412 | GO
413 | CREATE PROCEDURE [dbo].[APICaller_POST_Extended]
414 | @URL NVARCHAR (MAX) NULL, @Headers NVARCHAR (MAX) NULL, @JsonBody NVARCHAR (MAX) NULL
415 | AS EXTERNAL NAME [API_Consumer].[StoredProcedures].[APICaller_POST_Extended]
416 |
417 | GO
418 | PRINT N'Creating [dbo].[APICaller_POST_Encoded]...';
419 | GO
420 |
421 | CREATE PROCEDURE [dbo].APICaller_POST_Encoded
422 | @URL NVARCHAR (MAX) NULL
423 | , @Headers NVARCHAR (MAX) NULL
424 | , @JsonBody NVARCHAR (MAX) NULL
425 | AS EXTERNAL NAME [API_Consumer].[StoredProcedures].APICaller_POST_Encoded
426 |
427 | ```
428 | ### **Sample calling Get Method**
429 | -- How to consume GET API
430 | -- How to show Json results.
431 |
432 | ```
433 | DECLARE @RoutingNumber AS VARCHAR(50) = '122242597'
434 |
435 | --Public API: routingnumbers.info
436 | DECLARE @Url VARCHAR(200) = CONCAT('https://www.routingnumbers.info/api/name.json?','rn=',@RoutingNumber)
437 |
438 | DECLARE @Results AS TABLE
439 | (
440 | Context varchar(max)
441 | )
442 |
443 | DECLARE @Result AS VARCHAR(MAX)
444 |
445 | INSERT INTO @Results
446 | EXEC [dbo].[APICaller_GET] @Url
447 |
448 | --Result: Row per value
449 |
450 | SELECT B.*
451 | FROM (
452 | SELECT Context
453 | from @Results
454 | )tb
455 | OUTER APPLY OPENJSON (context) B
456 |
457 | --Result: column per value.
458 | SELECT
459 | [name]
460 | ,[rn]
461 | ,[message]
462 | ,[code]
463 | FROM (
464 | SELECT Context
465 | from @Results
466 | )tb
467 | OUTER APPLY OPENJSON (context)
468 | WITH
469 | ( [name] VARCHAR(20) '$.name'
470 | , [rn] VARCHAR(20) '$.rn'
471 | , [message] VARCHAR(20) '$.message'
472 | , [code] INT '$.code'
473 | );
474 | ```
475 |
476 | 
477 |
478 | ### **Sample calling multiples headers Get Method**
479 | ```
480 | use TESTER
481 | go
482 | --Set Header
483 | Declare @header nvarchar(max) = '[{
484 | "Name": "X-RapidAPI-Host",
485 | "Value" :"restcountries-v1.p.rapidapi.com"
486 | },{
487 | "Name": "X-RapidAPI-Key",
488 | "Value" :"c56b333d25mshdbfec15f02f096ep19fa94jsne5189032cf7d"
489 | }]';
490 | --Set URL
491 | Declare @wurl varchar(max) = 'https://restcountries-v1.p.rapidapi.com/all'
492 |
493 | Declare @ts as table(Json_Table nvarchar(max))
494 |
495 | insert into @ts
496 | --Get Account Data
497 | exec [dbo].APICaller_GET_headers
498 | @wurl
499 | ,@header
500 |
501 | SELECT *
502 | FROM OPENJSON((select * from @ts))
503 | WITH (
504 | name nvarchar(max) '$."name"'
505 | ,alpha2Code nvarchar(max) '$."alpha2Code"'
506 | ,alpha3Code nvarchar(max) '$."alpha3Code"'
507 | ,callingCodes nvarchar(max) '$."callingCodes"' as JSON
508 | ,capital nvarchar(max) '$."capital"'
509 | ,region nvarchar(max) '$."region"'
510 | ,subregion nvarchar(max) '$."subregion"'
511 | ,timezones nvarchar(max) '$."timezones"' as JSON
512 | ,population nvarchar(max) '$."population"'
513 | ,"currencies" nvarchar(max) '$."currencies"' as JSON
514 | ,languages nvarchar(max) '$."languages"' as JSON
515 | ) a
516 |
517 | ```
518 |
519 | 
520 |
521 | ### **Sample calling Get Header Method Extended**
522 |
523 | ```
524 | --Script sample execution Calling Rapid API.
525 |
526 | --Set Header
527 | Declare @header nvarchar(max) =
528 | '[{
529 | "Name": "Content-Type",
530 | "Value" :"application/json; charset=utf-8"
531 | },
532 | {
533 | "Name": "X-RapidAPI-Host",
534 | "Value" :"restcountries-v1.p.rapidapi.com"
535 | },{
536 | "Name": "X-RapidAPI-Key",
537 | "Value" :"c56b333d25mshdbfec15f02f096ep19fa94jsne5189032cf7d"
538 | }]';
539 | --Set URL
540 | Declare @wurl varchar(max) = 'https://restcountries-v1.p.rapidapi.com/all'
541 |
542 | Declare @ts as table
543 | (
544 | Json_Result nvarchar(max),
545 | ContentType varchar(100),
546 | ServerName varchar(100),
547 | Statuscode varchar(100),
548 | Descripcion varchar(100),
549 | Json_Headers nvarchar(max)
550 | )
551 | declare @i as int
552 |
553 | insert into @ts
554 | --Get Account Data
555 | exec @i = [dbo].[APICaller_GET_Extended]
556 | @wurl
557 | ,''
558 | ,@header
559 |
560 | select * from @ts
561 |
562 | SELECT *
563 | FROM OPENJSON((select Json_Result from @ts))
564 | WITH (
565 | name nvarchar(max) '$."name"'
566 | ,alpha2Code nvarchar(max) '$."alpha2Code"'
567 | ,alpha3Code nvarchar(max) '$."alpha3Code"'
568 | ,callingCodes nvarchar(max) '$."callingCodes"' as JSON
569 | ,capital nvarchar(max) '$."capital"'
570 | ,region nvarchar(max) '$."region"'
571 | ,subregion nvarchar(max) '$."subregion"'
572 | ,timezones nvarchar(max) '$."timezones"' as JSON
573 | ,population nvarchar(max) '$."population"'
574 | ,"currencies" nvarchar(max) '$."currencies"' as JSON
575 | ,languages nvarchar(max) '$."languages"' as JSON
576 | ) a
577 |
578 | SELECT *
579 | FROM OPENJSON((select Json_Headers from @ts))
580 | WITH (
581 | Header nvarchar(max) '$."Name"'
582 | ,Value nvarchar(max) '$."Value"'
583 | ) a
584 | ```
585 | 
586 |
587 |
588 | ### **Sample calling Authentication Get/POST Method**
589 | ```
590 | DECLARE @Result AS TABLE
591 | (
592 | Token VARCHAR(MAX)
593 | )
594 |
595 | INSERT INTO @Result
596 |
597 | exec [dbo].[APICaller_POST]
598 | @URL = 'http://localhost:5000/api/auth/login'
599 | ,@BodyJson = '{"Username":"gdiaz","Password":"password"}'
600 |
601 | DECLARE @Token AS VARCHAR(MAX)
602 |
603 | SELECT TOP 1 @Token = CONCAT('Bearer ',Json.Token)
604 | FROM @Result
605 | CROSS APPLY ( SELECT value AS Token FROM OPENJSON(Result)) AS [Json]
606 |
607 | EXEC [dbo].[APICaller_GETAuth]
608 | @URL = 'http://localhost:5000/api/values'
609 | , @Token = @Token
610 | ```
611 | ### **ADVICE**
612 | There are an issue reported related to the GAC, after Windows install .Net Framework updates sometimes cause the error below;
613 |
614 | ```
615 | Could not load file or assembly 'System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. Assembly in host store has a different signature than assembly in GAC. (Exception from HRESULT: 0x80131050)
616 | ```
617 | It can be fixed with the code below;
618 |
619 | ```
620 | ALTER ASSEMBLY [System.Runtime.Serialization]
621 | FROM 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Runtime.Serialization.dll'
622 | WITH PERMISSION_SET = UNSAFE
623 | ```
624 |
625 | ## Deployment
626 |
627 | Make sure that the user on your SQL Server instance have grant access to CLR Folder where you stored the files.
628 |
629 | ## Built With
630 |
631 | * [C#](https://www.microsoft.com/en-us/download/details.aspx?id=7029/) - CLR develop in C# in .net framework 4.5.
632 | * [SQL Server 2016+](https://www.microsoft.com/es-es/sql-server//) - Could be deployed in SQL server 2016 or later.
633 |
634 | If you are working in an older version like 2008 or 2012 you would need to keep this in mind:
635 | 1. SQL 2012 does not allow default parameters for CLR (Default parameter values for CLR types, nvarchar(max), varbinary(max), and xml are not supported.)
636 | 1. OPENJSON is not available for SQL 2012. You won't be able to use OPENJSON statement since it was introduced in SQL 2016. As alternative you could use this [function](https://www.red-gate.com/simple-talk/sql/t-sql-programming/consuming-json-strings-in-sql-server/).
637 |
638 | ## Contributing
639 |
640 | Actually we don't have any code of conduct... do whatever you want.
641 |
642 | ## Versioning
643 |
644 | We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [v1.0.0](https://github.com/geral2/SQL-APIConsumer/releases/tag/v1.0).
645 |
646 | ## Authors
647 |
648 | * **Geraldo Diaz** - *SQL Developer* - [geral2](https://github.com/geral2)
649 |
650 | See also the list of [contributors](https://github.com/geral2/SQL-APIConsumer/projects/contributors) who participated in this project.
651 |
652 | ## License
653 |
654 | This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/geral2/SQL-APIConsumer/blob/master/LICENSE) file for details
655 |
656 | ## Acknowledgments
657 |
658 | * [readme-template](https://github.com/kingdomax/readme-template)
659 |
--------------------------------------------------------------------------------
/SQL-APIConsumer.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27428.2043
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "SQL-APIConsumer", "API_Consumer\SQL-APIConsumer.sqlproj", "{3026EF9E-7AF6-4BAF-B9C6-338F536E091A}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {3026EF9E-7AF6-4BAF-B9C6-338F536E091A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {3026EF9E-7AF6-4BAF-B9C6-338F536E091A}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {3026EF9E-7AF6-4BAF-B9C6-338F536E091A}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
17 | {3026EF9E-7AF6-4BAF-B9C6-338F536E091A}.Release|Any CPU.ActiveCfg = Release|Any CPU
18 | {3026EF9E-7AF6-4BAF-B9C6-338F536E091A}.Release|Any CPU.Build.0 = Release|Any CPU
19 | {3026EF9E-7AF6-4BAF-B9C6-338F536E091A}.Release|Any CPU.Deploy.0 = Release|Any CPU
20 | EndGlobalSection
21 | GlobalSection(SolutionProperties) = preSolution
22 | HideSolutionNode = FALSE
23 | EndGlobalSection
24 | GlobalSection(ExtensibilityGlobals) = postSolution
25 | SolutionGuid = {C223CB8E-223F-4472-BDDA-F4F8BA456E0D}
26 | EndGlobalSection
27 | EndGlobal
28 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-slate
--------------------------------------------------------------------------------
/images/POST_Extended_Result.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/images/POST_Extended_Result.png
--------------------------------------------------------------------------------
/images/POST_Extended_query.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/images/POST_Extended_query.png
--------------------------------------------------------------------------------
/images/Web_GET_Extended_Query.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/images/Web_GET_Extended_Query.png
--------------------------------------------------------------------------------
/images/Web_GET_Extended_Result.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geral2/SQL-APIConsumer/ffa3905568b2bf21755f56f5f7749387249c9bb3/images/Web_GET_Extended_Result.png
--------------------------------------------------------------------------------