Skip to content

Platform Internal APIs Documentation

Table of Contents

Top

platformInternal.proto

CloudProviders

Field Type Label Description
name string e.g. AWS, GCP, Azure etc.

CreateCredentialsReq

Field Type Label Description
credential DatabaseCredential
dataStoreRegionId int64 this is the internal id assigned by Scurid; it must be available to create an identity. Call GetUserRegionConfig to get the id if not available.

CreateCredentialsRes

Field Type Label Description
res bool

DataStoreRegion

Field Type Label Description
regionName string e.g. west-eu-1, japan-east-1, names returned here must match the naming conventions from the cloud
id int64 this is the internal id assigned by Scurid
gps string this is the gps location of the datacenter provided by the cloud provider
enabled bool default is false, if region's available true is returned
regionGroup string e.g. EMEA, APAC, US, etc.
cloudProviderName string e.g. AWS, GCP, Azure etc.

DataStoreRegionForAgent

for agents under user / customer

Field Type Label Description
data DataStoreRegion this is the regional and cloud configuration defined by the users
platformIdentity string this is the did of the platform
isAgentEnabled bool this provides information if the agent has been enabled by the user for data storage.

DatabaseCredential

Field Type Label Description
username string
password string
databaseName string

GetAgentConfigReq

Field Type Label Description
AgentID string

GetAgentConfigRes

Field Type Label Description
integrationDetails integration.IntegrationDetails

GetAgentRegionConfigReq

Field Type Label Description
agentIdentity string this is the agent identity, i.e. the DID, caller can request information on one

GetAgentRegionConfigRes

Field Type Label Description
agentRegionInfo DataStoreRegionForAgent repeated

GetCloudProvidersReq

intentionally left empty

GetCloudProvidersRes

Field Type Label Description
providers CloudProviders repeated

GetCredentialsReq

Field Type Label Description
platformIdentity string

GetCredentialsRes

Field Type Label Description
credentials DatabaseCredential repeated

GetDBRegionListReq

Field Type Label Description
cloudProviderName string this the name of the

GetDBRegionListRes

Field Type Label Description
regionInfo DataStoreRegion

GetUserRegionConfigReq

Field Type Label Description
platformIdentity string this is the platform DID of the user

GetUserRegionConfigRes

Field Type Label Description
userCreatedRegions DataStoreRegion repeated

OtherPlatformIntegrationReq

Field Type Label Description
thingWorx ThingWorx config. related to ThingWorx

OtherPlatformIntegrationRes

Field Type Label Description
thingWorx ThingWorx

RegionConfigForAgent

Field Type Label Description
agentIdentity string this is the DID of the agent
regionConfigId int64 this MUST be acquired by calling GetUserRegionConfig. The regions used for storing the information for the agent must already have been created in the system

RequestAgentRegistrationReq

response message for RequestAgentRegistration

Field Type Label Description
agentVerInfo string edge agent version used for creating DID
requestedOn int64 Unix timestamp when identity was created
deviceContext deviceContext.DeviceContext helps to onboard and bind a device to an identity
signatureOnDeviceContext bytes hash calculated on the fields requestedOn + DeviceContext. THIS must be sent by the agent and will be recorded on the backend and used for future verification.
agentDID string this is the DID of the agent

RequestAgentRegistrationRes

RequestAgentRegistrationRes is the response from RequestAgentRegistration

Field Type Label Description
result bool True if successfully completed the requested of registration else false.

SendReq

Field Type Label Description
agentDID string
mawaData deviceData.MaWaRouteDataStruct specific to MaWaRoute
deviceData deviceData.DeviceData this is the generic structure for users deploying Scurid Edge Agent and using its data transfer capabilities. This is could JSON string for now. Need more work to create more customer specific structure
csr certificate.v1.CSR

SendRes

Field Type Label Description
res bool

SendWithUserDefinedFieldsReq

Field Type Label Description
row string
signature string
timestamp int64
agentDID string

SendWithUserDefinedFieldsRes

Field Type Label Description
success bool

StatusCheckReq

StatusCheckReq used for checking the agent status

