Quick Start

Instance and Token

To continue with our quick start, you will have to have a Blocworx instance made available to you and a user with an authorization token created. Please contact us for assistance on getting this set up.

We assume in this documentation that you are a Blocworx user. We will be making reference to terms that are used in Blocworx only. If you are still unsure how to do no-code development in Blocworx why not check out our manual instead.

Simple Request to Get Data from a Bloc

In the below examples we will use example.mydomain.com as the domain your Blocworx instance is hosted on, and [AUTHTOKEN] will represent the token that will be provided to you. The Bloc ID in this example will be 1234.

In this request we will be simply getting data from a bloc without filters or any more criteria. For more advanced Get Data API endpoints check out our Get Data API Reference.

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://example.mydomain.com/api/get-data',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_POSTFIELDS =>'{
    "blocId": 1234
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer [AUTHTOKEN]',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Last updated