StrongDoc Api Reference

StrongDocService

Method NameRequest TypeResponse TypeDescription
RegisterOrganization RegisterOrganizationReq RegisterOrganizationResp

Registers a new organization The user who created the organization is automatically an administrator Does not require Login

RemoveOrganization RemoveOrganizationReq RemoveOrganizationResp

Remove an organization and its search indexes Requires Administrator privilege. Only an administrator can remove the whole organization Requires Login

RegisterUser RegisterUserReq RegisterUserResp

Register new user Creates new user if it doesn't already exist. If the user already exist, and error is thrown Requires administrator privilege

ListUsers ListUsersReq ListUsersResp

List the users of the organization Requires Login

RemoveUser RemoveUserReq RemoveUserResp

Remove user from organization Removes the user from the organization. The users documents still exists, but belong to the organization, only accessible by organization admin. Requires administrator privilege.

PromoteUser PromoteUserReq PromoteUserResp

Promote a regular user to administrator at the organization Requires administrator privilege.

DemoteUser DemoteUserReq DemoteUserResp

Demote administrator to regular user at the organization. Attempting to demote the last administrator of an organization will fail Requires administrator privilege.

ListDocuments ListDocumentsReq ListDocumentsResp

List the documents the user can access Administrators can see all documents belonging to the organization Requires Login

RemoveDocument RemoveDocumentReq RemoveDocumentResp

Remove document the user can access Admin user can remove document for the whole organization Regular user only can remove document for him/herself Requires Login

UploadDocumentStream UploadDocStreamReq stream UploadDocStreamResp

Upload document User can upload document to the organization for storage Requires Login This is not available through gRPC REST gateway, since REST api does not support streaming protocol

UploadDocument UploadDocReq UploadDocResp

Upload document User can upload document to the organization for storage Requires Login

DownloadDocumentStream DownloadDocStreamReq DownloadDocStreamResp stream

Download document stream User can download the documents Requires Login This is not available through gRPC REST gateway, since REST api does not support streaming protocol

DownloadDocument DownloadDocReq DownloadDocResp

Download document User can download the documents Requires Login

EncryptDocumentStream EncryptDocStreamReq stream EncryptDocStreamResp stream

Encrypt document stream encrypts the document and returns the ciphertext back to the user without storing it. Requires Login This is not available through gRPC REST gateway, since REST api does not support streaming protocol

EncryptDocument EncryptDocReq EncryptDocResp

Encrypt document encrypts the document and returns the ciphertext back to the user without storing it. Requires Login

DecryptDocumentStream DecryptDocStreamReq stream DecryptDocStreamResp stream

Decrypt document stream decrypts the ciphertext passed in and returns decrypted plain text back to the user without storing it Requires Login This is not available through gRPC REST gateway, since REST api does not support streaming protocol

DecryptDocument DecryptDocReq DecryptDocResp

Decrypt document decrypts the ciphertext passed in and returns decrypted plain text back to the user without storing it

ShareDocument ShareDocumentReq ShareDocumentResp

Share a document to another user Requires Login

UnshareDocument UnshareDocumentReq UnshareDocumentResp

Unshare a document that had previously been shared to a user Requires Login

Login LoginReq LoginResp

Obtain an authentication token to be used with other APIs An authentication token will be returned after user has been validated The returned token will be used as a Bearer Token and need to be set in the request header

Logout LogoutReq LogoutResp

Logout current user Requires Login

Search SearchReq SearchResp

Search within a list of user's accessible documents The response will include a list document id and its score when matches are found Requires Login

AddSharableOrg AddSharableOrgReq AddSharableOrgResp

Add a sharable organization to the user's organization. Requires Administrator privilege. Requires Login

RemoveSharableOrg RemoveSharableOrgReq RemoveSharableOrgResp

Remove a sharable organization from the user's organization. Requires Administrator privilege. Requires Login

SetMultiLevelSharing SetMultiLevelSharingReq SetMultiLevelSharingResp

Update the organization's multi-level sharing setting Requires Administrator privilege. Requires Login

GetBillingDetails GetBillingDetailsReq GetBillingDetailsResp

List all items of the cost breakdown and also other details such as the billing frequency Requires Administrator privilege Requires Login

GetBillingFrequencyList GetBillingFrequencyListReq GetBillingFrequencyListResp

Obtain the list of billing frequencies (past, current and future) Requires Administrator privilege Requires Login

