How to send XML request

This will probably be a softball for many of you.  The API documentation for EditRecord is typical in that it offers an XML Request example as well as a URL alternative.  From the documentation, here is the XML Post request method:

-------------------------------

POST https://www.quickbase.com/db/bfxjk9t7g HTTP/1.0
Content-Type: application/xml
Content-Length:
QUICKBASE-ACTION:API_EditRecord
<qdbapi>
   <udata>mydata</udata>
   <rid>1</rid>
   <field fid="94">33</field>
</qdbapi>
---------------------------------

My question is:  What is the context for this code?  Where does one write this XML request string?  Is it part of a larger XML document?  How does one call it?  For example, say I want a button to edit another record using the XML request method.

Could someone please give a simple, but complete example of the implementation of an XML request for, say, editing a record? 

And if the above documentation code is really not the way to go, I'd be happy to use a jQuery alternative.  I just would like to understand the context. 

Thanks for your help.

Answer

2 people found this helpful

The QuickBase API documents HTTP requests and response formats and is agnostic to which language (javascript, ruby, python, perl, java, ...) is used to make the network calls. So the documentation describes the HTTP format of the request and response. For an introduction see:

HTTP Made Really Easy

http://www.jmarshall.com/easy/http/

Additionally, QuickBase generally allows parameters to be sent in HTTP request (1) through the url, (2) in the headers, or (3) in the optional request body. 

Many of these details become transparent if you just mimic an example. Here is how your request could be sent using JavaScript and jQuery.

http://pastie.org/2355958

However, I could probably come up with a dozen different ways to send that same request by playing with the method, headers, and request body.

Was this answer helpful? Yes No
Original
dandiebolt_QB_Pirate , Pres. of Import Onload Sector
QuickBase Pro
3 additional answers

No answers have been posted

More Actions

People come to QuickBase Community for help and answers—we want to let them know that we're here to listen and share our knowledge. We do that with the style and format of our responses. Here are five guidelines:

  1. Keep it conversational. When answering questions, write like you speak. Imagine you're explaining something to a trusted friend, using simple, everyday language. Avoid jargon and technical terms when possible. When no other word will do, explain technical terms in plain English.
  2. Be clear and state the answer right up front. Ask yourself what specific information the person really needs and then provide it. Stick to the topic and avoid unnecessary details. Break information down into a numbered or bulleted list and highlight the most important details in bold.
  3. Be concise. Aim for no more than two short sentences in a paragraph, and try to keep paragraphs to two lines. A wall of text can look intimidating and many won't read it, so break it up. It's okay to link to other resources for more details, but avoid giving answers that contain little more than a link.
  4. Be a good listener. When people post very general questions, take a second to try to understand what they're really looking for. Then, provide a response that guides them to the best possible outcome.
  5. Be encouraging and positive. Look for ways to eliminate uncertainty by anticipating people's concerns. Make it apparent that we really like helping them achieve positive outcomes.

Select a file to attach:

Do you still have a question?

Ask your question to the community. Most questions get a response in about a day.

Post your question to the community