Where is the Netsuite Webservices Postman Collection? - rest

In Netsuite's REST web services help documentation, there's a reference to a Postman collection:
https://netsuite.custhelp.com/app/answers/detail/a_id/86958/kw/postman
You can download the REST web services Postman environment template and collection of sample requests from the SuiteTalk tools download page at https://[accountID].app.netsuite.com/app/external/integration/integrationDownloadPage.nl. To access the page, you must substitute your account ID in the URL.
Note To access the Postman environment template and collection, the REST Web Services feature must be enabled, and you must have the REST web services permission assigned to your role. For more information, see REST Web Services Prerequisites and Setup.
However, when I go to the download page (with the correct account ID and REST web services permission), there's only a download available for "NetSuiteDataLoader.zip", which does not contain the postman collection.

Figured this out, a few pages deep in the documentation.
REST web services need to be enabled on the account first.
https://netsuite.custhelp.com/app/answers/detail/a_id/87117
Setup > Company > Enable Features (Setup Tasks)
Click "Suite Cloud" tab
Scroll to "SuiteTalk (Web Services)" section.
Tick "REST WEB SERVICES (BETA)" and accept the T&Cs.
You also need to be a user with REST Web Services and SuiteAnalytics Workbook permissions.
Administrator already has these, but if you need to add them:
Go to Setup > Users/Roles > User Management > Manage Users.
Locate the role you want to modify. Click the corresponding Edit or Customize link.
On the Permissions subtab, click Setup.
In the Permission list, select REST Web Services.
In the Level list, select Full.
Click Add.
On the Permissions subtab, click Reports.
In the Permission list, select SuiteAnalytics Workbook.
In the Level list, select Full.
Click Add.
Click Save.
Once all that is done, when you go to https://[accountID].app.netsuite.com/app/external/integration/integrationDownloadPage.nl
you will see a link to NetSuiteRestApiSampleRequests.zip - which contains the postman collection.

If it still doesn't work try to put a tick on WEB SERVICES ONLY ROLE
Setup > Users\Roles > Manage Users >
Find the current role that you want to give access to and Save.
After entering ID of your account on that current role - you will see another folder with NetSuite REST API Sample Requests name.

Related

Enable single sign on for the applicaton

I am learning SSO, so familiar with basic concepts.
I have a web application(Ruby on rails), where users are saved in Postgre DB (in AWS).
The users want to log in to another service(Rollbar) using the same user credential that they use in our application. In other words, I want to move the application's user information to an identity provider, so that the users can log in with the same credentials to the application and Rollbar using SSO.
One option I thought of is to move the users to Google workspace or Azure AD, but that is too much as I am not looking for any additional features
I did see services like Auth0 and Okta - just wondering whether I am going in the right direction
Any service name or links to documentation is appreciated

Why does it appear I am signing into googleusercontent.com when doing gapi.auth2.getAuthInstance().signIn() from a GSuite Add On?

I have written a GSuite Add On that makes Google Rest API calls using https://developers.google.com/docs/api/reference/rest/v1/documents. To make those calls my Add On needs to be authenticated to Google using the right scopes. So I took the usual web app code that I am used to:
gapi.auth2.getAuthInstance().signIn()
Before that
gapi.client.init()
is called with an API Key and Client ID. The Client ID is associated with a project in https://console.developers.google.com/ - let's call it Mike Add On. I had to configure the uri that is hosting my add on as an authorised origin - it was something like
https://n-5eu5f2kfjyztq5mypu757655tecik5nd52mv7sztq-0lu-script.googleusercontent.com
I would expect the project name (Mike Add On) to come up in the OAuth Consent screen when a user of my add on logs in. But instead I get
Choose an account to continue to googleusercontent.com
Why is googleusercontent.com coming up as the app name, instead of the one associated with the Client ID?

Bluemix API connect configuration

