Hi All,
Fairly new to FME, and brand spanking new to Rest APIs.
i have an API integration that i worked out in Postman, but, i’m struggling to translate that to FME workbench for use in an FME Server Automation.
In postman, i have to use a GET to generate an antiforgery token, then use a POST to log in, a second GET to update the antiforgery token and then a second POST to send the actual content i want to .. uh.. send.
now, in Postman, my request looks like:
GET {{DeskAlertsURL}}api/xsrf/get
with the following auto generated headers:
Cookie:
Host:
User-Agent:
Accept:
Accept-Encoding:
Connection:
and the actual request headers look like (i {{shortened}} some of them for readability):
GET https://URL/DeskAlerts11/api/xsrf/get
Request Headers
User-Agent: PostmanRuntime/7.36.0
Accept: */*
Postman-Token: acbb9ca8-9dc2-44b1-888e-63468a39523f
Host: deskalerts.ipf.msu.edu
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Cookie: .AspNetCore.Antiforgery.awpUR7lE5Fk={{Shortened}}; XSRF-TOKEN={{X-XSRF-TOKEN Body}}; __Secure-refresh={{Shortened}}; __Secure-token={{Shortened}}; incap_ses_6520_3027157={{Shortened}}; incap_ses_8215_3027157=1{{Shortened}}; visid_incap_3027157={{Shortened}}
My response has no body, and the following headers (again, some shortened for readability):
Cache-Control: no-cache, no-store
Pragma: no-cache
Transfer-Encoding: chunked
Set-Cookie: XSRF-TOKEN={{Shortened}}; path=/DeskAlerts11; secure; samesite=strict
X-XSS-Protection: 0
X-Frame-Options: sameorigin
X-Content-Type-Options: nosniff
Referrer-Policy: no-referrer
X-Robots-Tag: noindex
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Resource-Policy: cross-origin
Cross-Origin-Embedder-Policy: credentialless
X-Permitted-Cross-Domain-Policies: none
Permissions-Policy:{{Shortened}}
Content-Security-Policy: default-src 'self'; base-uri 'self'; script-src 'self'; script-src-elem 'self' '{{Shortened}}' '{{Shortened}}' '{{Shortened}}'; script-src-attr 'self'; style-src 'self' 'unsafe-inline'; img-src * 'self' data: blob:; font-src 'self'; connect-src https: wss:; media-src * 'self' data: blob:; object-src 'none'; child-src 'none'; frame-src *; worker-src 'self'; frame-ancestors 'self'; form-action 'self'; upgrade-insecure-requests; block-all-mixed-content; manifest-src 'self'; report-uri https://dadebug.report-uri.com/r/d/csp/enforce
Strict-Transport-Security: max-age=7776000
X-POWERED-BY: nonsense
X-ASPNET-VERSION: nonsense
Date: Tue, 05 Mar 2024 16:16:24 GMT
X-CDN: Imperva
X-Iinfo: {{Shortened}}
What i’m unsure of is, how to configure the http caller to receive the appropriate headers so i can get the token i need to pass on for the various POST actions.