API_CloneDatabase

Overview

Use API_CloneDatabase to make a copy of a Quick Base application. You can choose to use the keepData parameter if you want to copy the application's data in addition to its structure. If you want to copy data, but exclude file attachments, you can use the excludefiles parameter in your request. After you copy an application, changes to the source application will not affect the copy you created, and vice versa.

When you copy a Quick Base application, all users with access to the original application automatically have access to the application copy. You can choose to remove some or all of these users from the application copy using the API_RemoveUserFromRole.

top

Request parameters

Parameter Value Required?

newdbname

Specifies a name for the new application.

yes

newdbdesc

Specifies the description for the new application.

no

keepData

Set this parameter to 1 if you want to copy the application's data.

Omit this parameter if you want to copy the application structure only.

no

excludefiles

Specifies that you do not want to copy file attachments when you copy an application.

If you want to copy data, but exclude file attachments from your copy:

  • Set the keepData parameter to 1 and

  • Set the excludefiles parameter to 1

If you want to copy data, including file attachments:

  • Set the keepData parameter to 1 and

  • Omit the excludefiles parameter

no

ticket

A valid authentication ticket.

The authentication ticket is returned via the API_Authenticate call.

yes, one of:

  • ticket
  • username/password
  • user token

usertoken

The user token is an alternative means of authentication, used for API access. User tokens cannot be used to access the Quick Base UI.

yes, one of:

  • ticket
  • username/password
  • user token

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 Quick Base but it will be returned in the response.

no

usersandroles

Specify how users and roles are treated when copying the application. Set this parameter to 1 to copy users in their roles. Set to 0 to copy users and roles separately (that is, don't assign roles). Defaults to 0.

no

top

Response values

Element Name Value

action

Echoes the originating request, for example, API_CloneDatabase.

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.

newdbid

The database ID of the new database.

top

Sample XML Request

POST https://target_domain/db/target_dbid HTTP/1.0
Content-Type: application/xml
Content-Length:
QUICKBASE-ACTION: API_CloneDatabase

<qdbapi>
   <ticket>auth_ticket</ticket>
   <apptoken>app_token</apptoken>
   <udata>mydata</udata>
   <newdbname>YellowDots</newdbname>
   <newdbdesc>Database copy with no data</newdbdesc>
</qdbapi>

top

URL alternative

https://target_domain/db/target_dbid?a=API_CloneDatabase
&ticket=auth_ticket&apptoken=app_token
&keepData=1&newdbname=YellowDots&newdbdesc="Database copy with data"

where target_domain is the domain against which you are invoking this call, for example, quickbase.com. Read about this notation.

top

Sample response

<?xml version="1.0" ?>
<qdbapi>
   <action>API_CloneDatabase</action>
   <errcode>0</errcode>
   <errtext>No error</errtext>
   <udata>mydata</udata>
   <newdbid>bddnc6pn7</newdbid>
</qdbapi>

 

Go back    |     |  

© 1999-2018 QuickBase, Inc. All rights reserved. Legal Notices.