forked from IBM-Blockchain-Archive/learn-chaincode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLearnChaincodeREST.postman_collection.json
More file actions
91 lines (91 loc) · 3.82 KB
/
LearnChaincodeREST.postman_collection.json
File metadata and controls
91 lines (91 loc) · 3.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{
"variables": [],
"info": {
"name": "NEW BlockchainREST",
"_postman_id": "4dcac71e-abf8-c21b-c2a5-1c5702302b27",
"description": "Reflect the REST API's changes to chaincodeID, where path and name\nare used/returned instead of having to pass the url and version every\ntime.",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
"name": "Query",
"request": {
"url": "https://80c1f9d5e0b84b0f8741d81c29040e79-vp0.us.blockchain.ibm.com:5002/chaincode",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"description": ""
}
],
"body": {
"mode": "raw",
"raw": " {\r\n \"jsonrpc\": \"2.0\",\r\n \"method\": \"query\",\r\n \"params\": {\r\n \"type\": 1,\r\n \"chaincodeID\": {\r\n \"name\": \"28a056b772632d078261445f10ad9ac6f24f2d09b3c2463087e36d8cea3e6635585a7913101790b4b0350bf65be857f848051f13cdeb141297633507582c099d\"\r\n },\r\n \"ctorMsg\": {\r\n \"function\": \"read\",\r\n \"args\": [\r\n \"hello_world\"\r\n ]\r\n },\r\n \"secureContext\": \"user_type1_0\"\r\n },\r\n \"id\": 1\r\n }"
},
"description": "Queries for the value of \"a\" from chaincode_example02"
},
"response": []
},
{
"name": "Invoke",
"request": {
"url": "https://80c1f9d5e0b84b0f8741d81c29040e79-vp0.us.blockchain.ibm.com:5002/chaincode",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"description": ""
}
],
"body": {
"mode": "raw",
"raw": " {\r\n \"jsonrpc\": \"2.0\",\r\n \"method\": \"invoke\",\r\n \"params\": {\r\n \"type\": 1,\r\n \"chaincodeID\": {\r\n \"name\": \"28a056b772632d078261445f10ad9ac6f24f2d09b3c2463087e36d8cea3e6635585a7913101790b4b0350bf65be857f848051f13cdeb141297633507582c099d\"\r\n },\r\n \"ctorMsg\": {\r\n \"function\": \"write\",\r\n \"args\": [\r\n \"hello_world\",\r\n \"New block\"\r\n ]\r\n },\r\n \"secureContext\": \"user_type1_0\"\r\n },\r\n \"id\": 2\r\n }"
},
"description": "Invokes a transaction of 20 units between \"a\" and \"b\""
},
"response": []
},
{
"name": "Registrar Login",
"request": {
"url": "https://80c1f9d5e0b84b0f8741d81c29040e79-vp0.us.blockchain.ibm.com:5002/registrar",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"description": ""
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"enrollId\": \"user_type1_0\",\r\n \"enrollSecret\": \"851feaec58\"\r\n}"
},
"description": "Login to a peer with an enrollID and enrollSecret"
},
"response": []
},
{
"name": "Deploy",
"request": {
"url": "https://80c1f9d5e0b84b0f8741d81c29040e79-vp0.us.blockchain.ibm.com:5002/chaincode",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"description": ""
}
],
"body": {
"mode": "raw",
"raw": " {\r\n \"jsonrpc\": \"2.0\",\r\n \"method\": \"deploy\",\r\n \"params\": {\r\n \"type\": 1,\r\n \"chaincodeID\": {\r\n \"path\": \"https://github.com/nemolovich/chaincode/start\"\r\n },\r\n \"ctorMsg\": {\r\n \"function\": \"init\",\r\n \"args\": [\r\n \"New deployment !\"\r\n ]\r\n },\r\n \"secureContext\": \"user_type1_0\"\r\n },\r\n \"id\": 0\r\n }"
},
"description": "Deploys chaincode_example02 to the peers and returns the name of the\nchaincode. This name should be used in all subsequent Invoke and Query\ncalls."
},
"response": []
}
]
}