Webservice API

Get Challenge

Get Challenge

get

This endpoint is used to get a challenge token for login.

Query parameters
operationstringRequired

The operation to be performed. In this case, it should be "getchallenge".

Example: getchallenge
usernamestringRequired

The username of the user trying to get the challenge.

Example: [email protected]
Responses
200

Challenge Response

application/json
get
/webservice.php?operation=getchallenge
GET /webservice.php?operation=getchallenge?operation=text&username=text HTTP/1.1
Host: 
Accept: */*
{
  "success": true,
  "result": {
    "token": "text",
    "serverTime": "text",
    "expireTime": "text"
  }
}

Login

Login

post

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.

Body
operationstringOptional

The operation to be performed. In this case, it should be "login".

Example: login
usernamestringOptional

The username of the user trying to login.

Example: [email protected]
accessKeystringOptional

The access key for the user. This should be a MD5 hash of the concatenation of the token and the user access key.

Responses
200

Login Response

application/json
post
/webservice.php?operation=login
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

Retrieve Operation

get

This endpoint is used to retrieve data from the system.

Query parameters
operationstringRequired

The operation to be performed. In this case, it should be "retrieve".

Example: retrieve
sessionNamestringRequired

The session name, which is obtained through the Login Operation.

idstringRequired

The ID of the data to be retrieved.

Responses
200

Retrieve Operation Response

application/json
get
/webservice.php?operation=retrieve
GET /webservice.php?operation=retrieve?operation=text&sessionName=text&id=text HTTP/1.1
Host: 
Accept: */*
{
  "success": true,
  "result": {}
}

Create

Create Operation

post

This endpoint is used to create new data in the system.

Body
operationstringOptional

The operation to be performed. In this case, it should be "create".

Example: create
sessionNamestringOptional

The session name, which is obtained through the Login Operation.

elementstringOptional

The data to be created, in URL-encoded JSON format.

elementTypestringOptional

The type of the data to be created, which corresponds to the module name.

Responses
200

Create Operation Response

application/json
post
/webservice.php?operation=create
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

Update Operation

post

This endpoint is used to update existing data in the system.

Body
operationstringOptional

The operation to be performed. In this case, it should be "update".

Example: update
sessionNamestringOptional

The session name, which is obtained through the Login Operation.

elementstringOptional

The data to be updated, in URL-encoded format.

Responses
200

Update Operation Response

application/json
post
/webservice.php?operation=update
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