Project
/project/list
It list project in SMA Universe data.
CURL Request Example
curl --compressed --data
"api_key=***3c1397f109dd7d62515b49b8b74e9a263c***"
"https://api4.socialmarketanalytics.com/api/project/list?child=false"
Response Examples
{
"response": {
"tokendetails": {
"api_token": "b1530a6c4e1845ebc9f89d9a3b6aa6b8",
"function": "project",
"request_quota_remaining": "275",
"expires": "2016-01-14 07:25:05"
},
"project_params": {
"child": "false",
"received": "2016-01-14 07:23:01",
"completed": "2016-01-14 07:23:01"
},
"data": [
{
"project_id": "28",
"name": "Aplha bravo charlie",
"description": ""
},
{
"project_id": "18",
"name": "LGS School",
"description": "LGS time, This sample description"
},
{
"project_id": "37",
"name": "Sports Revised",
"description": "Sports description edited"
}
]
}
}
Detail version of error.
{
"response": {
"tokendetails": {
"api_token": "b1530a6c4e1845ebc9f89d9a3b6aa6b8",
"function": "project",
"request_quota_remaining": "272",
"expires": "2016-01-14 07:25:05"
},
"project_params": {
"child": "false",
"received": "2016-01-14 07:23:01",
"completed": "2016-01-14 07:23:01"
},
"error": {
"error_code": 2315,
"error_message": "provided child value is not allowed.",
"description": "provided child value is not allowed."
}
}
}
Short version of error.
{
"response": {
"error": {
"error_code": 1011,
"error_message": "API key is missing",
"description": "An API key is required to access service."
}
}
}
Parameters
| Parameters | Required | Description |
|---|---|---|
| key string API level Parameter | required | Key must be sent using POST method. Key parameter is required to call the API. |
| child string | optional |
API project list parameter with possible values true & false. It's default value is false & with this value it returns simple project list & with true value it returns project with complete hierarchy. |
| Return Value | |||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| JSON Array | Response JSON array shall contain error (optional), API token details, project parameters and resultant data.
|
||||||||||||||||||||||||||||||||||||
/project/create
It creates project in SMA Universe data.
CURL Request Example
curl --compressed --data
"api_key=***3c1397f109dd7d62515b49b8b74e9a263c***"
"https://api4.socialmarketanalytics.com/api/project/create?name=projectname&description=projectdescription"
Response Examples
{
"response": {
"tokendetails": {
"api_token": "b1530a6c4e1845ebc9f89d9a3b6aa6b8",
"function": "project",
"request_quota_remaining": "275",
"expires": "2016-01-14 07:25:05"
},
"project_params": {
"name": "Sports",
"description": "Sports are good for healthy life.",
"received": "2016-01-14 07:23:01",
"completed": "2016-01-14 07:23:01"
},
"success": {
"success_code": "2303",
"success_message": "Project is successfully created.",
"description": "Project is successfully created.",
"project_id": "70"
}
}
}
Detail version of error.
{
"response": {
"tokendetails": {
"api_token": "b1530a6c4e1845ebc9f89d9a3b6aa6b8",
"function": "project",
"request_quota_remaining": "272",
"expires": "2016-01-14 07:25:05"
},
"project_params": {
"name": "Sports",
"description": "Sports are good for healthy life.",
"received": "2016-01-14 07:23:01",
"completed": "2016-01-14 07:23:01"
},
"error": {
"error_code": 2315,
"error_message": "Project name already exists for this user.",
"description": "Project name already exists for this user."
}
}
}
Short version of error.
{
"response": {
"error": {
"error_code": 1011,
"error_message": "API key is missing",
"description": "An API key is required to access service."
}
}
}
Parameters
| Parameters | Required | Description |
|---|---|---|
| key string API level Parameter | required | Key must be sent using POST method. Key parameter is required to call the API. |
| Name string | required |
Alpha numeric with space values are accepted for name. API shall return error special characters are part of it |
| Description string | optional |
Description parameter is alpha numeric with spaces. API shall return error special characters are part of it. |
| Return Value | |||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| JSON Array | Response JSON array shall contain error (optional), API token details, project parameters and resultant data.
|
||||||||||||||||||||||||||||||||||||||||
/project/edit
It edits project in SMA Universe data.
CURL Request Example
curl --compressed --data
"api_key=***3c1397f109dd7d62515b49b8b74e9a263c***"
"https://api4.socialmarketanalytics.com/api/project/edit?project_id=33&name=projectname&description=projectdescription"
Response Examples
{
"response": {
"tokendetails": {
"api_token": "b1530a6c4e1845ebc9f89d9a3b6aa6b8",
"function": "project",
"request_quota_remaining": "275",
"expires": "2016-01-14 07:25:05"
},
"project_params": {
"project_id": "33",
"name": "Sports",
"description": "Sports are good for healthy life.",
"received": "2016-01-14 07:23:01",
"completed": "2016-01-14 07:23:01"
},
"success": {
"success_code": "2303",
"success_message": "Project is successfully updated.",
"description": "Project is successfully updated."
}
}
}
Detail version of error.
{
"response": {
"tokendetails": {
"api_token": "b1530a6c4e1845ebc9f89d9a3b6aa6b8",
"function": "project",
"request_quota_remaining": "272",
"expires": "2016-01-14 07:25:05"
},
"project_params": {
"project_id": "33",
"name": "Sports",
"description": "Sports are good for healthy life.",
"received": "2016-01-14 07:23:01",
"completed": "2016-01-14 07:23:01"
},
"error": {
"error_code": 2315,
"error_message": "Project name already exists for this user.",
"description": "Project name already exists for this user."
}
}
}
Short version of error.
{
"response": {
"error": {
"error_code": 1011,
"error_message": "API key is missing",
"description": "An API key is required to access service."
}
}
}
Parameters
| Parameters | Required | Description |
|---|---|---|
| key string API level Parameter | required | Key must be sent using POST method. Key parameter is required to call the API. |
| Project Id Integer | required |
Project Id is required to edit the project. API shall return error if project id is missing or empty. |
| Name string | required |
Alpha numeric with space values are accepted for name. API shall return error special characters are part of it |
| Description string | optional |
Description parameter is alpha numeric with spaces. API shall return error special characters are part of it. |
| Return Value | |||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| JSON Array | Response JSON array shall contain error (optional), API token details, project parameters and resultant data.
|
||||||||||||||||||||||||||||||||||||||||
/project/delete
It delete project in SMA Universe data.
CURL Request Example
curl --compressed --data
"api_key=***3c1397f109dd7d62515b49b8b74e9a263c***"
"https://api4.socialmarketanalytics.com/api/project/delete?project_id=33"
Response Examples
{
"response": {
"tokendetails": {
"api_token": "b1530a6c4e1845ebc9f89d9a3b6aa6b8",
"function": "project",
"request_quota_remaining": "275",
"expires": "2016-01-14 07:25:05"
},
"project_params": {
"project_id": "33",
"received": "2016-01-14 07:23:01",
"completed": "2016-01-14 07:23:01"
},
"success": {
"success_code": "2303",
"success_message": "Project is successfully deleted.",
"description": "Project is successfully deleted."
}
}
}
Detail version of error.
{
"response": {
"tokendetails": {
"api_token": "b1530a6c4e1845ebc9f89d9a3b6aa6b8",
"function": "project",
"request_quota_remaining": "272",
"expires": "2016-01-14 07:25:05"
},
"project_params": {
"project_id": "33",
"received": "2016-01-14 07:23:01",
"completed": "2016-01-14 07:23:01"
},
"error": {
"error_code": 2315,
"error_message": "Project already deleted.",
"description": "Project already deleted."
}
}
}
Short version of error.
{
"response": {
"error": {
"error_code": 1011,
"error_message": "API key is missing",
"description": "An API key is required to access service."
}
}
}
Parameters
| Parameters | Required | Description |
|---|---|---|
| key string API level Parameter | required | Key must be sent using POST method. Key parameter is required to call the API. |
| Project Id Integer | required |
Project Id is required to delete the project. API shall return error if project id is missing or empty. |
| Return Value | |||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| JSON Array | Response JSON array shall contain error (optional), API token details, project parameters and resultant data.
|
||||||||||||||||||||||||||||||||||||
Success
| Success Code | Success Message |
|---|---|
| 2303 | Project is successfully created. |
| 2304 | Project is successfully updated. |
| 2305 | Project is successfully deleted. |
| 2318 | Projects successfully listed. |
| 2321 | Project status is successfully updated. |
Errors
| Error Code | Error Message |
|---|---|
| 1000 | Authentication error |
| 1001 | Forbidden |
| 1002 | Your API access is suspended |
| 1003 | Secure connection required. Please use https to connect |
| 1004 | Must use POST to send API key & function |
| 1005 | Your API seat access is suspended |
| 1011 | API key is missing |
| 1012 | Invalid API key |
| 1013 | Expired API token |
| 1014 | Invalid API token |
| 1015 | Invalid API token |
| 1017 | Your project access is suspended |
| 1050 | Gone. API endpoint is not available |
| 1051 | Invalid API Key parameter |
| 1052 | Invalid parameters detected |
| 1101 | Request limit exceeded |
| 1104 | Project creation limit reached. |
| 1110 | Exceeded number of clients |
| 2100 | Syntax error |
| 2101 | Unknown parameter |
| 2119 | Invalid format |
| 3000 | Internal Error |
| 3001 | Service Unavailable. Api is down or being upgraded |
| 3002 | Server capacity exceeded |
| 3003 | Database server is down. We expect to be back shortly |
| 3103 | Gateway timeout. Please try again |
| 2300 | Method not allowed. |
| 2301 | Unauthorized user. |
| 2302 | Project id is required |
| 2306 | Project could not be created |
| 2307 | Project could not be updated |
| 2308 | Project could not be deleted |
| 2309 | Project name is required is required parameter. |
| 2310 | Project name size is not valid. |
| 2311 | Project name is not valid. |
| 2312 | Project description is not valid. |
| 2313 | Project creation limit reached. |
| 2314 | Project is already deleted or project is not assioated with your account. |
| 2315 | Project already exists for your account. |
| 2316 | Project already deleted. |
| 2317 | Project description size is not valid. |