Install a Chaincode

post

/console/admin/api/v2/chaincodes

Installs a chaincode. The chaincode must be BASE64 encoded zip file of source code, or a BASE64 encoded TAR.GZ of packaged chaincode (new in Oracle Blockchain Platform 22.2.1).

Request

Supported Media Types
Body ()
Root Schema : installChaincode
Type: object
Show Source
Example:
{
    "source":{
        "fileName":"example_cc",
        "content":"example chaincode code"
    },
    "label":"example",
    "type":"golang",
    "peers":[
        {
            "url":"grpcs://peer0.org1.example.com:7051"
        }
    ]
}
Nested Schema : peers
Type: array
Show Source
Nested Schema : source
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Installed chaincode successfully
Body ()
Root Schema : installCCResp
Type: object
Show Source

400 Response

Invalid arguments
Body ()
Root Schema : 400errorModels
Type: object
Show Source
Example:
{
    "respMesg":"invalid argument"
}

401 Response

Unauthorized

403 Response

Forbidden

500 Response

Internal server error
Body ()
Root Schema : 500errorModels
Type: object
Show Source

Default Response

Unexpected error
Body ()
Root Schema : errorModel
Type: object
Show Source
Back to Top