SetNextBillingFrequency SetNextBillingFrequencyReq SetNextBillingFrequencyResp

Change the next billing frequency Requires Administrator privilege Requires Login

GetLargeTraffic GetLargeTrafficReq GetLargeTrafficResp

Obtain the list of large traffic usages Requires Administrator privilege Requires Login

GetAccountInfo GetAccountInfoReq GetAccountInfoResp

Obtain information about the account Requires Administrator privilege Requires Login

GetUserInfo GetUserInfoReq GetUserInfoResp

Obtain information about logged user Requires Login

Methods with HTTP bindings

Method Name Method Pattern Body
RegisterOrganization POST /v1/account/registerOrganization *
RemoveOrganization DELETE /v1/account/removeOrganization/{force}
RegisterUser POST /v1/account/registerUser *
ListUsers GET /v1/account/listUsers
RemoveUser POST /v1/account/removeUser *
PromoteUser POST /v1/account/promoteUser *
DemoteUser POST /v1/account/demoteUser *
ListDocuments GET /v1/doc/listDocs
RemoveDocument DELETE /v1/doc/remove/{docID}
UploadDocument POST /v1/doc/upload *
DownloadDocument GET /v1/doc/download/{docID}
EncryptDocument POST /v1/doc/encrypt *
DecryptDocument GET /v1/doc/decrypt/{docID}
ShareDocument POST /v1/doc/shareDoc *
UnshareDocument POST /v1/doc/unshareDoc *
Login POST /v1/auth/login *
Logout POST /v1/logout
Search GET /v1/doc/search/{query}
AddSharableOrg PATCH /v1/account/addSharableOrg *
RemoveSharableOrg PATCH /v1/account/removeSharableOrg *
SetMultiLevelSharing PUT /v1/account/setMultiLevelSharing *
GetBillingDetails GET /v1/account/billing
GetBillingFrequencyList GET /v1/account/billing/frequency
SetNextBillingFrequency PUT /v1/account/billing/frequency *
GetLargeTraffic GET /v1/account/largeTraffic
GetAccountInfo GET /v1/account
GetUserInfo GET /v1/account/user

accounts.proto

Top

AddSharableOrgReq

FieldTypeLabelDescription
newOrgID string

The ID of the new sharable org.

AddSharableOrgResp

FieldTypeLabelDescription
success bool

Whether the add was successful

DemoteUserReq

FieldTypeLabelDescription
userID string

The ID of the user to demote.

DemoteUserResp

FieldTypeLabelDescription
success bool

Whether the demotion was successful.

GetAccountInfoReq

GetAccountInfoResp

FieldTypeLabelDescription
orgID string

Account's orgID

subscription Subscription

Account's subscription info

payments Payment repeated

List of all account's payments

orgAddress string

The address of the organization

multiLevelShare bool

The ability to "reshare" a document that was shared to him/her to another user

sharableOrgs string repeated

The list of sharable organization IDs.

GetUserInfoReq

GetUserInfoResp

FieldTypeLabelDescription
userID string

The user's userID

email string

The user's email

userName string

The user's name

orgID string

The user's orgID

isAdmin bool

Whether the user is an admin

ListUsersReq

ListUsersResp

FieldTypeLabelDescription
orgUsers ListUsersResp.OrgUser repeated

The list of users in the organization.

ListUsersResp.OrgUser

FieldTypeLabelDescription
userName string

The name of the user.

userID string

The ID of the user.

isAdmin bool

Whether the user is an administrator.

LoginReq

FieldTypeLabelDescription
userID string

The ID of the user to login as.

password string

The password of the user.

orgID string

The ID of the organization.

LoginResp

FieldTypeLabelDescription
token string

The JWT token to be used for all APIs that require authentication.

LogoutReq

LogoutResp

FieldTypeLabelDescription
status string

The logout status.

Payment

FieldTypeLabelDescription
billedAt google.protobuf.Timestamp

Timestamp of the payment billing transaction

periodStart google.protobuf.Timestamp

Start of the payment period

periodEnd google.protobuf.Timestamp

End of the payment period

amount double

Amount of payment TODO document integer codes

status string

Payment status ("No Payment","Zero Payment","Payment Pending","Payment Success","Payment Failed")

PromoteUserReq

FieldTypeLabelDescription
userID string

The ID of the user to promote.

PromoteUserResp

FieldTypeLabelDescription
success bool

Whether the promotion was successful.

RegisterOrganizationReq

FieldTypeLabelDescription
orgName string

