HTTP-QuickBase

 view release on metacpan or  search on metacpan

QuickBase.pm  view on Meta::CPAN

"Allow non-SSL access (normally unchecked)". You'll need to check this box to allow HTTP 
access to the database.

=back

=head2 Authentication/Permissions

=over 4

=item $qdb->authenticate($username, $password)

Sets the username and password used for subsequent method invocations

=back

=head2 Finding IDs

=over 4

=item $qdb->getIDbyName($dbName)

Returns the database ID of the database whose full name matches $dbName.
I don't recommend using the getIDbyName method because there are many tables with the same name.
Instead you can discover the database_id of your table empirically.
Read the follwing article to find out how:
https://www.quickbase.com/db/6mztyxu8?a=dr&r=w

=item $qdb->GetRIDs ($QuickBaseID)

Returns an array of all record IDs in the database identified by database ID $QuickBaseID.

=back

=head2 Cloning and Creating from Scratch

=over 4


=item $qdb->cloneDatabase($QuickBaseID, $Name, $Description)

Clones the database identified by $QuickBaseID and gives the clone the name $Name and description $Description

Returns the dbid of the new database.

=back

=over 4

=item $qdb->createDatabase($Name, $Description)

Creates a database with the name $Name and description $Description

Returns the dbid of the new database.

=back

=over 4

=item $qdb->addField($QuickBaseID, $label, $type, $mode)

Creates a field with the label $label of label, a type of $type and if the field is to be a formula field then set $mode to 'virtual' otherwise set it to the empty string.

Returns the fid of the new field.

=back

=over 4

=item $qdb->deleteField($QuickBaseID, $fid)

Deletes the field with the field identifier of $fid.

Returns nothing.

=back

=over 4

=item $qdb->setFieldProperties($QuickBaseID, $fid, %properties)

Modifies the field with the field identifier of $fid using the name-value pairs in %properties. Please see the QuickBase HTTP API document for more details.

Returns nothing.

=back


=head2 Adding Information

=over 4


=item $qdb->AddRecord($QuickBaseID, %recorddata)

Returns the record id of the new record. The keys of the associative array %recorddata are scanned for matches with the 
field names of the database. If the key begins with the number one through nine and contains only numbers
then the field identifiers are scanned for a match instead.
If a particular key matches then the corresponding field in the new record is set to the value associated with the key.
If you want to attach a file you need to create an array with the first member of the array set to the string literal 'file' and the second 
member of the array set to the full path of the file. Then the value of the key corresponding to the file attachment field 
should be set to a reference which points to this two member array.  

=back

=head2 Deleting Information

=over 4

=item $qdb->DeleteRecord($QuickBaseID, $rid)

Deletes the record identified by the record identifier $rid.

=back

=over 4

=item $qdb->PurgeRecords($QuickBaseID, $query)

Deletes the records identified by the query, qname or qid in $query. Use the qid of '1' to delete all the records in a database.

Please refer to https://www.quickbase.com/db/6mztyxu8?a=dr&r=2 for more details on the query parameter.

=back



=head2 Editing Information

=over 4

=item $qdb->EditRecord($QuickBaseID, $rid, %recorddata)

Modifies the record defined by record id $rid in the database defined by database ID $QuickBaseID.

Any field in the database that can be modified and that has its field label or field identifer as a key in the associative array
%recorddata will be modified to the value associated with the key. The keys of the associative array %recorddata are scanned for matches with the 
field names of the database. If the key begins with the number one through nine and contains only numbers
then the field identifiers are scanned for a match instead.
If a particular key matches then the corresponding field in the record is set to the value associated with the key.
If you want to modify a file attachment field, you need to create an array with the first member of the array set to the string literal 'file' and the second 
member of the array set to the full path of the file. Then the value of the key corresponding to the file attachment field 
should be set to a reference which points to this two member array.  


Use $qdb->EditRecordWithUpdateID($QuickBaseID, $rid, $update_id, %recorddata) to take advantage of conflict detection.
If $update_id is supplied then the edit will only succeed if the record's current update_id matches.

Returns the XML response from QuickBase after modifying every valid field refered to in %recorddata.

Not all fields can be modified. Built-in and formula (virtual) fields cannot be modified. If you attempt to 
modify them with EditRecord you will get an error and no part of the record will have been modified. 

=back

=head2 Retrieving Information

=over 4

=item $qdb->GetRecord($QuickBaseID, $rid)

From the database identified by $QuickBaseID, returns an associative array of field names and values of the record identified by $rid.

=back

=over 4

=item $qdb->doQuery($QuickBaseID, $query, $clist, $slist, $options)

From the database identified by $QuickBaseID, returns an array of
associative arrays of field names and values of the records selected by
$query, which can either be an actual query in QuickBase's query
language, or a view name or number (qid or qname).

The columns (fields) returned are determined by $clist, a period delimited list of field identifiers.

The sorting of the records is determined by $slist, a period delimited list of field identifiers.

Ascending or descending order of the sorts defined by $slist is controlled by $options.

Please refer to https://www.quickbase.com/db/6mztyxu8?a=dr&r=2 for more details on the parameters for API_DoQuery.

=back

=over 4

=item $qdb->getCompleteCSV($QuickBaseID)

From the database identified by $QuickBaseID, returns a scalar containing the comma separated values of all fields including built in fields.

The first row of the comma separated values (CSV) contains the field labels.  

=back

=over 4

=item $qdb->GetFile($QuickBaseDBid, $filename, $rid, $fid)

From the database identified by $QuickBaseID, returns an array where the first element is the contents of the file $filename uploaded to
the record identified by record ID $rid in the field identified by field indentifier $fid.

The second element of the returned array is return value from the headers method of the corresponding LWP::UserAgent object. 

=back




=head2 Errors

=over 4



( run in 0.948 second using v1.01-cache-2.11-cpan-df04353d9ac )