Skip to content

Platform APIs Documentation

Table of Contents

Top

platformapi.proto

AddTagsReq

Field Type Label Description
tags TagStruct repeated one or more tags to be created in the system

AddTagsRes

Field Type Label Description
result bool boolean result, True if all gets created else false

AgentInfoForDID

Field Type Label Description
agentDID string if device DID to be bound to an agent
statusKey string to be delivered from the backend

AllDevicesListStruct

Field Type Label Description
did string
deviceName string human readable name of the device
statusOfDID string
versionInfo string
createdOn int64

AssignTagsToIdentityReq

Field Type Label Description
tags TagStruct repeated
did string device identities to be tagged with

AssignTagsToIdentityRes

Field Type Label Description
result bool true if assignment of tags to identity works; else false; default is false

CountriesStruct

Field Type Label Description
name string

CreateIdentityReq

Field Type Label Description
customerInfo NewPlatformUserInfo

CreateIdentityRes

Field Type Label Description
did string

DownloadFilesReq

Field Type Label Description
deviceIdentity string device's identity

DownloadFilesRes

Field Type Label Description
info FileInfo
chunkData bytes

EmptyRequest

FileInfo

Field Type Label Description
deviceIdentity string
fileId string
fileType string

FileStorePathReq

Field Type Label Description
deviceIdentity string device DID
path string folder

FileStorePathRes

Field Type Label Description
result bool

GetAllDevicesListReq

empty request

GetAllDevicesListRes

Field Type Label Description
rows AllDevicesListStruct repeated

GetCountriesListReq

left blank intentionally

GetCountriesListRes

Field Type Label Description
data CountriesStruct repeated

GetDevicePayloadsWithSignatureReq

Field Type Label Description
deviceDid string
deviceName string if deviceName is used all payloads are returned from that device, it may have used multiple DIDs

GetDevicePayloadsWithSignatureRes

Field Type Label Description
rows GetDevicePayloadsWithSignatureStruct repeated

GetDevicePayloadsWithSignatureStruct

Field Type Label Description
deviceDID string
deviceName string
dataTimestamp int32
payload string
signature string
isValid bool

GetLicenseStatusReq

ScuridPlatformAgentAPI section

left blank intentionally

GetLicenseStatusRes

Field Type Label Description
licStatus bool false if status not active; true otherwise
licType string type of the license small, developer etc.
validFrom int64 valid from timestamp
validUntil int64 valid until timestamp

GetOnboardingPkgReq

Field Type Label Description
identity string device's public identity

GetOnboardingPkgRes

Field Type Label Description
pkg1 string transfers payload in string, any data structure
pkg2 bytes transfers payload in bytes, any data structure

GetPendingRequestsListReq

empty request

GetPendingRequestsListRes

Field Type Label Description
rows PendingRequestsStruct repeated

GetPlatformDIDReq

empty request

GetPlatformDIDRes

Field Type Label Description
platform_did string
status string

GetRejectedIdentitiesListReq

empty request

GetRejectedIdentitiesListRes

Field Type Label Description
rows RejectedIdentitiesListStruct repeated

GetTagsReq

left empty

GetTagsRes

Field Type Label Description
tag TagStruct

GetValidIdentitiesListReq

empty request

GetValidIdentitiesListRes

Field Type Label Description
rows ValidIdentitiesListStruct repeated

GetValidIdentityInfoReq

Field Type Label Description
did string

GetValidIdentityInfoRes

Field Type Label Description
vInfo string edge agent version used for creating DID
lastVerifiedOn int64
created_on int64
device_name string
isLocal bool if checked identities are not registered on DLT but only local database
path string device pkg file store on the client side
deviceContext deviceContext.DeviceContext helps to onboard and bind a device to an identity
agentInfoForDID AgentInfoForDID if there is an agent to which this identity belongs

ListIdentitiesUnderATagReq

Field Type Label Description
tag TagStruct

ListIdentitiesUnderATagRes

Field Type Label Description
did string

LocalStorageInitReq

Field Type Label Description
storagePath string

LocalStorageInitRes

Field Type Label Description
status bool try to return actual error from the OS if any, a success message

NewPlatformUserInfo

struct to be attached to the Platform's DID registration

Field Type Label Description
firstName string
lastName string
email string
country string
isEnterpriseUser bool
enterpriseFullName string
did string
emailRegistrationCode string this is the code sent to the user's email for verification

PendingRequestsStruct

