About

Setup and maintain by MaGIC Tech team, this portal is for all developers out there. Together, we move forward to build a more efficient and integrated startup ecosystem.

Please join us

For ecosystem developer like you who wish to integrate your application with MaGIC Central, register a developer account for FREE. In order to gain access to our public APIs, an authorisation token key is required.

Make a request in API Catalogue page, approval takes 2 working days to process.

Realtime Open API

We believe machine readable and writable quality open data is important to prevent redundancy effort done in the ecosystem.

Example list of RESTful (almost) APIs that you can access are as below. Output is in JSON format.

  • Website - Get a list of latest news, events and job vacancy information from our website
  • Community - Get a list of our alumni startup public info
  • Resource - Get a list of resources available to startups like Funding, Award, Co-working space, Developers and etc
  • Master Data - Get a list of master data for our definition on persona, startup stages, industry and etc.
  • IDEA - Impact Driven Enterprise (IDE) Accreditation related API, to be deprecated and replace by SEA soon.

More detail and documentation is available after login under API Catalogue.

Making a Request

As easy as the following 3 steps. Sample code is in PHP but the API will works with others programming languages.

1) Create a project folder

mkdir magic-api-sample
cd magic-api-sample

2) Next, install Guzzle, a php library that help you make http request easily. You must have composer pre-installed in your system. If not, please refer to https://getcomposer.org/.

php composer.phar require guzzlehttp/guzzle

3) Last, create getMagicWpLatestNews.php file:

<?php

require 'vendor/autoload.php';

$accessToken = 'YOUR_ACCESS_TOKEN_HERE';

$client = new \GuzzleHttp\Client(['base_uri' => 'https://magic.cloud.tyk.io/']);
$headers = array('Authorization'=>"Bearer {$accessToken}", 'Accept'=>'application/json');
$response = $client->request('POST', 'getMagicWpLatestNews', array('headers'=>$headers));
$content = $response->getBody()->getContents();
$result = json_decode($content, true);

if($result['status'] == 'success')
{
    foreach($result['data'] as $news)
    {
        echo sprintf('<li><a href="%s">%s - %s</a></li>', $news['guid'], date('Y-M-d', strtotime($news['gmtDatePosted'])), $news['title']);
    }
}
else
{
    echo sprintf('Failed: %s', $result['msg']);
}

p/s: you can also grab this code from Github repo

Navigation