API Documentation for Senior Design Team sddec21-01

This specifies the proper ways to hit endpoints developed with the aim to connect components of a BlockChain application to secure data from power delivery systems.
More information: https://sddec21-01.sd.ece.iastate.edu/
Contact Info: joshuae1@iastate.edu
Version: 1.0.0
BasePath:/sddec21-01/Senior_Design_API/1.0.0
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html

Access

  1. OAuth AuthorizationUrl:TokenUrl:http://example.com/oauth/token

Methods

[ Jump to Models ]

Table of Contents

Default

Default

Up
post /createasset:{assetId}
Creates an asset with specified assetId (createassetassetIdPost)
This operation allows for the Opal-RT to publish the data contained within the body of the request with the assetId

Path parameters

assetId (required)
Path Parameter — Key for asset to be created on the ledger

Responses

200

OK

400

Missing assetId parameter

404

Not found, there was a syntax error in the request

406

Request body does not have the correct number of fields to populate an asset properly

Up
delete /deleteall
Deletes all assets on the ledger (deleteallDelete)
This operation allows for the ledger to be completely flushed of entries allowing it to be filled once again without fear of overlapping keys.

Responses

200

OK

404

Not found, there was a syntax error in the request

Up
delete /deleteasset:{assetId}
Creates an asset with specified assetId (deleteassetassetIdDelete)
This operation allows for the Opal-RT to publish the data contained within the body of the request with the assetId

Path parameters

assetId (required)
Path Parameter — Identifier to specify asset to be deleted

Responses

200

OK

400

Missing assetId parameter

404

Not found, there was a syntax error in the request

Up
get /queryall
Queries all assets on the ledger (queryallGet)
This operation allows for the front end to query all assets in one command to present averaged data.

Responses

200

OK

404

Not found, there was a syntax error in the request

Up
get /queryasset:{assetId}
Retrieves specified asset (queryassetassetIdGet)
This operation allows users to query a specific asset from the ledger and return it to the caller.

Path parameters

assetId (required)
Path Parameter — Identifier to act as key for asset to be queried

Responses

200

OK

204

No record matches given key

400

Missing assetId path parameter

404

Not found, there was a syntax error in the request

Up
get /report
Gets a report from caliper for diplay on the frontend (reportGet)
This operation allows frontend user to retrieve a caliper report displaying metrics about the blockchain

Responses

200

OK

404

Not found, there was a syntax error in the request

Up
post /updateasset:{assetId}/:{assetValue}
Creates an asset with specified assetId (updateassetassetIdassetValuePost)
This operation allows for the Opal-RT to publish the data contained within the body of the request with the assetId

Path parameters

assetId (required)
Path Parameter — Identifier to act as key for asset
assetValue (required)
Path Parameter — Identifier to act as key for asset

Responses

200

OK

400

Missing assetId parameter

404

Not found, there was a syntax error in the request

Models

[ Jump to Methods ]

Table of Contents