Working with softlayer instances and images using powershell - powershell

I am new to this powershell scripting and also to the IBM's softlayer. Can anyone provide me the exact guide for connecting to the softlayer using powershell scripts and working with them like creating devices, starting and stopping e.t.c.

Neeli, a good point of start is the following https://sldn.softlayer.com/article/Softlayer-API-Overview.
And currently SoftLayer API provides support for SOAP!, XML-RPC or REST protocols.
Besides SoftLayer API can be used many programming language that support the previous mentioned protocols, please review the following link https://sldn.softlayer.com/ to know more about each one of them and all the information about what IBM SoftLayer API provides.

Here you can see an example about how to use powershell and softlayer:
https://softlayer.github.io/tags/powershell/
The example is just performing REST calls to the Softlayer API, so you just need to know how to permor those REST calls.
In documentation you can see how to create a virtual guest or bare metal server using simple Rest calls:
http://sldn.softlayer.com/reference/services/SoftLayer_Hardware_server/createObject
http://sldn.softlayer.com/reference/services/SoftLayer_Hardware_server/createObject
In https://stackoverflow.com/questions/tagged/softlayer you can find many questions about how to use more Softlayer API methods. You just need to know how to do it using REST calls and just write that call to your powershell script.

Related

MATLAB Rest API/Rest API Web Service and Matlab Production Server

A consulting client will provide a REST API and I need to connect to it through a locally installed on-premises Matlab (not Matlab Production Server), download and crunch some data and then send the results back.
I don't have experience with REST API yet so please excuse if I am mixing terms.
Right now I am trying to understand which is the relevant documentation for me and there are two options I am looking at:
The methods listed here - https://nl.mathworks.com/help/matlab/internet-file-access.html?s_tid=CRUX_lftnav , all relate to a RESTful Web Service. I don't know yet if the client has a REST API that can be categorized as a web service (I am going to use it to access some client data) - would anybody know what the 'standard' use case for a REST API is and if it will likely be considered as a 'web service'? I guess the 'web' service part refers to the HTTP protocol and it does need to be a website?
Then there is a bunch of documentation related specifically for the Matlab Production Server, which seems to me to be a more general version of dealing with REST APIs - https://nl.mathworks.com/help/mps/restful-api-and-json.html
However, if I understand it well, the second option is exclusive to MPS (and this is not what we will be using to access the API - we will be using standard Matlab Standalone desktop version)
Appreciate any help and clarifications!
p.s. I have read REST api vs REST Webservice vs RESTFul web service and that has cleared some questions on the difference between REST Api and REST API web service but it is still somewhat unclear in my head.
Sounds like you want to use webread and webwrite.
The MPS stuff is where MATLAB acts as the REST API, i.e. MATLAB is the server...
With webread and webwrite you can read/write data to/from an external server that's nothing to do with MATLAB.

Alchemy API in Matlab

Is it possible to use the Alchemy API in Matlab? I want to call the URLGetTextSentiment method, without using other IDE's.
Would be great if you have some experience with that and share it with me.
AlchemyAPI provides REST API endpoints for all text-mining and content analysis functionality. You can call those REST APIs from wherever you need, once you know your API key. In Matlab you can interact with RESTful web services using webread and webwrite.

Need help getting started with making REST services using GAE

I've just started on a small project to create some REST services using Google App Engine and Java. I'm new to both technologies, but I've done some reading on both. I'm familiar with SOAP (have used them previously), and I think I understand the conceptual differences between REST and SOAP.
Currently I need info regarding two things:
1) I'm trying to find some tutorial which builds a simple REST service from scratch for deploying on Google App Engine (GAE). The simpler the better, but it should have at least a few routing options. I don't need any UI, if that matters.
2) Which RESTful Framework should I use with Google App Engine. Again, simplicity is what I'd like, and something which has tutorials and a newcomer can easily grasp.
My ultimate goal is to just write a REST wrapper with multiple routing options, which eventual consumes some pre-existing SOAP services and returns their results.
Have you checked out Google Cloud Endpoints for creating a REST service? Its pretty simple and straightforward, also has support for OAuth.
I would give Jello framework a try. It offers a clean, and simple to follow, JSON format and provides a very powerful and comprehensive RESTful implementation that follows the OData specification.
Here is Jello's REST development guide: http://jello-framework.com/guide/rest.html

Adding REST support to application

I have a requirement to provide REST support to my application. Currently my application is in Linux, it has CLI commands available to configure it. I want to add REST API support to it such that I can configure my application using REST calls too. I want to have a simple HTTP server just for the REST calls and then map those requests to the respective CLI commands for addition, deletion, updation.
Can anyone provide me some info on what I should look at, tools available to perform the same, some good links to look at.
You could try subclassing the http.server.BaseHTTPRequestHandler class in Python3.
It has a simple interface for your needs. Simply add the do_<Method Name> functions to your subclass that respectively create the command line arguments and invoke your application.

Easiest way to interface between a web app and SAP

Greetings!
I've spent some time researching how to communicate with SAP from a PHP web application, but the documentation is more than spare. The ways I found are:
Creating IDoc files, some sort of proprietary plain-text format. But how do I stick them in SAP when they are created on the webserver?
Coding a Windows Application using the SAP BAPI. This way, you have full control and access - but also a lot of pain.
Accessing the RFC (Remote Function Calls), preferrably via SOAP. This would be the best way to connect to a web app.
What I could not find out is: what is the easiest way to connect? Which versions of SAP support SOAP? Anything I've missed?
Thanks for your help!
How you connect to SAP is dependent on what version of SAP, your SAP license and what you're connecting with and what you are trying to do.
If you are trying to access SAP standard functionality - i.e. Read or Update a SAP Service Order, the standard BAPI should allow you to do what you need. (Note that a BAPI is just an RFC with a standard API, which is released for customer use by SAP).
There are various connectors to SAP, but for newer releases of SAP (2004s and later) many RFC function modules are exposed as webservices, which should be ideal for your purposes.
You may have to ask an ABAP developer (or even a non-developer with SAP experience) to help you find which RFC's are available and whether they are exposed as webservices. (If not an ABAP developer should be able to wrap BAPI as a webservice with a simplified interface).
If you are trying to do something that SAP have not provided prior functionality for, or perhaps access custom developed objects you will definitely need the assistance of an ABAP developer to exposes an RFC to you.
Depending on your system setup there may be some system administration tasks to be done in order to allow you to access the SAP system. Whether by RFC or otherwise. (Useful transactions to search for are SICF and SOAMANAGER). The SAP Basis administrator may also need to set up some RFC connections for you.
If your company uses SAP PI/XI or a non-SAP integration engine, it may be easier to connect but that would be in very limited cases.
I've used IDOCs before for single message transfer, but I'm not sure that it would have any advantage over BAPI's or webservices for any Business Type transactions. Although IDOCs have been around for a while and may be quite stable if standard ones exist.
I have to admit that I've only scratched the surface around connecting to SAP, but I hope this is useful.
The third option is the easiest.
Accessing the RFC (Remote Function
Calls), preferrably via SOAP.