How to Call API in WSO2 Business Process Server( BPMN) to get list of Claimable Task - api

In order to integrate the WSO2 BPMN with an external application, I want to make an API call to get all the Package Name or Claimable Task from the WSO2 BPMN. Currently there is no documented ways to make such calls.
When I used the fiddler, to capture the actions from the WSO2 web pages, I see the call made as
https://XX.XX.XX.XX:9443/bpmn-explorer/claimableTask?pagination=1
where the response is entire HTML page but not just the data.
Can some one please explain to me if it's possible to achieve this and where can I find further information regarding this.

If you are creating your own external web application or any other client application, you can use BPMN REST API provided with WSO2 BPS you can get information and do any updates for BPMN processes using it. Please follow [1] for more details.
[1] https://docs.wso2.com/display/BPS350/BPMN+REST+API
Thanks,
Mili

Related

Need a Rest API which should provide Sever monitoring information?

I need a server monitoring REST API which should provide the below points. can anyone suggest which one is best? I have found some tools like Nagios, Zabbix and Grafana but not sure they will provide Rest API.
1)Server Response time monitoring
2)Ping monitoring
3)Port monitoring
4)Graph event presentation & Logs APIs?
4)CPU, Harddisk, memory, Apache and Monitoring, etc.
Purpose of required API
This API will integrate the A application and gathering information from the C application then we can consolidate represent the custom graph in A application as per JSON result.
Any suggestions would be great.
Both Nagios and Zabbix do actual data collection, but Grafana only visualizes the data so you'll be looking at the former for this API. Both have a JSON API:
https://www.nagios.org/ncpa/help/2.2/api.html
https://www.zabbix.com/documentation/current/manual/api

How can I integrate several APIs into a standard API, with WSO2 API Manager?

I am creating an application that needs to obtain information from multiple APIs and I want to create a standard API that allows me to have access to all the others. just changing from a url to direct me to other APIs.enter image description here
It is something like that, in reality there are more than 500 APIs, but it is an application that I treat that consumes almost 100 at the same time, but since there are many servers that are being asked for information, I think it would be more advisable with an API gateway , to control from a single link
From what you have explained, it seems like there are two main use-cases here
Have a single proxy to multiple backend services
Even though only the APIM is enough, the ideal approach here is to have a separate integration layer which is WSO2 EI. Inside WSO2 EI, you can use clone mediator to clone a single request and send it to multiple backends and then when all the requests are completed the aggregate mediator can be used to combine all the responses and send back to the client.
Use dynamic backend URLs
Dynamic Endpoints can be configured on WSO2 APIM and with that approach, APIM has the capability to decide the backend endpoint, on the runtime.
In case, the use-cases which have on your mind are a bit different to what I have explained here, similarly, you can achieve that by a mediation sequence but whether you want to have a separate integration layer or just an APIM layer is enough have to be decided by closely analyzing the use-cases.

Zapier - Xero: Custom Integration

Has anyone managed to create a custom integration between Zapier and Xero by using the 'Webhooks by Zapier' option and a private connection on the Xero side?
At the moment Xero uses Oauth-1a to create sessions and I can't figure out how to even approach this.
I know Zapier has a normal integration with Xero, however I am interested in doing something which isn't available in their integration (create manual journals) and for this I need to figure out how to do the connection manually.
Thanks
Have you taken a look at Xero's Private Application Auth documentation? The private key you create becomes your Consumer Key for API calls. Unfortunately, from there, you do need to do a little coding to support Oauth1 in Zapier.
You have two options:
You could use a serverless function platform like Google Cloud Funtions or AWS Lambda to host your code and use one of Xero's SDKs (like pyxero). You then use a webhook step in Zapier to call the function.
This option is the most robust since and avoids Zapier code limits
You can use a Zapier code step to place the call. In order to do this, you will need to create your own Oauth1 header for your call. You can look at the post HERE by Eliot Muir.
You'll see on lines 32-34 of his example output the headers that need to be included. He has done the hard work of crafting them so you would just need to pull the relevant code and strategy.
This is the most streamlined solution, but you do have to deal with Zapier's lack of 3rd-party packages and a 10-second timeout

Salesforce: How to get the Enterprise WSDL using the API?

I need to access the Enterprise WSDL using the Salesforce API in my Java app. Can anybody help with this?
Salesforce WSDLs are only available in the Salesforce UI, not through the API. You can get them at:
Setup | Develop | API
If you find that need to get the Enterprise WSDL at runtime because your application needs to work with different sets of objects and fields, you should probably be using the Partner WSDL instead. It will allow you to get all the object and field descriptions at runtime and make dynamic API calls. There a little more work upfront, but results in a more flexible and resilient application. When the objects and fields change in the future, your application will continue to work without re-consuming the WSDL.
The WSDL is not available through the Salesforce API (to my knowledge). However, it is available through a REST call if you have the right information. First, you need a session token, generated through either an OAuth handshake or a username/password+security token handshake. You also need the name of the Apex class from which you generated the WSDL. With those two things, you can perform a GET. See the following pseudo-code for the requisite GET structure.
GET https://<SANDBOX_INSTANCE_URL>/services/wsdl/class/<APEX_WSDL_CLASS_NAME>?isdtp=p1
Headers:
'Cookie' : 'sid=<SESSION_TOKEN>'
EDIT:
I verified that this works with both Enterprise/Partner WSDLs and WSDLs generated from custom Apex classes.
You can use the following generic URLs for these WSDLs, as of v41.0:
Partner: https://<SANDBOX_INSTANCE_URL>/soap/wsdl.jsp
Apex: https://<SANDBOX_INSTANCE_URL>/services/wsdl/apex
Metadata: https://<SANDBOX_INSTANCE_URL>/services/wsdl/metadata
Tooling: https://<SANDBOX_INSTANCE_URL>/services/wsdl/tooling
Tooling (Enums): https://<SANDBOX_INSTANCE_URL>/services/wsdl/tooling?enumStyle=ALL_STRONG

How to add custom field in salesforce leads through rest api?

Hi
I am currently working on an application which is implementing salesforce.com REST api. I have done all the authentication part and received all the info needed. Now I want my application to push the leads into the customer's account. But the lead fields can be customized and different customer use their different custom fields, so any1 can suggest me how to add that custom field in my form which will be pushed to the customer's salesforce account.
Thanks
You can use the describe resource in the REST API to obtain the metadata about the Load object, including all the fields.
https://{someinstance}.salesforce.com/services/data/v20.0/sobjects/lead/describe
You can use the list of fields to drive your form, and to control what you subsequently POST to /services/data/v20.0/sobjects/lead to create the new lead.
Here's the link to the REST API pilot docs incase you haven't seen them
No idea if the REST API supports describe() calls, they're a way of querying for all metadata about table (columns, their types etc). In normal webservice API this info can be found at http://www.salesforce.com/us/developer/docs/api/index_Left.htm#StartTopic=Content/sforce_api_calls_describesobject.htm#topic-title
the Metadata REST API was put on hold by Salesforce, so there is no REST API for Metadata (there is some limited support in the Tooling REST API, but not enough to create an object).
https://salesforce.stackexchange.com/questions/20763/creating-a-custom-object-using-rest-api