Problems with created rest services which do not use the normal endpoint in ArangoDb - arangodb

I am using ArabgoDb and it has a really nice feature where I can create new Rest Services.
The functionality is in the menu /Services/Add Service/New
Here I enter some basic data
Author, Name of the Service, Description*:License*, Document Collections, Edge Collections
The Service is installed by pressing /Install/
The service is created but I get the wrong endpoint.
I get http://localhost:8529/_db/_system/Bach/cars
Where Bach is the name of the Service and cars is the document collection
I would like to get
http://localhost:8529/_api/document/cars/
When I run the service in ArangoDb Swagger I get 200 responses with [], so no documents show up.
Does anyone recognize this problem?

Related

How to have google docs api (nodejs) create an empty doc in a particular google account

I have an express.js application where clients authenticate using a local strategy (passport.js). After that I want them to be able to create empty documents with titles of their wish (I create a new mongoose 'Task' document and set its doclink (Task.doclink) to be the newly created document's public link (https://docs.google.com/document/d/...document_id.../edit)).
I want this new document to be created in a particular google account that I have access to (the clients don't have direct access to it but they can create documents inside it and write to it)
Any suggestions of how I should go about authorization of google API? As per my current research, this seems impossible.
What I would recommend you to use is a service account as the docs say:
A service account is an identity that an instance or an application
can use to run API requests on your behalf.
What it means is that you will be able to have a "bot user" in your express app, which could be the interface between your users and your document.
Docs
You can check more about it in these links:
Creating and managing service accounts.
Authenticating users with Node.js.

Azure Easy API on Node.js 'No route registered for '/api/xxx'?

I'm having problems even running a simple Easy API method. I keep getting the response that says "No route registered for '/api/userInfo'".
I know that this location is correct because the I'm opening the App Service editor at https://XXXX/dev/wwwroot/api/userInfo.js
The file also has anonymous access, so there shouldn't be an authorization issue. I'm simply trying to hit the api method from a browser.
The code of this very simple method has been reduced to the following for debugging purposes
module.exports = {
"get":function(){
console.log('whooohooo');
}
};
Is there a setting I'm missing to enable the ability to call Easy API's? I've not been able to find any documentation that states that Easy APIs method must be explicitly enabled, nor can I find any settings related to enabling them.
Please note that I did not set up a Node.js project and deploy it to Azure. I am using an "out of the box" app service.
My end goal is to use an Easy API method go get an authenticated user's email and name, but my efforts have been reduced to confirming that I can call a method. Thanks in advance.
UPDATE:
I've created 3 different mobile App services with no luck and varying advantages.
App Service 1:
This Mobile Apps project is 10 months old and was created in the Azure portal. It has a routing line in the app.js file that suggest that the api route should be present, but doesn't work. I don't remember if i authorized the easy apis when i created it, but the fact that it has the following line suggests that I did
mobile.api.import('./api');
AppService 2:
This project was created in the MobileCenter using the Tables menu option for a Xamarin project. I then navigated to the Azure Portal and hooked up a SQL db to the table. I don't think I had the opt in to use Easy APIs, but the I was allowed to create an Easy API script, then edit it. Upon editing it, I realized that the project had no app.js file. Apparently web apps created via MobileCenter are created differently.
I picked this option because it allows you to use the "per-user" flag when setting up tables and doesn't require you to manually filter out data with a modification to the table's script. Apparently this is not an option if you don't set up an App Service via the MobileCenter??
App Service 3:
I created a brand new project within the portal and followed the the steps Aaron Chen laid out. I opted in, hooked up the table and modified the js file (I created a new one called 'testing'). I browsed to https://zzzzapitestzzzz1.scm.azurewebsites.net/api/testing
and got the dreaded no routes found error. Of course, the API method was created with anon access rights.
Basically, we can easily create an Easy API in the Azure portal.
Select your app service and click on Easy APIs in the MOBILE menu.
Enable Mobile extension for your app by clicking Need to configure Easy Tables/Easy APIs ...
Connect a database and then click Initialize App button.
After app initialized, you can add an API from Easy APIs blade.
Change the userInfo.js file to something like this:
Now, we can access the API with the endpoint http://<yourappname>.azurewebsites.net/api/userInfo.
For more info, please refer to this blog post.

How to get list of services in Azure ML?

Is there an API to receive list of published webservices?
I have workspace id and auth token, I can get list of projects and experiments, but I can't get list of services created from experiments. Specifically I need the URL in order to post requests.
(source: windows.net)
In client api I see if we publish a new service we can get it, but do we have more options?
The R Azure ML API has that. Excerpt from https://htmlpreview.github.io/?https://github.com/RevolutionAnalytics/AzureML/blob/master/vignettes/getting_started.html :
(webservices <- services(ws, name = "AzureML-vignette-silly"))

Azure Mobile Services : GET operation from table

I'm trying to get data from a table I created in Azure Mobile Services.
When I setup the service, I created a new database to go along with it.
I've added a row of data to my table called TODOITEM and can query this row of data fine from the db admin tool on Azure.
Now what I'm trying to do is run a GET request on this table, as documented here...
https://msdn.microsoft.com/en-us/library/azure/jj677199.aspx
I am using Fiddler and trying to send the following request with HTTP 1.1...
https://mobilemeshtest.azure-mobile.net/tables/todoitem
X-ZUMO-APPLICATION: my azure mobile services key
X-ZUMO-AUTH: my facebook authentication key
Host: mobilemeshtest.azure-mobile.net
No matter what I try, all I get back is a 404 not found.
I'm even copying what the guy did in a PluralSight video tutorial on Azure Mobile Services, and he gets a correct 200 response.
I can't see what I'm doing wrong.
404 is pretty simple. The url is wrong.
Propably you have not set your Controller right.
If your Controller is named SomethingController then the route is /tables/Something assuming you havent customized the default Routing methods
Application Key and Authorization Key is not needed if you haven't specified the corresponding authorization attribute
for example : [AuthorizeLevel(AuthorizationLevel.User)]
RESOLVED : I was using a .NET backend, it seems one has to publish their data objects and controllers first using Visual Studio.
This blog post has a good example on how to achieve this.
If I was using the Javascript backend option, the controllers are automatically setup for you.

SharePoint search service vs list service to retrieve documents from a document library

We have a requirement to retrieve document details from a sharepoint document library. We understand that we can use either list web service or search web service. Can any one please let us know which is better? Is list web service faster than search web service?
Thanks
Go for the list Web service when you only need to retrieve documents from a single document library. The search Web service cannot return all document properties (e.g. list item id, checked out status, and more) and there is also a lag from document changes till the search crawler visits the document library and updates the search index.

Resources