Function: getDataContainerTableRecords

With this function you can read the data records from your DataContainer table. The Conditions parameter does not have to be set. If you want to load all data records, do not send this parameter.

Request-program-example for getDataContainerTableRecords
<?php

    # Your source code before
    # ...

    $contentdockApiKey = 'YourAPIKey';
    $contentdockClientSubdomain = 'YourContentDockSubDomain';
    $contentdockDataContainerTableID = YourTableID;
    $yourProgramAgent = 'YourProgramAgent';

    // Build a condition
    $condition = array('language' => 'EN');

    // Build JSON
    $query =  json_encode ( 
                array (
                  "query" => 
                    array (
                      "command" => "getDataContainerTableRecords",
                      "param" => 
                        array (
                          $contentdockApiKey,
                          $contentdockClientSubdomain,
                          $yourProgramAgent,
                          $contentdockDataContainerTableID,
                          $condition
                        )
                    )
                )
              );

    $requestData = array ( "data" => $query );

    $requestUrl = 'https://www.contentdock.com/api';

    // Init curl    
    $curl = curl_init ( $requestUrl );
    curl_setopt ( $curl, CURLOPT_POST, true );
    curl_setopt ( $curl, CURLOPT_POSTFIELDS, http_build_query ( $requestData ) );
    curl_setopt ( $curl, CURLOPT_USERAGENT,'contentDockAPI/1.0');
    curl_setopt ( $curl, CURLOPT_RETURNTRANSFER, true );

    // Exec curl
    $response = curl_exec ( $curl );

    curl_close ( $curl );
?>

More information


Feedback or Questions

We are always happy to help you with questions about the code or other questions.

Was this page helpful? Yes No

Topics on this page