Field Type Label Description
did string
requestTimestamp int64
versionInfo string
created_on int64
device_name string
isLocal bool
deviceContext deviceContext.DeviceContext helps to onboard and bind a device to an identity
agentInfoForDID AgentInfoForDID if there is an agent to which this identity belongs

PostDeviceDataWithSignatureReq

Field Type Label Description
dataSet PostDeviceDataWithSignatureStruct repeated

PostDeviceDataWithSignatureRes

Field Type Label Description
status bool

PostDeviceDataWithSignatureStruct

Field Type Label Description
deviceDID string
deviceName string
dataTimestamp int32
payload string
signature string

RecordRejectedDIDReq

Field Type Label Description
did string
rejectedOn int64 timestamp of rejection // UTC
isLocal bool defaults to false, if the identity was approved previously use that state

RecordRejectedDIDRes

Field Type Label Description
status bool

RegisterDeviceDIDReq

Field Type Label Description
deviceDid string
platformDid string platform did
isLocal bool if checked identites are not registered on DLT but only local database

RegisterDeviceDIDRes

Field Type Label Description
status bool

RejectedIdentitiesListStruct

Field Type Label Description
did string
vInfo string edge agent version used for creating DID
rejectionTimestamp int64
revokedOn int64
created_on int64
device_name string
isLocal bool if checked identities are not registered on DLT but only local database
deviceContext deviceContext.DeviceContext helps to onboard and bind a device to an identity
agentInfoForDID AgentInfoForDID if there is an agent to which this identity belongs

RemoveTagsReq

Field Type Label Description
tags TagStruct repeated tags to be deleted from the system
did string this generally the device identity

RemoveTagsRes

Field Type Label Description
result bool boolean result, True if all gets deleted else false

RequestIdentityStatusReq

Field Type Label Description
deviceDID string

RequestIdentityStatusRes

response is one of the following

Field Type Label Description
status string

RequestRegistrationOfDeviceReq

Field Type Label Description
deviceDID string
requestedOn int64 UTC timestamp of request from device, this value MUST come from device
vInfo string edge agent version used for generating DID
device_name string name with which customer, user identifies it uniquely, this could also be a name in the IIoT Platform
deviceContext deviceContext.DeviceContext helps to onboard and bind a device to an identity
signatureOnDeviceContext bytes hash calculated on the fields requestedOn + deviceDID. THIS must be sent by the agent and will be recorded on the backend and used for future verification.
agentInfoForDID AgentInfoForDID if there is an agent to which this identity belongs

RequestRegistrationOfDeviceRes

this only provides a confirmation if request has been successfully received. Whether it's approved or rejected, will be handled by respective service This info will be added to the Platform Agent's local storage

Field Type Label Description
status bool only returns confirmation that the request has been received

RevokeDeviceDIDReq

Field Type Label Description
device_did string
platform_did string

RevokeDeviceDIDRes

Field Type Label Description
status bool

SignBytePayloadWithIdentityReq

Field Type Label Description
payload bytes array if bytes to be signed
did string identity i.e. did:scurid:XXXXXXXXXXX ; NOTE identity is case sensitive

SignBytePayloadWithIdentityRes

Field Type Label Description
signature string generated signature

SignPayloadReq

Field Type Label Description
payload string
did string

SignPayloadRes

Field Type Label Description
signature string

TagStruct

Field Type Label Description
tagName string

UploadFilesReq

Field Type Label Description
info FileInfo
chunkData bytes

UploadFilesRes

Field Type Label Description
result bool true if successfully transferred the files.

ValidIdentitiesListStruct

Field Type Label Description
did string
vInfo string edge agent version used for creating DID
created_on int64
last_verified_on int64
device_name string
isLocal bool if checked identities are not registered on DLT but only local database
path string device pkg file store on the client side
deviceContext deviceContext.DeviceContext helps to onboard and bind a device to an identity
agentInfoForDID AgentInfoForDID if there is an agent to which this identity belongs

VerifyBytePayloadWithIdentityReq

Field Type Label Description
signature string
payload bytes
did string identity i.e. did:scurid:XXXXXXXXXXX ; NOTE: identity is case sensitive

VerifyBytePayloadWithIdentityRes

Field Type Label Description
isValid bool true if valid, else false (Defaults to False)

VerifyDeviceDIDReq

Field Type Label Description
platform_did string
device_did string

VerifyDeviceDIDRes

Field Type Label Description
status bool

VerifySignatureReq

Field Type Label Description
signature string
payload string
did string

VerifySignatureRes

Field Type Label Description
isValid bool

ScuridPlatformAgentAPI

