Knowledgebase

Get Spin Tags

Method: GET
Endpoint: /api/getSpinTags


Parameters

Parameter Type Required Description
id int No Spintag id which you want to get
user_id int No Get spintags of a particular user
limit_start int (default: 0) No Starting row of result. Default: 0
limit_count int (default: 25) No Number of records to get. Default: 25


Response Parameters

Parameter Type Description
status JSON Success or Error
result JSON Result of the operation
response JSON Output of the operation


Example Request (CURL)

<?php

// Authentication
$api_token	=	'API_KEY'; // Mumara API Key (can be found in Settings -> API Key)
$domain		=	'http://www.anydomain.com'; // Your Mumara Domain Name

// API Endpoint
$endpoint	=	'/api/getSpinTags';

//parameters
$data = array (
    'limit_start'	=> '1',
    'limit_count'	=> '2'
);

$params = '';
foreach($data as $key=>$value)
    $params .= $key.'='.$value.'&';
$params = trim($params, '&');

// Defining cURL Request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$domain.$endpoint.'?'.$params);
curl_setopt($ch, CURLOPT_HTTPHEADER,
    array('Content-Type: application/json', 'Authorization: Bearer ' . $api_token));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Executing cURL
$output = curl_exec ($ch);

// Printing Output
echo "<pre>";
echo json_encode(json_decode($output),JSON_PRETTY_PRINT );

// Closing cURL
curl_close ($ch);

?>

 

Example Response (JSON)

{
    "status": "success",
    "response": [
        {
            "id": 5,
            "user_id": 4,
            "place_holder": "hello world",
            "tag": "hello_world",
            "word_list": "hello1\r\nhello2\r\nhello3",
            "created_at": "2020-06-16 13:17:17",
            "updated_at": "2020-06-16 13:17:17"
        },
        {
            "id": 6,
            "user_id": 4,
            "place_holder": "hello world 1",
            "tag": "hello_world_1",
            "word_list": "hello1\r\nhello2\r\nhello3",
            "created_at": "2020-06-16 13:19:32",
            "updated_at": "2020-06-16 13:19:32"
        },
        {
            "id": 7,
            "user_id": 4,
            "place_holder": "hello world 3",
            "tag": "hello_world_3",
            "word_list": "hello1\r\nhello2\r\nhello3",
            "created_at": "2020-06-16 13:19:39",
            "updated_at": "2020-06-16 13:19:39"
        }
    ]
}
Status value of the success response will be "Success"


Example Error Response (JSON)

{
    "status": "error",
    "response": "Error: Records do not exist."
}


Possible Errors

  • Records do not exist
  • Access Denied
GET
/api/getSpinTags
Try it out