UPDATE and REVISE rest api is not working in vTiger CRM cloud service - api

So basically I need to use the update/revise Rest API to update the fields in the vTiger CRM.
But when I am using the rest API (link : https://help.vtiger.com/article/147111249-Rest-API-Manual) to update the fields, I am getting the error as "400 Unsupported operations: The request cannot be fulfilled due to bad syntax."
My api : endpoint/reviseelement=convert_into_json_string({id:5x369, potentialname:'demo2'})
Also apart from this, I had used the SQL query Rest API, to update the record in the modules, but it is also giving me the same error as: "400 Unsupported operations: The request cannot be fulfilled due to bad syntax."
My Api query : endpoint/query?query=UPDATE Potentials SET potentialname = 'demo2 where id = 5x369;
Also by using the webservice(https://community.vtiger.com/help/vtigercrm/developers/third-party-app-integration.html) rest api I am getting error like : "Permission to perform the operations is denied for id: ".
So how can I use the update api. Can anyone please help?

For web services API (https://community.vtiger.com/help/vtigercrm/developers/third-party-app-integration.html),
When you pass the payload data, make sure you're passing the x-www-form-urlencoded form of data.
Also, make sure you're passing 'element' argument with value like this:
{"id": "10x11471458", "leadsource": "Facebook"}.
if you're still facing this issue, you can share more details and I'll be happy to help you.

If you still need to do this the following should work.
Method: POST
End Point: /revise
Headers: "Authorization: Basic YOUR_TOKEN"
Body:
{
"element": {
"id":"5x369",
"potentialname": "demo2"
}
}
reference: https://www.vtiger.com/docs/rest-api-for-vtiger#/Revise

Related

Workday Rest API - POST Call For Work Email Change

I currently have a use case where I need to update work email for users in Workday using Workday Rest API. I have added all the required scopes and BP permissions but still have been receiving the below error when I try to do the POST staffing/workers/{ID}/workContactInformationChanges
{
"error": "not found: staffing",
"code": "S21"
}
Is there any additional permissions that need to be enabled in order to get access to the staffing api collection?
When I was setting up the connection to Workday I had included too much info in the connection URL and was getting this same error,
ex: https://wdX-impl-servicesX.workday.com/ccx/api/v1/XXXx1
Here is what I shortened it to:
ex: https://wdX-impl-servicesX.workday.com
This allowed the API call to construct the rest of the URL... otherwise it was constructing the URL incorrectly like this:
https://wdX-impl-servicesX.workday.com/ccx/api/v1/XXXx1/ccx/api/v1/XXXx1/filename

Can BigQuery report mismatched the schema field?

When I upsert a row that mismatches schema I get a PartialFailureError along with a message, e.g.:
[ { errors:
[ { message: 'Repeated record added outside of an array.',
reason: 'invalid' } ],
...
]
However for large rows this isn't sufficient, because I have no idea which field is the one creating the error. The bq command does report the malformed field.
Is there either a way to configure or access name of the offending field, or can this be added to the API endpoint?
Please see this Github Issue: https://github.com/googleapis/nodejs-bigquery/issues/70 . Apparently node.js client library is not getting the location field from the API so it's not able to return it to the caller.
Workaround that worked for me: I copied the JSON payload to my Postman client and manually sent a request to REST API (let me know if you need more details of how to do it).

Azure Stream Analytics: REST Api for creating new ASA job giving MissingApiVersionParameter error

I want to create new ASA job using rest end point with input output and query for job.
I've followed this link
https://learn.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-job
and formed below url according to above link
https://management.azure.com/subscriptions/{subscription-id}/
resourcegroups/{resourcegroup-name}/providers/Microsoft.StreamAnalytics/
streamingjobs/dynamicStream?api-version=2015-10-01
Though I've provided api version query parameter, postman is giving me below error
{
"error": {
"code": "MissingApiVersionParameter",
"message": "The api-version query parameter (?api-version=) is required for all requests."
}
}
Any idea what am I doing wrong ?
Api for creating new input for stream analytics job is behaving in same way
Thank you for reading !!!
POSTMAN issue !
Tried using different method and it's working .

Softlayer GET API "VirtualGuests" response too big

I am trying to do a GET operation on
GET https://api.softlayer.com/rest/v3/SoftLayer_Account/VirtualGuests?objectMask=powerState%3BoperatingSystem.passwords%3Bdatacenter%3BbillingItem%3BblockDevices.diskImage%3BtagReferences
> Headers: Authorization: Accept : application/json
Response:
{
"error": "Internal Error",
"code": "SoftLayer_Exception_Public"
}
I found out that the results is too big, If I do a resultLimit on the API it works.
My question is, I have instance Id with me how Can I include it in the above API. I tried adding &id=XXXXXX at the end of the API it didn't work
I think you want to get only the data which contains the instance with ID correct?
well if you want the VM whose id = instace ID you can use the Softlayer_Virtual_Guest::getObject method instead Softlayer_Account::getVirtualGuests
http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/getObject
If you are looking for something more complex you can try objectFilters
https://sldn.softlayer.com/article/object-filters
if you have more questions let me know.

SoftLayer REST API get Bandwidth Data By Date

I have a question regarding the use of the getBandwidthDataByDate request using the SoftLayer REST API.
In the documentation it lists 3 parameters for this request, but it's a GET request. Does anyone know how to make this request and/or have an example?
https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/getBandwidthDataByDate/'device_id'.json
I'm not sure where to add the parameters here.(startDateTime, endDateTime, networkType)
And what does the dateTime object look like?
Thanks
This is a POST request, so you need to pass the parameters in "Payload" (I'm using Advanced REST client for Chrome).
Try the following REST request:
https://$user:$apiKey#api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/$device_id/getBandwidthDataByDate
Method: Post (Copy the below code in "Payload")
{
"parameters":[
"2016-03-10T00:00:00",
"2016-03-15T00:00:00",
"public"
]
}
Note: Replace $user, $apiKey and $device_id with your own information
References:
SoftLayer_Virtual_Guest::getBandwidthDataByDate