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
Related
I'm building a UI in Google Appmaker to manage the Domain Shared Contacts API. I can read and display data from the API in appmaker using a calculated model, but I cannot save data back into the API.
I tried adding a form widget with the calculated model as a datasource, but this is a read / view only form. This is when i found out calculated data sources are always read-only in app maker.
I then created an SQL datasource and made an event that queries the Domain Shared Contact API which then creates records and saves them to the SQL Model. I was thinking about using the standard form widget and then in the events beforeSave, beforeDelete, etc to write the record to the API.
However this feels dirty to me, since now I have to keep the SQL model synchronized with the API, need to have an SQL server running, etc.
Does anyone have any tips on the best way to write data from a form in appmaker to a REST API? I can't be only one with this use case.
You have to write app script function for this. https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app
I am playing with Realm for react native, and actually I am loving it.
I am trying to understand all its core concepts, in order to use all of its power.
I am trying to design the data structure for a simple ecommerce app, trying to take advantage of the "multi realm" feature.
The way I would like to design the data is the following:
Create a public realm, where I am planning to put the products catalog and some other publicily available data
Create a system realm, accessible only by the admin user where I have the list of all the users metadata (name, lastname etc)
Create a realm for each user, where for example I am planning to store user's cart and user's orders
This would be, IMHO, a good design, because all user related data can be accessed only by the user and eventually the admin user, and all system data (eg: users) can be accessed only by admin users.
By the way, this kind of design suffers some drawbacks:
Since there will obviously be a web backoffice, where for example there will be a list of all orders, getting the list of all order of all users is going to be tricky because the orders are sliced into multiple realms.
The natural solution for such a problem, is to save the orders in a single realm, and use a where conditions to query data from any single user and adding a userId column in the orders table.
My doubt about this kind of solution, is that a potential malitious user, with a legitimate user token capable to read and write from that realm, could potentially read and write records belonging to other users. This happens because the realm's permission system allow you to grant permissions only at realm level, and at record level.
The other problem is that in this design, the cart items are stored in the user realm. Obviously a cart item must contain a reference to the product, but the products are stored in the public realm. I can obviously query the products from the public realm, and then add a cart item containg a reference to a product, but the product saved in the public realm and the product saved in the user's realm are unrelated, meaning that if I change the product in the public realm, the changes are not reflected to the product object saved in the cart
Given your experience with realm, how would you address this problems?
Many thank
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.
I want to integrate Marketo api with my .net project.
My client has given a username & password to Marketo. I want to retrieve "opportunities" from Marketo. I have written code for that. Currently there are not any opportunities so I'm not able to test my code. Has anyone an idea how to create opportunities in Marketo so I can whetehr check my code is retrieving that records or not?
Opportunities are not visible as standalone entities in Marketo as they are in SFDC or other CRMs. Rather, as #joev said, you have to find a lead that has an opportunity and view the opportunity details within the context of that lead's detail view, on the Opportunity tab.
If you want to use the GUI to create an opportunity, the right place to do that would be in the CRM — not in Marketo.
You need to have create/update right via API, ask your client for create/update rights then you will be able to create some data through API itself.
Like other people have mentioned there isn't a direct GUI inside Marketo for creating opportunities. These are typically created via the CRM (aka Salesforce, NetSuite, Microsoft Dynamics, etc...) and then sync'd to Marketo.
If you want to test it and have no CRM available -- technically you can just use the REST API to sync your own opportunity to a lead. Once done you could login to Marketo to visually validate it. Then now that you have an opportunity created you could then use the API to GET the opportunities and further validate your integration.
Here is a link to Marketo's documentation on how to sync an opportunity to Marketo. Also on that page is the documentation on the other REST API options.
I'm working on a Java console application that needs to go through all the e-mailaddresses in the frontend database in Tridion Outbound E-mail 2011 and change a certain extended field of that contact.
I've gone through the Subscription API documentation for clues on how to get a listing of all the e-mailaddresses, but I'm getting stuck there. Is there any clean way to do this through the API, without resorting to database queries?
It is not possible to get a list of Contacts using the Subscription API. It is meant primarily for working with single Contacts, who update their profile on your website.
For bulk management of Contacts, you should use Tridion.AudienceManagement.API on your Content Management server instead. The changes will then be synchronized to all of your websites.
You should not change anything directly in the database, as you will get issues with synchronization.