NOTE:
To check success of API, refer "ok" field of "data" in response.
Value true would mean success
==========
GET /api/v2/tools/user-agents
Accept: application/json
Query params: device_type=desktop
200 Success
content-type: application/json
{
"ok" : true,
"data" : {
"desktop_user_agents" : [ {"label: "Desktop Windows 10 / Chrome 57", "id: 18}, {"label: "Seoradar", "id: 19}, ... ]
}
}
GET /api/v2/tools/user-agents
Accept: application/json
Query params: device_type=mobile
200 Success
content-type: application/json
{
"ok" : true,
"data" : {
"mobile_user_agents" : [ {"label: "Mobile iOS 9.2 (iPhone) / Safari", "id: 31}, {"label: "Mobile iOS 7.1 (iPad) / Safari", "id: 32}, ... ] }
}
GET /api/v2/tools/user-agents
Accept: application/json
Query params: None
200 Success
content-type: application/json
{
"ok" : true,
"data" : {
"desktop_user_agents" : [ {"label: "Desktop Windows 10 / Chrome 57", "id: 18}, {"label: "Seoradar", "id: 19}, ... ],
"mobile_user_agents" : [ {"label: "Mobile iOS 9.2 (iPhone) / Safari", "id: 31}, {"label: "Mobile iOS 7.1 (iPad) / Safari", "id: 32}, ... ]
}
}
==========
POST /api/v2/tools/compare-urls
Accept: application/json
params : {
"first_url" => "https://storyweaver.org.in/about/our-story",
"second_url" => "https://uat.pbees.party/about/our-story",
"device_type" => "desktop", // can be "mobile" also
"user_agent_id" => 31,
"use_proxy" => true,
"crawl_type" => "fetched" // can be "rendered" also
}
202 Response Accepted
content-type: application/json
{
"ok" : true,
"data": {
"id": 509,
"message": "processing.."
}
}
400 Bad Request
content-type: application/json
{
"ok" : false,
"data": {
"id": 509,
"message": "invalid url"
}
}
500 Internal Server Error
content-type: application/json
{
"ok" : false,
"data": {
"id": 509,
"message": "server error"
}
}
==========
GET /api/v2/tools/check-status
Accept: application/json
Query params:
id: 509
diff_format: 2
diff_type: 1
diff_category: "Compare Fetched URLs"
200 Success
content-type: application/json
{
"ok" : true,
"data" : {
"id" : 509,
"status" : true
}
}
==========
GET /api/v2/tools/content-diff
Accept: application/json
Query params:
id: 509
diff_format: 2
diff_type: 1
diff_category: "Compare Fetched URLs"
200 Success
Content-Type: application/json
{
"ok": true,
"data": {
"id": 509,
"html": ""
}
}
500 Internal Server Error
Content-Type: application/json
{
"ok": false,
"data": {
"id": 509,
"message": "server error"
}
}
There may be more error codes for this API