Field Type Label Description
agentDID string this is the DID of the agent

StatusCheckRes

Field Type Label Description
key string this is the key returned by the backend, that must be used by the identities to relate themselves to an agent
status string to enable decision making on the edge agent
otherPlatformIntegrationRes OtherPlatformIntegrationRes

StoreAgentRegionConfigReq

Field Type Label Description
data RegionConfigForAgent data to store the information for agent's config
enableStorage bool this controls if the agent should use the config to write to the datastore

StoreAgentRegionConfigRes

Field Type Label Description
status bool default is false, when stores successfully true is returned

StoreRegionConfigReq

Field Type Label Description
identity string use the platformDID
id int64 use the value defined from the DataStoreRegion.ID

StoreRegionConfigRes

Field Type Label Description
status bool default is false, if successful True is returned

ThingWorx

Field Type Label Description
RequestOnboard bool
AppKey string

AgentManagement

AgentManagement contains endpoint that are needed to manage internal communication between the Agents and the Platform This will be used to perform internal tasks, that can be offload from users to simplify agent to platform workings

Method Name Request Type Response Type Description
RequestAgentRegistration RequestAgentRegistrationReq RequestAgentRegistrationRes Requests the registration of an agent
StatusCheck StatusCheckReq StatusCheckRes StatusCheck provides update if the identity for the agent is approved if approved agent will receive a key
GetAgentConfig GetAgentConfigReq GetAgentConfigRes

CustomSender

Method Name Request Type Response Type Description
SendWithUserDefinedFields SendWithUserDefinedFieldsReq stream SendWithUserDefinedFieldsRes

DataStorage

Allows setting up global database store for the Scurid Backend which enables Scurid Edge agents to store device data

Method Name Request Type Response Type Description
GetCloudProviders GetCloudProvidersReq GetCloudProvidersRes GetCloudProviders fetches list of currently supported cloud providers this API is to deliver default configuration offered by Scurid
GetDBRegionList GetDBRegionListReq GetDBRegionListRes stream GetDBRegionList provides list of global region list where distributed data storage can be setup this API is to deliver default configuration offered by Scurid
StoreRegionConfig StoreRegionConfigReq StoreRegionConfigRes StoreRegionConfig stores region information as selected by the user this helps build region configuration for the end users
GetUserRegionConfig GetUserRegionConfigReq GetUserRegionConfigRes GetUserRegionConfig fetches list of regions configured for the user this API must be used after the initial on-boarding is finished using StoreRegionConfig this helps build region configuration for the end user scope
StoreAgentRegionConfig StoreAgentRegionConfigReq StoreAgentRegionConfigRes StoreAgentRegionConfig stores agent's region configuration this API must be used after the initial user region setup is complete via StoreRegionConfig
GetAgentRegionConfig GetAgentRegionConfigReq GetAgentRegionConfigRes GetAgentRegionConfig fetches list of region configuration for the agent this API must be used after the initial agent setup is complete via StoreAgentRegionConfig
CreateCredentials CreateCredentialsReq CreateCredentialsRes CreateCredentials create required username , password, connection string and the database name for the user
GetCredentials GetCredentialsReq GetCredentialsRes Fetches the credentials for a given customer
GetAgentData .deviceData.GetAgentDataReq .deviceData.GetAgentDataRes stream GetDevicesList returns list of all agent data
GetAgentDataStat .deviceData.GetAgentDataStatReq .deviceData.GetAgentDataStatRes GetAgentDataStat returns the number of data that can be successfully verified and dataPoints that couldn't be verified

DeviceDataManagement

DeviceDataManagement set of endpoints to help manage data flow from devices back to Scurid Backend

Method Name Request Type Response Type Description
Send SendReq stream SendRes stream Send opens bidi stream, between device and the server currently server is only configured to return boolean confirmation. todo extend for more later.
SendWithUserDefinedFields SendWithUserDefinedFieldsReq stream SendWithUserDefinedFieldsRes SendWithUserDefinedFields creates client streaming to send array of data set from the Scurid Edge Agent to the Scurid Server

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)