Hyperledger composer playground error on IBM Blockchain Platform - ibm-cloud

I am trying to learn about hyperledger composer by going through the tutorials. Everything works on the playground so I followed the tutorial and created a cluster with bluemix.
http://184.172.229.160:31080/
I was testing the hosted playground and I notice all transactions, even if deployed with a sample network like trade-network, returns error saying the asset or participant does not exist
Error: Object with ID 'tradingSymbol:ABC' in collection with ID 'Asset:org.acme.trading.Commodity' does not exist
Any advice on troubleshooting the above error?

The most likely explanation is that you don't need the tradingSymbol: prefix and that your asset ID is just ABC.

Be aware that Composer Playground use, in your case, tradingSymbol:ABC as the ID, so when you try to retrieve an object you must consider the ID like tradingSymbol:ABC.
If you want to use the ID ABC you must erase tradingSymbol:ABC when you create the object using the playground and write just ABC. I know it is a little bit tricky.

Related

How to call Realm function via HTTP?

I need to call realm function via HTTP not sdk. Looks like it is possible, but I can not figure it out.
Reason behind it is simple, I do not need anything sdk provides us, I just want to get the data from db. Also I have a problem with sdk cos it's trying to create a folder related to sync (I do not need sync at all! This is big question why Mongo dev team did it this way) in google cloud function where I get the error about read/write permissions.
Would be grateful for any help
I found the answer is pretty obvious we just need to use web sdk not node sdk cos web does not have anything related to sync

NextJS, MongoDB Realm, Apollo Example?

Our project which we actually developed in ReactJS, we are currently moving to NextJS.
Now we have the problem that our original method in ReactJS using MongoDB Realm and Apollo(GraphQL) to retrieve data does not work in NextJS due to the need of SSG and SSR.
After a long time of trying and searching for examples and introductions, we unfortunately haven’t found a solution yet. Now the question: Has anyone already done this or an example project that builds on NextJS, MongoDB Realm and Apollo(GraphQL)?
In case of need we can also use the SWR library. But we haven’t found any helpful (including SSG and SSR) and official examples explicitly for Realm.

mongo atlas free sandbox in production

I am going to deploy client's webapp using mongoose (mongo atlas) and gotta admit, he is not very generous, i know that Sanbox (M0 cluster) is not suitable for production mode but wanted to know why? are there any reason that it is not secure to use M0 in production, i mean it's storage is suitable for website needs Thanks in advance, it is really simple application, with add post delete post and edit post like simple wordpress theme. thanks in advance.
P.S: i could not find any real problem in this link

How to get the Google ad manager impression of a placement using api (PHP)?

I am able to connect with my ad manager account using Google Ad Manager API (https://github.com/googleads/googleads-php-lib/tree/master/examples/AdManager). I am getting data i.e all companies, all placement on my command line. But confused on getting impressions.
How to get an impression of a placement?
First, you will need a query. Using the UI is the easiest way to build a query, and see the results. Here's the guide from Google to create a query on the UI.
Then, you will save the query and follow the ReportService/RunSavedQuery.php example to download the impression report in your program.
Please note that the examples are removed every 4 quarters and replaced by newer examples. So, if the example link above doesn't work, the example might have been replaced with a newer one.
This question is not a PHP specific question. Indeed, it is a "how to use the product" question, and is best suitable to be answered on the Google Ad Manager product forum. If you raise a question on the forum, the support staff may get back to you on a secured channel to help you build the query.

Hyperledger composer rest api add data not found in composer playground

I have successfully generated composer rest api followed by instruction given by https://hyperledger.github.io/composer/latest/tutorials/developer-tutorial.html finally am getting success message
Discovering types from business network definition ...
Discovered types from business network definition
Generating schemas for all types in business network definition ...
Generated schemas for all types in business network definition
Adding schemas for all types to Loopback ...
Added schemas for all types to Loopback
Web server listening at: http://localhost:3000
Browse your REST API at http://localhost:3000/explorer
and after am adding participant getting 200 response code in api , but the added data not displayed in composer playground, whats the issue in this? anyhelp appreciated
I think there is a problem with your starting a business-network or upgrading a business-network. please ensure that your started network version same as composer-rest-server API version shown on http://localhost:3000/explorer/. If there is an issue then you can do ./stopFabric.sh. and then start your business-network again.
the playground is exactly what it says, a playground. It's a little environment to help you play with models, test them and create a bna from the result, not to deploy a fully working network.
However, if you do want to see some real data then you have to connect it to an actual network using a proper network card. If you use the web version then that's not connected to anything real.
So, connect the playground to the same network card you used to create the composer rest api and then you will be able to see something.
This being said, the best way to check your data actually exists on the ledger is to use the composer api you used to create you assets.
Every asset endpoint accepts all the verbs you need to work with. You used POST to create an asset, now use the GET method to check the data on the ledger. if you look at the swagger interface, you will see all endpoint, all verbs they accept and the data models required