The name of the organization. This value has to be unique.

orgAddr string

The address of the organization. This is optional.

userName string

The administrator username. If the administrator does not exist, it will be created.

password string

The administrator password.

email string

The administrator email. This serves as the unique ID of the administrator user.

sharableOrgs string repeated

The list of sharable organization IDs. The users in this organization can only share documents to other users in the organizations in the sharableOrgs list.

multiLevelShare bool

Enables the ability to "reshare" a document that was shared to him/her to another user.

source string

How was the organization registered (e.g. from "AWS Marketplace")

sourceData string

Any data related to registration from the source (in JSON)

RegisterOrganizationResp

FieldTypeLabelDescription
orgID string

The ID of the created organization. This is the unique ID to use on future operation with the organization.

userID string

The newly created unique administrator user ID.

clientSecret string

Token used for Stripe integration

RegisterUserReq

FieldTypeLabelDescription
userName string

The new username. If the user does not exist, it will be created.

password string

The user password.

email string

The user email. This serves as the unique ID of the user.

admin bool

Whether this new user is an administrator of the organization.

RegisterUserResp

FieldTypeLabelDescription
userID string

The newly added unique user ID.

RemoveOrganizationReq

FieldTypeLabelDescription
force bool

Whether to force removal of organization or not.

RemoveOrganizationResp

FieldTypeLabelDescription
success bool

Whether the removal was successful

postponed bool

True in case the removal will happen later after org has been charged one last time

RemoveSharableOrgReq

FieldTypeLabelDescription
removeOrgID string

The ID of the sharable org to remove.

RemoveSharableOrgResp

FieldTypeLabelDescription
success bool

Whether the removal was successful

RemoveUserReq

FieldTypeLabelDescription
userID string

The ID of the user to remove.

RemoveUserResp

FieldTypeLabelDescription
count int64

The count of the number of users removed

SetMultiLevelSharingReq

FieldTypeLabelDescription
enable bool

Whether or not to enable multi-level sharing

SetMultiLevelSharingResp

FieldTypeLabelDescription
success bool

Whether the update was successful

Subscription

FieldTypeLabelDescription
type string

Subscription type (AWS Marketplace, Credit Card, etc.)

status string

State of the subscription (Created, Subscribed, Unsubscribed, etc.)

billing.proto

Top

BillingFrequency

FieldTypeLabelDescription
frequency TimeInterval

Billing frequency

validFrom google.protobuf.Timestamp

Start fo billing frequency validity

validTo google.protobuf.Timestamp

End of billing frequency validity

DocumentCosts

FieldTypeLabelDescription
cost double

Cost of document storage incurred during a billing period

size double

Size of documents stored during a billing period (in MBhours)

tier string

Cost tier reached for document storage during a billing period

GetBillingDetailsReq

FieldTypeLabelDescription
at google.protobuf.Timestamp

Timestamp of the requested billing details

GetBillingDetailsResp

FieldTypeLabelDescription
periodStart google.protobuf.Timestamp

Start of the requested billing period

periodEnd google.protobuf.Timestamp

End of the requested billing period

totalCost double

Total cost incurred during the requested billing period

documents DocumentCosts

Usage and cost breakdown for stored documents

search SearchCosts

Usage and cost breakdown for stored search indices

traffic TrafficCosts

Usage and cost breakdown for used traffic

billingFrequency BillingFrequency

Billing frequency used during the requested billing period

GetBillingFrequencyListReq

GetBillingFrequencyListResp

FieldTypeLabelDescription
billingFrequencyList BillingFrequency repeated

List of billing frequencies

GetLargeTrafficReq

FieldTypeLabelDescription
at google.protobuf.Timestamp

Timestamp of the requested traffic information

GetLargeTrafficResp

FieldTypeLabelDescription
largeTraffic TrafficDetail repeated

Details of large traffic events

periodStart google.protobuf.Timestamp

Start of the requested billing period

periodEnd google.protobuf.Timestamp

End of the requested billing period

SearchCosts

FieldTypeLabelDescription
cost double

Cost of search index storage incurred during a billing period

size double

Size of search indices stored during a billing period (in MBhours)

tier string

Cost tier reached for search index storage during a billing period

SetNextBillingFrequencyReq

FieldTypeLabelDescription
frequency TimeInterval

Billing frequency

validFrom google.protobuf.Timestamp

When this billing frequency becomes valid

SetNextBillingFrequencyResp