Method Name Request Type Response Type Description
GetPendingRequestsList GetPendingRequestsListReq GetPendingRequestsListRes Track requests from new devices to register them on the SSI Service
VerifySignature VerifySignatureReq VerifySignatureRes Verify signature of the payload Currently only string payloads are supported
CreateIdentity CreateIdentityReq CreateIdentityRes Primarily to be used for DID Generation of the platform to be used for registering platform application for that customer This should make an internal call to the Scurid SSI Service and store the DID value in local storage in encrypted wallet
SignPayload SignPayloadReq SignPayloadRes Sign a given payload with platform's DID
GetRejectedIdentitiesList GetRejectedIdentitiesListReq GetRejectedIdentitiesListRes As platform agent must track every incoming request for DID registration in local DB storage, this service returns the list of all the DIDs that were rejected by the customer to be registered with Scurid SSI Service. This is mainly a bookkeeping service
GetValidIdentitiesList GetValidIdentitiesListReq GetValidIdentitiesListRes Fetches the list of all the DIDs that were successfully registered in Scurid SSI Service, this list must be kept internally fresh by the platform's internal service
GetValidIdentityInfo GetValidIdentityInfoReq GetValidIdentityInfoRes Fetches details available on a given identity in local DB storage, data on this identity must be kept fresh by internal services
RecordRejectedDID RecordRejectedDIDReq RecordRejectedDIDRes Identities returned by GetPendingRequestsList if they are rejected by the customer from the flutter app, they of course MUST not be registered with Scurid SSI Service, but at the same time should be recorded in the local DB
RequestRegistrationOfDevice RequestRegistrationOfDeviceReq RequestRegistrationOfDeviceRes this endpoint is for devices to call Platform Agent to register them Normally will be used by devices wanting to registering for the first time, or if a new DID has been generated on an existing device
RequestIdentityStatus RequestIdentityStatusReq RequestIdentityStatusRes This endpoint is primarily meant for devices to get validation from Platform Application if their DID was registered on the blockchain
LocalStorageInit LocalStorageInitReq LocalStorageInitRes To be called from desktop app for getting the path where DB should be initialized
GetAllDevicesList GetAllDevicesListReq GetAllDevicesListRes A call to local storage to get list of all available device DIDs
VerifyDeviceDID VerifyDeviceDIDReq VerifyDeviceDIDRes Wraps the call for SSI Service API with same name VerifyDeviceDID
RevokeDeviceDID RevokeDeviceDIDReq RevokeDeviceDIDRes Wraps the call for SSI Service API with same name RevokeDeviceDID
RegisterDeviceDID RegisterDeviceDIDReq RegisterDeviceDIDRes Wraps the call for SSI Service API with same name RegisterDeviceDID
GetPlatformDID GetPlatformDIDReq GetPlatformDIDRes To provide Platform DID from the local gRPC platform storage
GetDevicePayloadsWithSignature GetDevicePayloadsWithSignatureReq GetDevicePayloadsWithSignatureRes Provides device's data with signature for each payload returned rows have boolean confirmation attached to each row True denotes that the device's payload has valid signature, false denotes otherwise
PostDeviceDataWithSignature PostDeviceDataWithSignatureReq PostDeviceDataWithSignatureRes PostDeviceDataWithSignature to be called from edge devices to post / send their device data with signature to Platform
GetCountriesList GetCountriesListReq GetCountriesListRes Provides list of countries
GetLicenseStatus GetLicenseStatusReq GetLicenseStatusRes
SignBytePayloadWithIdentity SignBytePayloadWithIdentityReq SignBytePayloadWithIdentityRes Signs a byte array payload with identity
VerifyBytePayloadWithIdentity VerifyBytePayloadWithIdentityReq VerifyBytePayloadWithIdentityRes Verifies a byte array payload with identity
AddTags AddTagsReq AddTagsRes Adds tags for categorization of the identities
RemoveTags RemoveTagsReq RemoveTagsRes Removes existing tags from the identity
GetTags GetTagsReq GetTagsRes stream Get existing tags
AssignTagsToIdentity AssignTagsToIdentityReq AssignTagsToIdentityRes AssignTagsToIdentity assign one more tags to an identity
ListIdentitiesUnderATag ListIdentitiesUnderATagReq ListIdentitiesUnderATagRes stream Lists all the identities assigned to a Tag
UploadFiles UploadFilesReq stream UploadFilesRes Used for uploading files to the server
DownloadFiles DownloadFilesReq DownloadFilesRes stream Used for downloading device pkgs
FileStorePath FileStorePathReq FileStorePathRes FileStorePath provides path for the device files

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)