Go Back
HTTP Connector - Basic GET Example
Publisher
:
Run In Lingk
Description
This recipe demonstrates how to retrieve data from an API endpoint through a basic HTTP GET request
Browse the knowledge base
Twitter
E-Mail
# _____ _ _____ __ # | __ \ (_) |_ _| / _| # | |__) |___ ___ _ _ __ ___ | | _ __ | |_ ___ # | _ // _ \/ __| | '_ \ / _ \ | | | '_ \| _/ _ \ # | | \ \ __/ (__| | |_) | __/ _| |_| | | | || (_) | # |_| \_\___|\___|_| .__/ \___| |_____|_| |_|_| \___/ # | | # |_| # Description - This recipe demonstrates how to retrieve data from an API endpoint through a basic HTTP GET request # Systems - API # Connectors - httpReader # _____ _ # / ____| | | # | | ___ _ __ _ __ ___ ___| |_ ___ _ __ ___ # | | / _ \| '_ \| '_ \ / _ \/ __| __/ _ \| '__/ __| # | |___| (_) | | | | | | | __/ (__| || (_) | | \__ \ # \_____\___/|_| |_|_| |_|\___|\___|\__\___/|_| |___/ # # Connector Documentation # httpReader - https://help.lingk.io/en/articles/304-http-connector-setup-guide # Note that 'connectors:' indicates the start of the connector section connectors: # Setup the HTTP Reader that will read from an API endpoint ###### Start - httpReader connector ###### # 'name' defines whatever name you want to specify for the connector # 'type' defines the specific connector type, outlined by the Lingk documentation - name: weatherAPI type: httpReader delayedRead: true properties: url: https://api.weather.gov/stations?limit=1 httpMethod: GET acceptInvalidCerts: true ###### END: httpReader connector ###### # _____ _ _ _ # / ____| | | | | | # | (___ | |_ __ _| |_ ___ _ __ ___ ___ _ __ | |_ ___ # \___ \| __/ _` | __/ _ \ '_ ` _ \ / _ \ '_ \| __/ __| # ____) | || (_| | || __/ | | | | | __/ | | | |_\__ \ # |_____/ \__\__,_|\__\___|_| |_| |_|\___|_| |_|\__|___/ # Note that 'statements:' indicates the start of the 'statements' section statements: #******************************************************************** D I S C L A I M E R *********************************************************************************************** # * # Note that in an effort to keep recipes optimized for DPH (Data Processing Hours), print statements should be commented out after development has concluded for a recipe. * # For more information on DPH optimization, please visit the following help article - https://help.lingk.io/en/articles/212-minimizing-data-processing-hours-on-the-lingk-platform * # * #******************************************************************** D I S C L A I M E R *********************************************************************************************** # Read data from free use Government Weather API - statement: refresh weatherAPI # Print out the results of the API call to the console / execution log #- statement: print weatherAPI # 'Flatten' the JSON data so that it can be used in a SQL / table format - statement: (flatten) => select inline(features) from weatherAPI #- statement: print flatten # Select a data value that you want to insert into another application - statement: (flatten) => select properties.forecast as forecast__c, properties.name as name__c, properties.county as county__c from flatten #- statement: print flatten # Add more statements to convert, join, aggregrate, transform, and integrate your data
Peoplesoft to Salesforce: Course Connection Sync
Peoplesoft to Salesforce: Test and Score Sync