WE have our REST services deployed using bluemix container groups. Can some one tell me how to configure access to these APIs through Bluemix API Connect? I Created product, catalog. Also imported my swagger in catalog. I can see the APIs listed. but not able to access them. Can someone guide?
Since you've already created a product, I'll assume that you've already added your API(s) to that product. If not, do that now.
Once you've done that, look for the Stage menu (the little "Cloud with an up arrow" icon) in the upper-right-hand corner of the product detail page. From the corresponding menu, select the catalog you want to stage the product to.
After that completes successfully, navigate to the API Connect dashboard and click on the catalog to which you just staged the product. At this point, you should see the product and its status will be listed as "Staged."
Click the overflow menu (three dots) on the right-hand side of the product row and select "Publish" from the resulting menu. You can likely accept any default visibility settings. Once that operation completes, the API will now be accessible via the catalog's gateway URL + API base path. (You can find this in the Catalog settings -> Endpoint panel.)
For more information on publishing APIs, see this documentation: https://console.bluemix.net/docs/services/apiconnect/apic_006.html#apic_010
Or if you want to use the CLI: https://www.ibm.com/support/knowledgecenter/en/SSFS6T/com.ibm.apic.toolkit.doc/capim-toolkit-cli-publish-apis.html#concept_nll_3ry_xv__publish_apis
on Bluemix to call your api , you need to "publish" your product to a portal. First of all prepare your Portal:
Go to Dashboard -- > Your Catalog -- > Settings -- > Enable Portal and select Portal-Delegated-User-Registry.
After some time , you will be accessing your portal . Subscribe new user through that portal. Portal GUI is very helpful. You will be able to learn by yourself how to call your API.
Good luck!

Visual Studio Team Services Package Management API

So, much research has shown that the only way to push a NuGet package to the VSTS Package Management is with the CLI tools vs the NuGet Package Explorer app. So, I'm hoping to fix that to make life easier.
Initial research makes me think that I can use one of the REST APIs that Microsoft offers. When I use the link below in Postman, I get the response back that would normally be the Microsoft login page, which is what I would expect when I'm not passing any authentication in the GET request.
https://fabrikam.feeds.visualstudio.com/DefaultCollection/_apis/packaging/feeds/EngineeringInternal/packages?api-version=2.0-preview
However, when I replace the demo account and feed name with my own, I get a 401 error.
https://sartainsoftwaresolutions.feeds.visualstudio.com/DefaultCollection/_apis/packaging/feeds/SartainSoftware.Common/packages?api-version=2.0-preview
Unless I have to enable access to the given API in my VSTS account, I'm not sure what I'm missing.
Any thoughts?
First, regarding 401 issue, you need to specify alternate authentication credential (Profile >Security > Alternate authentication credentials) or Personal access token (user name is empty, do not need to specify), you can’t use email account directly (e.g. xxx.hotmail.com)
Secondly, to push a NuGet Package, you can use this REST API:
Put https://[account].pkgs.visualstudio.com/_packaging/[feed id]/nuget/v2/
Simple steps for Postman:
Using Get feeds/Get a feed REST API to get feed id
Type above push package REST API URL and change request method to PUT
Click Authorization tab
Choose Basic Auth
Leave Username to blank and type Personal Access Token to Password box
Click Headers tab and add a new item (key: X-NuGet-ApiKey; value:VSTS)
Click Body tab
Choose form-data option
Add a new Item: Select File option in Key box and click choose files button to select a nupkg file
Click Send button and the response status result will be 202.
Regarding login page issue, it won't redirect to login page if current user is not authenticated when call REST API. You can authorize access to REST APIs with OAuth.

liferay authentication from soap

I need integrate Liferay (version 6.2) with another service which stores information about users. Communication with service occurs through SOAP.
Is it possible use users from service to authenticate to Liferay?
Liferay integrates with external systems through LDAP already. If you use that interface, you're set. If you need a proprietary API to access user information, you will have some work in front of you.
It might be worth examining the SSO implementation and intercept newly authenticated users on this level: With the user's identity, create or update a Liferay user account on the fly through LIferay's API. To me this looks like the most promising approach from an effort/maintenance point of view, with the little information I have about your situation.
Alternatively you could batch-update all (Liferay-) user accounts from time to time, based on updates in your external system.
Let me see if I understand what need:
1- Step 1: User prompted with A login page.
2- Step 2: The credentials entered by the user are checked against a web service (could be any service)
3- Step 3: The user is either logged in or an auth error displayed to the user.
If that's what you need, then create an autologin hook. The code that call the webs service shall live in the autologin hook.
May seem intimidating, but it is trivial: likely liferay comes with a bunch of them: (take one of them as a template)
auto.login.hooks=com.liferay.portal.security.auth.CASAutoLogin,com.liferay.portal.security.auth.FacebookAutoLogin,com.liferay.portal.security.auth.NtlmAutoLogin,com.liferay.portal.security.auth.OpenIdAutoLogin,com.liferay.portal.security.auth.OpenSSOAutoLogin,com.liferay.portal.security.auth.RememberMeAutoLogin,com.liferay.portal.security.auth.SiteMinderAutoLogin