API_GetRecordAsHTML

Overview

Use API_GetRecordAsHTML to get a record within an HTML fragment that can be embedded in another Web page.

top

Request parameters

Parameter Value Required?

rid

The record ID of the record to be edited. You can obtain the recordID of any record in a query. (See API_DoQuery.)

If you use a key field OTHER than the record id (rid), you should use the key parameter rather than rid.

yes

dfid

The dform id of the form used to generate the HTML. The resulting display matches the contents and layout  of the form you specify.

You can obtain the dfid of a form by previewing or editing the form; the dfid is part of the URL in the browser’s address bar.

no

ticket

A valid authentication ticket.

The authentication ticket is returned via the API_Authenticate call.

yes

apptoken

Supply a valid application token.

yes, if the application requires application tokens

udata

A string value that you want returned. It will not be handled by QuickBase but it will be returned in the response.

no

top

Response values

The requested record in an HTML fragment.

Element Name Value

action

Echoes the originating request, for example, API_AddField.

errcode

Identifies the error code, if any. (See the Error Codes appendix for a list of possible error codes.)

0 indicates that no error was encountered.

errtext

Text that explains the error code.

"No error" indicates that no error was encountered.

udata

Optional. Contains any udata value supplied in the request.

top

Sample XML Request

POST https://<target_domain>/db/bddfa5nbx HTTP/1.0
Content-Type: application/xml
Content-Length:
QUICKBASE-ACTION: API_GetRecordAsHTML

<qdbapi>
   <udata>mydata</udata>
   <ticket>2_bdh78chd4_dpsx_b_dnbypa8d372j5rb6vt6kfdx7ty25</ticket>
   <apptoken>dtmd897bfsw85bb6bneceb6wnze3</apptoken>
   <rid>2</rid>
   <dfid>10</dfid>
</qdbapi>

top

URL alternative

https://<target_domain>/db/bddnc2idi?act=API_GetRecordAsHTML&rid=18&dfid=10
&ticket=<your_ticket>&apptoken=dtmd897bfsw85bb6bneceb6wnze3

where <target_domain> is the domain against which you are invoking this call, for example, intuit.quickbase.com.

top

Embedding a QuickBase record into a Web page

To embed a QuickBase record into a Web page on your site, add the following code to the body of your Web page:

<div id="dbPagePayload"></div>

<script lang="text/javascript">
$.post("./dddddddd?a=API_GetRecordAsHTML&rid=n", {}, function(response){
$("#dbPagePayload").html(response);
});
</script>

where dddddddd is the table ID and n is the record ID for the record that you want to embed.

top

Example Web Page Code

<html>
<head>
<!-- put styling information here -->
</head>

<body>

<h1>Example</h1>
<p> A QuickBase table embedded in a page of HTML</p>
<div id="dbPagePayload"></div>

<script lang="text/javascript">
$.post("./bh4nw3bh2?a=API_GetRecordAsHTML&rid=20", {}, function(response){
$("#dbPagePayload").html(response);
});
</script>

</body>
</head>
</html>

top   

© 1999-2014 Intuit Inc. All rights reserved. Legal Notices.