FieldTypeLabelDescription
nextBillingFrequency BillingFrequency

Next billing frequency

TrafficCosts

FieldTypeLabelDescription
cost double

Cost of network traffic incurred during a billing period

incoming double

Size of incoming requests during a billing period (in MB)

outgoing double

Size of outgoing requests during a billing period (in MB)

tier string

Cost tier reached for network traffic during a billing period

TrafficDetail

FieldTypeLabelDescription
time google.protobuf.Timestamp

Timestamp of the large traffic event

userID string

The ID of the user who made the request

method string

HTTP method of the request

URI string

URI called by the request

incoming double

Size of the request (in MB)

outgoing double

Size of the response (in MB)

TimeInterval

NameNumberDescription
UNDEFINED 0

this is the default value

MONTHLY 1

YEARLY 2

document.proto

Top

DownloadDocReq

FieldTypeLabelDescription
docID string

The ID of the document to download.

DownloadDocResp

FieldTypeLabelDescription
docID string

The ID of the document downloaded.

plaintext string

The decrypted data of the downloaded document.

DownloadDocStreamReq

FieldTypeLabelDescription
docID string

The ID of the document to download.

DownloadDocStreamResp

FieldTypeLabelDescription
docID string

The ID of the document downloaded.

plaintext bytes

The decrypted data of the document.

ListDocumentsReq

ListDocumentsResp

FieldTypeLabelDescription
documents ListDocumentsResp.Document repeated

The list of documents.

ListDocumentsResp.Document

FieldTypeLabelDescription
docID string

The document ID.

docName string

The document name.

size uint64

The document size.

RemoveDocumentReq

FieldTypeLabelDescription
docID string

The ID of the document to remove.

RemoveDocumentResp

FieldTypeLabelDescription
status bool

Whether the document removal was successful.

ShareDocumentReq

FieldTypeLabelDescription
docID string

The ID of the document to share.

userID string

The user ID to share it to.

ShareDocumentResp

FieldTypeLabelDescription
success bool

Whether the share was successful.

UnshareDocumentReq

FieldTypeLabelDescription
docID string

The ID of the document to unshare.

userID string

The user ID to share it unshare.

UnshareDocumentResp

FieldTypeLabelDescription
count int64

The unshared document count.

UploadDocReq

FieldTypeLabelDescription
docName string

The name of the document to upload.

plaintext string

The data of the document to upload.

UploadDocResp

FieldTypeLabelDescription
docID string

The ID of the document uploaded.

UploadDocStreamReq

FieldTypeLabelDescription
docName string

The name of the document to upload.

plaintext bytes

The data of the document to upload.

UploadDocStreamResp

FieldTypeLabelDescription
docID string

The ID of the newly uploaded document.

bytes int64

The number of bytes uploaded and stored.

documentNoStore.proto

Top

DecryptDocReq

FieldTypeLabelDescription
docID string

The ID of the document to decrypt.

ciphertext string

The data of the document to decrypt.

DecryptDocResp

FieldTypeLabelDescription
docID string

The ID of the decrypted document.

plaintext string

The decrypted data of the document.

DecryptDocStreamReq

FieldTypeLabelDescription
docID string

The ID of the document to decrypt.

ciphertext bytes

The data of the document to decrypt.

DecryptDocStreamResp

FieldTypeLabelDescription
docID string

The ID of the decrypted document.

plaintext bytes

The decrypted data of the document.

EncryptDocReq

FieldTypeLabelDescription
docName string

The name of the document to encrypt.

plaintext string

The data of the document to encrypt.

EncryptDocResp

FieldTypeLabelDescription
docID string

The ID of the encrypted document.

ciphertext string

The encrypted data of the document.

EncryptDocStreamReq

FieldTypeLabelDescription
docName string

The name of the document to encrypt.

plaintext bytes

The data of the document to encrypt.

EncryptDocStreamResp

FieldTypeLabelDescription
docID string

The ID of the encrypted document.

ciphertext bytes

The encrypted data of the document.

search.proto

Top

DocumentResult

FieldTypeLabelDescription
docID string

The document ID that contains the query terms.

score double

The score of the search result.

SearchReq

FieldTypeLabelDescription
query string

The search query.

SearchResp

FieldTypeLabelDescription
hits DocumentResult repeated

The search hits.

strongdoc.proto

Top

GetConfigurationReq

GetConfigurationResp

FieldTypeLabelDescription
configuration string

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
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)