Salesforce Bulk API test in postman - salesforce

How to test salesforce bulk API in postman? Do we really need WSDL to work with bulk api?

I believe that you can do this but it would require manually writing the soap envelope for each request (see example). However I would suggest using SoapUI which lets you import wsdl files and create sample request. All you have to do is provide the inputs, the opensource version is free and would meet your needs.
You dont "need" the wsdl but it makes it easier to determine the call you can make and the parameters you need to pass for the calls, because it describes the webservice that you are trying to use, and because it's a standard many applications support it.

You can use WorkBench to test salesforce's API otherwise you can use postman to test the REST API of salesforce as described in the documentation

Related

Sending User Input from IBM Watson Assistant to Database or via E-Mail

I want to implement an evaluation feature to my chatbot. User would be able to rate service on a scale of 1 to 5 and make suggestions.
I guess I would use slots for that and store the provided data in a variable.
What would be the easiest way for me to save and access that data later?
Somehow I need to write it to a database and make that database easily accessible. Or ideally having Watson sending an email with the feedback to myself.
Is there an IBM Cloud Database service available for that?
What would be my first steps in order to achieve this? Maybe you have some tips or documentation links, or even code snippets if it's not to much work for you.
I used IBM Cloud functions to get a joke from an API to Watson via webhook. I used code from the internet. So I am somewhat familiar with the concept, but I need more guidance and couldn’t find anything helpful. Basically I know nothing about NODE.
I would recommend the tutorial and its code on how to build a database-driven Slackbot with Watson Assistant. It uses a webhook and Cloud Functions to interact with a database for various actions. You could use that as blueprint for setting up the webhook and see how the database is invoked.
Make sure to secure the webhook. This can only be done using the command line (CLI), see the Cloud Functions doc on securing web actions.

How to Automate web api testing using Selenium

I want to automate web api testing, but I am a beginner to automation. I have list of REST API's which I want to automate. Can someone please suggest from where should I start? Can I use Selenium to automate?
You can write test cases with postman and test all your web apis.
Like test response time, status code, content-type and much more.
here is one simple example. Type this in the test tab of postman.
var contentTypeHeaderExists = responseHeaders.hasOwnProperty("Content-Type");
tests["Has Content-Type"] = contentTypeHeaderExists;
if (contentTypeHeaderExists) {
tests["Content-Type is application/json"] =
responseHeaders["Content-Type"].has("application/json");
}
Advanced use cases includes grouping and saving different types of APIs by their modules types.
for more details check this blog
You can use any of the external libraries out there to automate the REST APIS. Below are few of them you can use:-
REST Assured Library
HTTP Client
Once you are done with the API Automation using external libraries you can club the same with Selenium to develop Integration Tests which will perform some work on FrontEnd using Selenium library and it can also perform some Backend work using any of the aforesaid clients.

Is there any restful api for postgresql?

Im trying to develop a web app using angularjs, restangular and postgresql, im using ubuntu and xampp for development. I found ArrestDB, a restful api for postgresql. In its documentation,
# Get all rows from the "customers" table where the "country" field matches "Australia" (LIKE)
GET http://api.example.com/customers/country/Australia/
https://github.com/alixaxel/ArrestDB
While in restangular documentation,
// Just ONE GET to /accounts/123/buildings/456
Restangular.one('accounts', 123).one('buildings', 456).get()
https://github.com/mgonto/restangular
Do you guys know a free RESTful api for postgresql that works well with restangular?
ArrestDB interprets api/{Table}/{Field}/{....} while Restangular interprets api/{table}/{id}/{relations table}. I also tried api/{table}/{id}/{relations table} in ArrestDB but I get error 404.
I also found Postgrest in github but its in haskel, and i'm not familiar with haskel.
Thanks...
Postgrest seems to be a very viable choice. There is no knowledge of Haskell required to interact with it.
I have used PostgREST and recommend it. It is written in Haskell but requires no knowledge of Haskell (in the same way that pg is written in C, but no knowledge of C is required to use it). The documentation at postgrest.com is quite helpful and I've been able to get up to speed with it quickly. Best practices are to run pgREST through a reverse proxy (Apache, Nginx, etc.) to control web authentication and authorization. PostgreSQL will enforce permissions GRANTed to the configured pgREST user (INSERT, UPDATE, DELETE, etc.) on the DB served up by pgREST. There are a number of access control options listed in the pgREST documentation for switching user roles as requests come in, so the access control is pretty flexible in accommodating different usage scenarios.
You can use Express.js and Node.js to create RESTful API for example. It works with PostgreSQL well. I am using it now for my application, so I have a PostgreSQL DB, back-end in Express.js with pg-promise and Node.js and front-end in AngularJS with Restangular.
You can try
this tutorial,
this guy has a quite good blog about building API and other useful things.

Integrating RESTFUL api in my application

Integrating RESTFUL api in my application.
I've to use restful services in my new project. I'm using CakePHP 2.0.6
I do not want to create a restful services. I've to use restful services.
I want to know is there any ready made component is available in CakePhp to read restful services.
I want that component to serve me the output based on my services by doing the rest in the background.
Additionaly if the component is able to log it then it will be well and good.
A REST API is more a concept than a standard set of protocols, therefore there is no uniform way to interface with the APIs of different providers. Twitter has its own REST API, while Facebook provides another.
Most big webservices provide PHP classes to simplify interfacing with the API. For Twitter there's a third party library called TwitterOAuth and Facebook provides a PHP SDK. These can be loaded as Vendor files in CakePHP. See an earlier answer of mine regarding the loading of vendor files or this older post related to the 1.3 branch of Cake, but still relevant.
Several Cake developers have developed plugins for Cake to interact with popular webservices like the Facebook Plugin by webtechnick. Whereas loading vendor packages is the framework's equivalent of including them like you would in a plain PHP script, loading plugins is a bit different and might simplify things even more (or make them more abstract). The Cake manual entry on plugins has more information.
I've found a PHP Class from http://www.phpclasses.org Which is looks like taking care of most of the REST API part, And it worked for me for my purposes. It has got nice example file which will demonstrate how to use that class.
I've converted this class into Cakephp component. Here is the URL to download the class.
http://www.phpclasses.org/package/5480-PHP-Send-Web-services-requests-to-REST-servers.html
Check out CakePHP's HttpSocket utility. I have not used it yet but I think it's just an API for cURL which sounds like what you need. http://book.cakephp.org/2.0/en/core-utility-libraries/httpsocket.html

salesforce rest api

I am new to salesforce. I need to know how to design a WSDL for salesforce REST API inorder to connect salesforce service?
I have a doubt, is it possible to do a GET request(sales force has REST access) on sales force resources and create xsd based on the response xml received for each request?
But I cant able to find particular schema available for salesforce.
or
Is there any other way to design a WSDL for REST API?
Thank you for your answer in advance
For the REST API, you don't need to use the WSDL. You can explore the API by going to
https://{instance}.salesforce.com/services/data/v24.0
For an interactive explorer, check out apigee's salesforce console:
https://apigee.com/console/salesforce
You can also use Workbench to make REST calls to Salesforce:
http://wiki.developerforce.com/page/Workbench

Resources