Jump to content

Recommended Posts

I'm trying to integrate my FM solution with Freshdesk, a helpdesk web app that uses GET and PUT commands over HTTP. My first challenge is to retrieve a ticket from Freshdesk. According to the API documentation, all I need to do is (for ticket ID 200):

curl -v -u user@yourcompany.com:test -H "Content-Type: application/json" -X GET 'https://domain.freshdesk.com/api/v2/tickets/200'

I'm happy I made it work in Mac OS Terminal! but now I would like to use it within FM and the Base Elements plugin seems a good option, so I made the following script:

Set Variable [ $header; Value: BE_HTTP_Set_Custom_Header ( "Content-Type" ; "application/json" ) ]
Set Variable [ $get; Value: BE_HTTP_GET ( "https://domain.freshdesk.com/api/v2/tickets/200"; "user@yourcompany.com"; "test" ) ]

I expect to get the json data into the $get variable but I just get user@yourcompany.com in it.

The documentation for BE plug-in is not for newbies like me and there's something I don't do right. Can you help me with this or at least point me to a place where I can learn a little about it?

Thanks,

Share this post


Link to post
Share on other sites

Why don't you post your solution; it might help someone else with the same problem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • By Richard Carlton
       
      Setting Tax Rates in FM Starting Point | FMSP Videos | FileMaker 16 101 Training
      https://www.youtube.com/watch?v=uuV9jKW0TH8
      Most Recent Upload https://goo.gl/Dbn9fm
      Get up to speed with the FileMaker Pro 16 Video Training Course! 
      Top Rated Course by FileMaker Expert, Richard Carlton.  
      http://learningfilemaker.com/fmpro16.php
      Experience Richard's dynamic and exciting teaching format, while learning both basic, intermediate, and advanced FileMaker development skills. With 26 years of FileMaker experience and a long time speaker at FileMaker's Developer Conference, Richard will teach you all the ins and outs of building FileMaker Solutions.  
      The course is 50 hours of video content!
      Richard has been involved with the FileMaker platform since 1990 and has grown RCC into one of the largest top tier FileMaker consultancies worldwide. 
      Richard works closely with RCC's staff: a team of 28 FileMaker developers and supporting web designers. 
      He has offices in California, Nevada, and Texas.

      Richard has been a frequent speaker at the FileMaker Developers Conference on a variety of topics involving FileMaker for Startups and Entrepreneurs, and client-server integration.

      Richard is the Product Manager for FM Starting Point, the popular and most downloaded free FileMaker CRM Starter Solution.
      Looking for FM Starting Point free software download: http://www.fmstartingpoint.com
      Richard won 2015 Excellence Award from FileMaker Inc (Apple Inc) for outstanding video and product creation, leading to business development.

      RCC, Filemaker Videos, and LearningFileMaker.com are headquartered in Santa Clara, CA.
      http://www.rcconsulting.com/
      Please feel free to contact us at support@rcconsulting.com
      FileMaker Pro is simply a powerful software used to create custom apps that work seamlessly across iPad, iPhone, Windows, Mac, and the web
      Transform your business with the FileMaker Platform
      Free FileMaker Training Videos Channel https://www.youtube.com/user/FileMakerVideos
      50 Hour FileMaker Pro 16 Video Training Course-FileMaker 16 News-Online FileMaker 16 Training Videos
      https://www.youtube.com/watch?v=KpQqLLDcZ8I
      Playlist https://www.youtube.com/watch?v=KpQqLLDcZ8I&list=PLjTvUZtwtgBTMCfjM6LLwBAwGf_yXfvd_&index=13
      Top 10 New Features in FileMaker 16-FileMaker 16 News-FileMaker 16 Instructional Videos-FileMaker 16
      https://www.youtube.com/watch?v=urh8iHOCxkg
      Playlist https://www.youtube.com/watch?v=urh8iHOCxkg&t=130s&index=1&list=PLjTvUZtwtgBTMCfjM6LLwBAwGf_yXfvd_
      Sharing your Database with Other Devices and Users-FileMaker 16 News-FileMaker 16 Database Sharing
      https://www.youtube.com/watch?v=GF82vkYtCtA
      Playlist https://www.youtube.com/watch?v=GF82vkYtCtA&index=8&list=PLjTvUZtwtgBTMCfjM6LLwBAwGf_yXfvd_
      Introduction to FileMaker WebDirect 16-FileMaker 16 News-Online FileMaker 16 Training Videos
      https://www.youtube.com/watch?v=uaZKIpBjMAM
      Playlist https://www.youtube.com/watch?v=uaZKIpBjMAM&list=PLjTvUZtwtgBSVV1-4pFG4SHAhCIP3Yy-I&index=17&t=10s
      FileMaker Behavior Change-Go To Object-FileMaker 16 Video Training-FileMaker 16 News-FileMaker Video
      https://www.youtube.com/watch?v=MFwFjZem3AM
      Playlist https://www.youtube.com/watch?v=MFwFjZem3AM&index=15&list=PLjTvUZtwtgBQVDIUvoRkcvrMLi7sTZmj5
      A database management system (DBMS) is a computer software application that interacts with the user, other applications, and the database itself to capture and analyze data
       
      Official site provides the SDK, Developer's Guide, Reference, and Android Market for the open source project
      http://learningfilemaker.com/FIAS.html
      Video introduction to iOS App Training https://www.youtube.com/watch?v=cVxQe_yAshw
      Free FileMaker videos check out ...http://www.filemakervideos.com
      Download the FileMaker Pro 16 & FileMaker GO 16 for mobile devices training videos at http://www.learningfilemaker.com
      Download FileMaker Go 16 video training at http://learningfilemaker.com/FMGO-16/fmgo16.php
      Download FileMaker 16 Full Video Training Bundle at http://learningfilemaker.com/subscription.php
      FileMaker Video Training Review-FileMaker 16 Video Course Review-FileMaker Pro 16 101 Course Review
      https://www.youtube.com/watch?v=mF6Uor0KmKo
      Playlist https://www.youtube.com/watch?v=mF6Uor0KmKo&list=PLjTvUZtwtgBT8tNHuzF6cOKC_37zCTQl6&index=18
      Use FileMaker to create an app with the FileMaker Training Series
      FileMaker Pro is a cross-platform relational database application from FileMaker Inc.
      Please Comment, Like & Share Our Videos.
      Feel Free to Embed any of Our Videos on Your Blog or Website.
      Follow Us on Your Favorite Social Media
      https://www.facebook.com/FileMakerVideos
      https://twitter.com/filemakervideos
      https://plus.google.com/+FileMakerVideos/videos
      #WhatisFileMaker16
      #FileMakerPro16Training
      #FileMaker16VideoTutorial
      #FileMakerPro16Videos
      https://www.youtube.com/watch?v=uuV9jKW0TH8&index=53&list=PLjTvUZtwtgBTMCfjM6LLwBAwGf_yXfvd_
      http://feeds.feedburner.com/SettingTaxRatesInFmStartingPointFmspVideosFilemaker16101Training
    • By Jake Thomann
      For anyone interested in an npm package that communicates with Filemaker's data API, I am currently developing here - https://github.com/thomann061/fmrest
    • By Steven Cappiello
      Hi everyone,
      I'm trying to post data to a Drupal application from FileMaker via the BaseElements plugin. I'm getting a token, setting authentication, headers, and the post variables via the BaseElements functions and I've followed examples but I'm getting the following error:  {"error":"The type link relation must be specified.”}    I can't find any information about what this error might be. Does anyone have any idea based on the output I've gathered below?
      A working cURL command that I'm basically trying to replicate  that can be run from the command line is here:
      curl --include \   --request POST \   --user res_user:"password" \   --header 'Content-type: application/hal+json' \   --header "X-CSRF-Token: $X_CSRF_TOKEN" \   --data-binary '{"_links":{"type":{"href":"http://server.mskcc.org/rest/type/node/event"}},   "field_event_type":[{"value":"Seminar"}],   "title":[{"value":”Novel Approaches to Mating Drosophila"}],   "field_shared_datetime":[{"value":"2016-06-13T17:15:00"}],   "body":[{"value":"Tea ?: Yes<br>Tea Time: Tea at 1:15 PM"}],   "field_shared_location_text":[{"value":"ZRC Auditorium"}],   "field_shared_sponsor":[{"value":"Developmental Biology"}],   "field_event_hosts_text":[{"value":"Alexander Rudensky"}],   "field_shared_people_text":[{"value":"Name of Speaker: Steven Reiner<br>Speaker\u0027s Credentials: M.D.<br>Speaker\u0027s Title: Professor, Department of Microbiology and Immunology<br>Speaker\u0027s Affiliation: Columbia University Medical Center<br>Institution Location: New York, NY"}],   "type":[{"target_id":"event"}]}' \ http://dev.mskcc.org/entity/node?_format=hal_json I've attached the script I'm working with as an image.
      thanks in advance.
      Steven
       
      -----
       
      BE_Curl_Trace returned:
      == Info:   Trying 172.22.233.50...
      == Info: Connected to dev.mskcc.org (172.22.233.50) port 80 (#0)
      == Info: Server auth using Basic with user 'res_user'
      => Send header, 0x12c bytes (0x12c)
      0000: POST /entity/node?_format=hal_json HTTP/1.1
      0x2d: Host: server.mskcc.org
      0x42: Authorization: Basic cmVzX2RydXBhbDpUcnU3SCZrQQ==
      0x75: User-Agent: libcurl-agent-base-elements-plugin/3.2
      0xa9: Accept: */*
      0xb6: Content-Type: application/hal+json
      0xda: X-CSRF-Token: q3LKwzWvNtlP2_X79TpJATfEnOB8HV-_lDaVCiTK8gg
      0x115: Content-Length: 353
      0x12a: 
      => Send data, 0x161 bytes (0x161)
      0000: " {\"_links\":{\"type\":{\"href\":\"http://dev.mskcc.org/rest/ty
      0x40: pe/node/event\"}},..  \"field_event_type\":[{\"value\":\"Seminar
      0x80: \"}],..  \"title\":[{\"value\":\"Sister Cells that Feast and Fas
      0xc0: t --- Why Growth and Repair May Not be Fair XI\"}],..  \"field_s
      0x100: hared_datetime\":[{\"value\":\"2016-06-13T17:15:00\"}],..  \"typ
      0x140: e\":[{\"target_id\":\"event\"}]}"
      == Info: upload completely sent off: 353 out of 353 bytes
      <= Recv header, 0x1a bytes (0x1a)
      0000: HTTP/1.1 400 Bad Request
      <= Recv header, 0xf bytes (0xf)
      0000: Server: nginx
      <= Recv header, 0x24 bytes (0x24)
      0000: Content-Type: application/hal+json
      <= Recv header, 0x1c bytes (0x1c)
      0000: Transfer-Encoding: chunked
      <= Recv header, 0x18 bytes (0x18)
      0000: Connection: keep-alive
      <= Recv header, 0x18 bytes (0x18)
      0000: Keep-Alive: timeout=10
      <= Recv header, 0x33 bytes (0x33)
      0000: Cache-Control: must-revalidate, no-cache, private
      <= Recv header, 0x1a bytes (0x1a)
      0000: X-UA-Compatible: IE=edge
      <= Recv header, 0x16 bytes (0x16)
      0000: Content-language: en
      <= Recv header, 0x21 bytes (0x21)
      0000: X-Content-Type-Options: nosniff
      <= Recv header, 0x1d bytes (0x1d)
      0000: X-Frame-Options: SAMEORIGIN
      <= Recv header, 0x28 bytes (0x28)
      0000: Expires: Sun, 19 Nov 1978 05:00:00 GMT
      <= Recv header, 0x25 bytes (0x25)
      0000: Date: Wed, 03 Aug 2016 11:02:45 GMT
      <= Recv header, 0x2 bytes (0x2)
      0000: 
      <= Recv data, 0x40 bytes (0x40)
      0000: 35
      00x4: {"error":"The type link relation must be specified.”}      <——— here's the error
      0x3b: 0
      0x3e: 
      == Info: Closing connection 0
       
      BE_Response_Headers returned:

      HTTP/1.1 400 Bad Request
      Server: nginx
      Content-Type: application/hal+json
      Transfer-Encoding: chunked
      Connection: keep-alive
      Keep-Alive: timeout=10
      Cache-Control: must-revalidate, no-cache, private
      X-UA-Compatible: IE=edge
      Content-language: en
      X-Content-Type-Options: nosniff
      X-Frame-Options: SAMEORIGIN
      Expires: Sun, 19 Nov 1978 05:00:00 GMT
      Date: Wed, 03 Aug 2016 11:02:45 GMT
       
    • By ArkReversed
      Hi.

      I searched around the web for this but cant quite get a definite answer.

      I'm developing an ios app and my boss would like to setup and use filemaker as the backend for it (since he has other uses for filemaker too). I was thinking of using the xml api to request data such as regular records and images (through http/rest calls) but would it allow me to add/update records or create new layouts/tables as well?

      Thank you in advance. ;)
×

Important Information

By using this site, you agree to our Terms of Use.