Webservice API
Get Challenge
This endpoint is used to get a challenge token for login.
The operation to be performed. In this case, it should be "getchallenge".
getchallengeThe username of the user trying to get the challenge.
[email protected]Challenge Response
Bad Request
GET /webservice.php?operation=getchallenge?operation=text&username=text HTTP/1.1
Host:
Accept: */*
{
"success": true,
"result": {
"token": "text",
"serverTime": "text",
"expireTime": "text"
}
}Login
This endpoint is used to login to the system. The accessKey should be a MD5 hash of the concatenation of the token and the user access key.
The operation to be performed. In this case, it should be "login".
loginThe access key for the user. This should be a MD5 hash of the concatenation of the token and the user access key.
Login Response
Bad Request
POST /webservice.php?operation=login HTTP/1.1
Host:
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 66
"operation='login'&username='[email protected]'&accessKey='text'"{
"success": true,
"result": {
"sessionId": "text",
"userId": "text",
"version": "text",
"vtigerVersion": "text"
}
}Retrieve
This endpoint is used to retrieve data from the system.
The operation to be performed. In this case, it should be "retrieve".
retrieveThe session name, which is obtained through the Login Operation.
The ID of the data to be retrieved.
Retrieve Operation Response
Bad Request
GET /webservice.php?operation=retrieve?operation=text&sessionName=text&id=text HTTP/1.1
Host:
Accept: */*
{
"success": true,
"result": {}
}Create
This endpoint is used to create new data in the system.
The operation to be performed. In this case, it should be "create".
createThe session name, which is obtained through the Login Operation.
The data to be created, in URL-encoded JSON format.
The type of the data to be created, which corresponds to the module name.
Create Operation Response
Bad Request
POST /webservice.php?operation=create HTTP/1.1
Host:
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 81
"operation='create'&sessionName='text'&element='text'&elementType='text'"{
"success": true,
"result": {}
}Update
This endpoint is used to update existing data in the system.
The operation to be performed. In this case, it should be "update".
updateThe session name, which is obtained through the Login Operation.
The data to be updated, in URL-encoded format.
Update Operation Response
Bad Request
POST /webservice.php?operation=update HTTP/1.1
Host:
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 60
"operation='update'&sessionName='text'&element='text'"{
"success": true,
"result": {}
}Last updated