Is it possible to retrieve external identifier URLs through the wikidata API or does that need SPARQL? - wikidata

I'd like to retrieve the URLs of the external identifiers from wikidata entities. I found a solution using SPARQL, but I'm wondering if this is possible to do using the mediawiki API also?

Related

How can i fetch Google Analytics data into cassandra using Nifi?

I want to fetch my website's google analytics data into cassandra using Nifi , is there any way for it?
You should be able to use InvokeHttp to query the Google Analytics data (perhaps with a POST to batchGet), or you could use ExecuteScript and include the Java API driver/JAR in your Module Directory path. Once you get the response(s), there are many processors you can use for any transformation of the data, including ReplaceText for generating a CQL statement to insert the data. Then you can send the statement(s) to PutCassandraQL for ingest into Cassandra.

resource level authorisation in WSO2 API Manager

I want finer level of authorisation and i am using WSO2 API Manager to secure my API's.
I have books and authors in my application and there is an API for editing the book.Editing of the book should only be done by its author.How can restrict this via WSO2?
my book editing may look like /api/book/{bookname} . This book should be edited by its author only.
I am not sure how to do this by APIM. May be generate each scope for each book and programatically associate this to the author OR so. Still how can I give scope to API based on the query para {bookname}Is there some kind of query parameter associated scope ?
Please throw some light on solutions for this scenario
Scopes can be associated with roles only. They can't be associated with users.
But you should be able to get what you want using custom mediation sequences. See docs here.
See this blog post to get to know what data you can read within custom sequences.
You can keep a map between book to author somewhere and use that information in a custom sequence. For example, this map can be exposed as an external service or a static map in a class mediator.

Adobe Echosign: Is it possible to get Documents by Name?

We have an EchoSign account with lots of documents in it. We now need to retrieve the documents from another application and would like to use the SOAP or REST API for it. I have an API key and managed to get the SOAP API working. Unfortunately I did not find a way do retrieve documents by their name? The creator of the documents did not provide an externalID.
I got some responses on this issue from Adobe support:
The external ID needs to be set at the time of creating the documents, and cannot be set later on.
Only way to get a document by name is to use the getUsersInAccount request to retrieve a set of all users, then use the getUserDocuments request for each user, then scan the names in the DocumentsListItems and finally retrieve the document using the documentKey.

Paw Document Repository?

I'm still struggling a bit with how to use and organize Paw files (*.paw documents), particularly as an API consumer. Is it smarter to:
Organize by project (i.e. project A consumes these particular API calls, so create a my-project.paw document for that project/client); or
Organize by API service (i.e. a MailChimp.paw document defining the various MailChimp endpoints, then add new environments for each project that consumes the MailChimp API)?
(As a side note, it would be great if there were a public repository for sharing .paw files for popular APIs!)
There's no rule, you may organize stuff as it fits to your use case, but I'd recommend organizing files around APIs, so it's all ordered around the given API, following its standard, groupping requests depending on the resources served by the API. One tree example would be:
My-Blog-API.paw
Users (a group)
Get one user (GET /users/:id)
Create user (POST /users)
Articles (a group)
Get list of articles (GET /articles)
Get one article (GET /articles/:id)
Create article (POST /articles)
This way your document closely follows the semantic of the API. Also, it allows a good organization of your Environments, to store for example the Base URL of your API, or the user credentials/access token(s).
Though, maybe I'd keep a "Related" folder for calls to 3rd party services needed for the API calls. For example, you may want to have a call to the Twitter API to get an access token, you'd pass then to your API for the "login with Twitter" feature.
Related (a group)
Twitter (a group)
Login with Twitter (GET https://api.twitter.com/login – whatever I don't know the exact URL)
(Also, thanks for the idea of creating a public repo, some have shared Paw collections on their website, but it would be nice!)

Sync Database with XML

I am thinking about a system which includes XML or XML-like tech. My scenario, i have products in my database tables and i want to export these products, so any user can get my product list with an XML or another way and import their system. It is common usage, i know but i wonder, how can i sync the product quantities. What will be happen, if any user sell my product. How can i edit the quantity field in my DB ? Which technologies can i use ? I think API will be best but how can i use XML ?
You need to create a public api.
users should create an account and you give them an api-key in order to access the api.
you give them a GET method with they use to recieve the product list and a POST method to report the purchases. Once the purchase comes in from the user, you update the records accordingly in your database.
MVC 4 has some good capabilities to create api.
See below:
http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api
How to return Xml Data from a Web API Method?
Creating REST API for existing MVC based website

Resources