Methods:
InitSetupAccount, InitConvertGoogleUser, InitCompleteAccount, Deinit, AccountSetPassword, AccountGetPaymentPlan, AccountLogin, Probe, AuthorityCreate, AuthoritySet, AuthorityGet, AuthorityList, AuthorityDestroy, SpaceCreate, SpaceGenerateKey, SpaceGet, SpaceSet, SpaceRedeployKick, SpaceSetRxhtml, SpaceGetRxhtml, SpaceSetPolicy, SpaceGetPolicy, SpaceMetrics, SpaceDelete, SpaceSetRole, SpaceListDevelopers, SpaceReflect, SpaceList, PushRegister, DomainMap, DomainReflect, DomainMapDocument, DomainList, DomainListBySpace, DomainGetVapidPublicKey, DomainUnmap, DomainGet, DocumentAuthorize, DocumentAuthorizeDomain, DocumentAuthorizeWithReset, DocumentAuthorizeDomainWithReset, DocumentCreate, DocumentDelete, DocumentList, MessageDirectSend, MessageDirectSendOnce, ConnectionCreate, ConnectionCreateViaDomain, ConnectionSend, ConnectionPassword, ConnectionSendOnce, ConnectionCanAttach, ConnectionAttach, ConnectionUpdate, ConnectionEnd, DocumentsHashPassword, BillingConnectionCreate, ConfigureMakeOrGetAssetKey, AttachmentStart, AttachmentStartByDomain, AttachmentAppend, AttachmentFinish
This initiates developer machine via email verification.
name | required | type | documentation |
email | yes | String | The email of an Adama developer. |
connection.InitSetupAccount(email, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
The converts and validates a google token into an Adama token.
name | required | type | documentation |
access-token | yes | String | A token from a third party authorization service. |
connection.InitConvertGoogleUser(access-token, {
success: function(response) {
// response.identity
},
failure: function(reason) {
}
});
name | type | documentation |
identity | String | A private token used to authenticate to Adama. |
This establishes a developer machine via email verification.
Copy the code from the email into this request.
The server will generate a key-pair and send the secret to the client to stash within their config, and the
public key will be stored to validate future requests made by this developer machine.
A public key will be held onto for 30 days.
name | required | type | documentation |
email | yes | String | The email of an Adama developer. |
revoke | no | Boolean | A flag to indicate wiping out previously granted tokens. |
code | yes | String | A randomly (secure) generated code to validate a user via 2FA auth (via email). |
connection.InitCompleteAccount(email, revoke, code, {
success: function(response) {
// response.identity
},
failure: function(reason) {
}
});
name | type | documentation |
identity | String | A private token used to authenticate to Adama. |
This will destroy a developer account. We require all spaces to be deleted along with all authorities.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
connection.Deinit(identity, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
Set the password for an Adama developer.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
password | yes | String | The password for your account or a document |
connection.AccountSetPassword(identity, password, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
Get the payment plan information for the developer.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
connection.AccountGetPaymentPlan(identity, {
success: function(response) {
// response.paymentPlan
// response.publishableKey
},
failure: function(reason) {
}
});
name | type | documentation |
payment-plan | String | Payment plan name. The current default is "none" which can be upgraded to "public". |
publishable-key | String | The public key from the merchant provider. |
Sign an Adama developer in with an email and password pair.
name | required | type | documentation |
email | yes | String | The email of an Adama developer. |
password | yes | String | The password for your account or a document |
connection.AccountLogin(email, password, {
success: function(response) {
// response.identity
},
failure: function(reason) {
}
});
name | type | documentation |
identity | String | A private token used to authenticate to Adama. |
This is useful to validate an identity without executing anything.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
connection.Probe(identity, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
Create an authority. See Authentication for more details.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
connection.AuthorityCreate(identity, {
success: function(response) {
// response.authority
},
failure: function(reason) {
}
});
name | type | documentation |
authority | String | An authority is collection of third party users authenticated via a public keystore. |
Set the public keystore for the authority.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
authority | yes | String | An authority is collection of users held together via a key store. |
key-store | yes | ObjectNode | A collection of public keys used to validate an identity within an authority. |
connection.AuthoritySet(identity, authority, key-store, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
Get the public keystore for the authority.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
authority | yes | String | An authority is collection of users held together via a key store. |
connection.AuthorityGet(identity, authority, {
success: function(response) {
// response.keystore
},
failure: function(reason) {
}
});
name | type | documentation |
keystore | ObjectNode | A bunch of public keys to validate tokens for an authority. |
List authorities for the given developer.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
connection.AuthorityList(identity, {
next: function(payload) {
// payload.authority
},
complete: function() {
},
failure: function(reason) {
}
});
name | type | documentation |
authority | String | An authority is collection of third party users authenticated via a public keystore. |
Destroy an authority.
This is exceptionally dangerous as it will break authentication for any users that have tokens based on that authority.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
authority | yes | String | An authority is collection of users held together via a key store. |
connection.AuthorityDestroy(identity, authority, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
Create a space.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
template | no | String | When creating a space, the template is a known special identifier for how to bootstrap the defaults. Examples: none (default when template parameter not present). |
connection.SpaceCreate(identity, space, template, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
Generate a secret key for a space.
First party and third party services require secrets such as api tokens or credentials.
These credentials must be encrypted within the Adama document using a public-private key, and the secret is derived via a key exchange.
Here, the server will generate a public/private key pair and store the private key securely and give the developer a public key.
The developer then generates a public/private key, encrypts the token with the private key, throws away the private key, and then embeds the key id, the developer's public key, and the encrypted credential within the adama source code.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
connection.SpaceGenerateKey(identity, space, {
success: function(response) {
// response.keyId
// response.publicKey
},
failure: function(reason) {
}
});
name | type | documentation |
key-id | Integer | Unique id of the private-key used for a secret. |
public-key | String | A public key to decrypt a secret with key arrangement. |
Get the deployment plan for a space.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
connection.SpaceGet(identity, space, {
success: function(response) {
// response.plan
},
failure: function(reason) {
}
});
name | type | documentation |
plan | ObjectNode | A plan is a predictable mapping of keys to implementations. The core reason for having multiple concurrent implementations is to have a smooth and orderly deployment. See deployment plans for more information. |
Set the deployment plan for a space.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
plan | yes | ObjectNode | This 'plan' parameter contains multiple Adama scripts all gated on various rules. These rules allow for a migration to happen slowly on your schedule. Note: this value will validated such that the scripts are valid, compile, and will not have any major regressions during role out. |
connection.SpaceSet(identity, space, plan, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
A diagnostic call to optimistically to refresh a space's deployment
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
connection.SpaceRedeployKick(identity, space, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
Set the RxHTML forest for the space when viewed via a domain name.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
rxhtml | yes | String | A RxHTML forest which provides simplified web hosting. |
connection.SpaceSetRxhtml(identity, space, rxhtml, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
Get the RxHTML forest for the space when viewed via a domain name.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
connection.SpaceGetRxhtml(identity, space, {
success: function(response) {
// response.rxhtml
},
failure: function(reason) {
}
});
name | type | documentation |
rxhtml | String | The RxHTML forest for a space. |
Set the access control policy for a space
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
access-policy | yes | ObjectNode | A policy to control who can do what against a space. |
connection.SpaceSetPolicy(identity, space, access-policy, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
returns the
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
connection.SpaceGetPolicy(identity, space, {
success: function(response) {
// response.accessPolicy
},
failure: function(reason) {
}
});
name | type | documentation |
access-policy | ObjectNode | A policy to control who can do what against a space. |
For regional proxies to emit metrics for a document
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
prefix | no | String | A prefix of a key used to filter results in a listing or computation |
metric-query | no | ObjectNode | A metric query to override the behavior on aggregation for specific fields |
connection.SpaceMetrics(identity, space, prefix, metric-query, {
success: function(response) {
// response.metrics
// response.count
},
failure: function(reason) {
}
});
name | type | documentation |
metrics | ObjectNode | A metrics object is a bunch of counters/event-tally |
count | Integer | The number of items considered/available. |
Delete a space.
This requires no documents to be within the space, and this removes the space from use until garbage collection ensures no documents were created for that space after deletion.
A space may be reserved for 90 minutes until the system is absolutely sure no documents will leak.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
connection.SpaceDelete(identity, space, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
Set the role of an Adama developer for a particular space.
Spaces can be shared among Adama developers.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
email | yes | String | The email of an Adama developer. |
role | yes | String | The role of a user may determine their capabilities to perform actions. |
connection.SpaceSetRole(identity, space, email, role, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
List the developers with access to this space
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
connection.SpaceListDevelopers(identity, space, {
next: function(payload) {
// payload.email
// payload.role
},
complete: function() {
},
failure: function(reason) {
}
});
name | type | documentation |
email | String | A developer email |
role | String | Each developer has a role to a document. |
Get a schema for the space.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
key | yes | String | Within a space, documents are organized within a map and the 'key' parameter will uniquely identify documents. Keys are lower case ASCII using the regex [a-z0-9._-]* for validation |
connection.SpaceReflect(identity, space, key, {
success: function(response) {
// response.reflection
},
failure: function(reason) {
}
});
name | type | documentation |
reflection | ObjectNode | Schema of a document. |
List the spaces available to the user.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
marker | no | String | A key to skip ahead a listing. When iterating, values will be returned that are after marker. To paginate an entire list, pick the last key or name returned and use it as the next marker. |
limit | no | Integer | Maximum number of items to return during a streaming list. |
connection.SpaceList(identity, marker, limit, {
next: function(payload) {
// payload.space
// payload.role
// payload.created
// payload.enabled
// payload.storageBytes
},
complete: function() {
},
failure: function(reason) {
}
});
name | type | documentation |
space | String | A space which is a collection of documents with a common Adama schema. |
role | String | Each developer has a role to a document. |
created | String | When the item was created. |
enabled | Boolean | Is the item in question enabled. |
storage-bytes | Long | The storage used. |
Register a device for push notifications
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
domain | yes | String | A domain name. |
subscription | yes | ObjectNode | A push subscription which is an abstract package for push notifications |
device-info | yes | ObjectNode | Information about a device |
connection.PushRegister(identity, domain, subscription, device-info, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
Map a domain to a space.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
domain | yes | String | A domain name. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
certificate | no | String | A TLS/SSL Certificate encoded as json. |
connection.DomainMap(identity, domain, space, certificate, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
Get a schema for the domain
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
domain | yes | String | A domain name. |
connection.DomainReflect(identity, domain, {
success: function(response) {
// response.reflection
},
failure: function(reason) {
}
});
name | type | documentation |
reflection | ObjectNode | Schema of a document. |
Map a domain to a space.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
domain | yes | String | A domain name. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
key | yes | String | Within a space, documents are organized within a map and the 'key' parameter will uniquely identify documents. Keys are lower case ASCII using the regex [a-z0-9._-]* for validation |
route | no | Boolean | A domain can route to the space or to a document's handler |
certificate | no | String | A TLS/SSL Certificate encoded as json. |
connection.DomainMapDocument(identity, domain, space, key, route, certificate, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
List the domains for the given developer
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
connection.DomainList(identity, {
next: function(payload) {
// payload.domain
// payload.space
// payload.key
// payload.route
},
complete: function() {
},
failure: function(reason) {
}
});
name | type | documentation |
domain | String | A domain name. |
space | String | A space which is a collection of documents with a common Adama schema. |
key | String | The key. |
route | Boolean | Does the domain route GET to the document or the space. |
List the domains for the given developer
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
connection.DomainListBySpace(identity, space, {
next: function(payload) {
// payload.domain
// payload.space
// payload.key
// payload.route
},
complete: function() {
},
failure: function(reason) {
}
});
name | type | documentation |
domain | String | A domain name. |
space | String | A space which is a collection of documents with a common Adama schema. |
key | String | The key. |
route | Boolean | Does the domain route GET to the document or the space. |
Get the public key for the VAPID
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
domain | yes | String | A domain name. |
connection.DomainGetVapidPublicKey(identity, domain, {
success: function(response) {
// response.publicKey
},
failure: function(reason) {
}
});
name | type | documentation |
public-key | String | A public key to decrypt a secret with key arrangement. |
Unmap a domain
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
domain | yes | String | A domain name. |
connection.DomainUnmap(identity, domain, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
Get the domain mapping
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
domain | yes | String | A domain name. |
connection.DomainGet(identity, domain, {
success: function(response) {
// response.space
},
failure: function(reason) {
}
});
name | type | documentation |
space | String | A space which is a collection of documents with a common Adama schema. |
Authorize a username and password against a document.
name | required | type | documentation |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
key | yes | String | Within a space, documents are organized within a map and the 'key' parameter will uniquely identify documents. Keys are lower case ASCII using the regex [a-z0-9._-]* for validation |
username | yes | String | The username for a document authorization |
password | yes | String | The password for your account or a document |
connection.DocumentAuthorize(space, key, username, password, {
success: function(response) {
// response.identity
},
failure: function(reason) {
}
});
name | type | documentation |
identity | String | A private token used to authenticate to Adama. |
Authorize a username and password against a document via a domain
name | required | type | documentation |
domain | yes | String | A domain name. |
username | yes | String | The username for a document authorization |
password | yes | String | The password for your account or a document |
connection.DocumentAuthorizeDomain(domain, username, password, {
success: function(response) {
// response.identity
},
failure: function(reason) {
}
});
name | type | documentation |
identity | String | A private token used to authenticate to Adama. |
Authorize a username and password against a document, and set a new password
name | required | type | documentation |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
key | yes | String | Within a space, documents are organized within a map and the 'key' parameter will uniquely identify documents. Keys are lower case ASCII using the regex [a-z0-9._-]* for validation |
username | yes | String | The username for a document authorization |
password | yes | String | The password for your account or a document |
new_password | yes | String | The new password for your account or document |
connection.DocumentAuthorizeWithReset(space, key, username, password, new_password, {
success: function(response) {
// response.identity
},
failure: function(reason) {
}
});
name | type | documentation |
identity | String | A private token used to authenticate to Adama. |
Authorize a username and password against a document, and set a new password
name | required | type | documentation |
domain | yes | String | A domain name. |
username | yes | String | The username for a document authorization |
password | yes | String | The password for your account or a document |
new_password | yes | String | The new password for your account or document |
connection.DocumentAuthorizeDomainWithReset(domain, username, password, new_password, {
success: function(response) {
// response.identity
},
failure: function(reason) {
}
});
name | type | documentation |
identity | String | A private token used to authenticate to Adama. |
Create a document.
The entropy allows the randomization of the document to be fixed at construction time.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
key | yes | String | Within a space, documents are organized within a map and the 'key' parameter will uniquely identify documents. Keys are lower case ASCII using the regex [a-z0-9._-]* for validation |
entropy | no | String | Each document has a random number generator. When 'entropy' is present, it will seed the random number generate such that the randomness is now deterministic at the start. |
arg | yes | ObjectNode | The parameter for a document's @construct event. |
connection.DocumentCreate(identity, space, key, entropy, arg, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
Delete a document (invokes the @delete document policy).
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
key | yes | String | Within a space, documents are organized within a map and the 'key' parameter will uniquely identify documents. Keys are lower case ASCII using the regex [a-z0-9._-]* for validation |
connection.DocumentDelete(identity, space, key, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
List documents within a space which are after the given marker.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
marker | no | String | A key to skip ahead a listing. When iterating, values will be returned that are after marker. To paginate an entire list, pick the last key or name returned and use it as the next marker. |
limit | no | Integer | Maximum number of items to return during a streaming list. |
connection.DocumentList(identity, space, marker, limit, {
next: function(payload) {
// payload.key
// payload.created
// payload.updated
// payload.seq
},
complete: function() {
},
failure: function(reason) {
}
});
name | type | documentation |
key | String | The key. |
created | String | When the item was created. |
updated | String | When the item was last updated. |
seq | Integer | The sequencer for the item. |
Send a message to a document without a connection
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
key | yes | String | Within a space, documents are organized within a map and the 'key' parameter will uniquely identify documents. Keys are lower case ASCII using the regex [a-z0-9._-]* for validation |
channel | yes | String | Each document has multiple channels available to send messages too. |
message | yes | JsonNode | The object sent to a document which will be the parameter for a channel handler. |
connection.MessageDirectSend(identity, space, key, channel, message, {
success: function(response) {
// response.seq
},
failure: function(reason) {
}
});
name | type | documentation |
seq | Integer | The sequencer for the item. |
Send a message to a document without a connection
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
key | yes | String | Within a space, documents are organized within a map and the 'key' parameter will uniquely identify documents. Keys are lower case ASCII using the regex [a-z0-9._-]* for validation |
dedupe | no | String | A key used to dedupe request such that at-most once processing is used. |
channel | yes | String | Each document has multiple channels available to send messages too. |
message | yes | JsonNode | The object sent to a document which will be the parameter for a channel handler. |
connection.MessageDirectSendOnce(identity, space, key, dedupe, channel, message, {
success: function(response) {
// response.seq
},
failure: function(reason) {
}
});
name | type | documentation |
seq | Integer | The sequencer for the item. |
Create a connection to a document.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
key | yes | String | Within a space, documents are organized within a map and the 'key' parameter will uniquely identify documents. Keys are lower case ASCII using the regex [a-z0-9._-]* for validation |
viewer-state | no | ObjectNode | A connection to a document has a side-channel for passing information about the client's view into the evaluation of bubbles. This allows for developers to implement real-time queries and pagination. |
connection.ConnectionCreate(identity, space, key, viewer-state, {
next: function(payload) {
// payload.delta
},
complete: function() {
},
failure: function(reason) {
}
});
name | type | documentation |
delta | ObjectNode | A json delta representing a change of data. See the delta format for more information. |
Create a connection to a document via a domain name.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
domain | yes | String | A domain name. |
viewer-state | no | ObjectNode | A connection to a document has a side-channel for passing information about the client's view into the evaluation of bubbles. This allows for developers to implement real-time queries and pagination. |
connection.ConnectionCreateViaDomain(identity, domain, viewer-state, {
next: function(payload) {
// payload.delta
},
complete: function() {
},
failure: function(reason) {
}
});
name | type | documentation |
delta | ObjectNode | A json delta representing a change of data. See the delta format for more information. |
Send a message to the document on the given channel.
name | required | type | documentation |
channel | yes | String | Each document has multiple channels available to send messages too. |
message | yes | JsonNode | The object sent to a document which will be the parameter for a channel handler. |
stream.Send(channel, message, {
success: function(response) {
// response.seq
},
failure: function(reason) {
}
});
name | type | documentation |
seq | Integer | The sequencer for the item. |
Set the viewer's password to the document; requires their old password.
name | required | type | documentation |
username | yes | String | The username for a document authorization |
password | yes | String | The password for your account or a document |
new_password | yes | String | The new password for your account or document |
stream.Password(username, password, new_password, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
Send a message to the document on the given channel with a dedupe key such that sending happens at most once.
name | required | type | documentation |
channel | yes | String | Each document has multiple channels available to send messages too. |
dedupe | no | String | A key used to dedupe request such that at-most once processing is used. |
message | yes | JsonNode | The object sent to a document which will be the parameter for a channel handler. |
stream.SendOnce(channel, dedupe, message, {
success: function(response) {
// response.seq
},
failure: function(reason) {
}
});
name | type | documentation |
seq | Integer | The sequencer for the item. |
Ask whether the connection can have attachments attached.
name | required | type | documentation |
stream.CanAttach({
success: function(response) {
// response.yes
},
failure: function(reason) {
}
});
name | type | documentation |
yes | Boolean | The result of a boolean question. |
This is an internal API used only by Adama for multi-region support.
Start an upload for the given document with the given filename and content type.
name | required | type | documentation |
asset-id | yes | String | The id of an asset. |
filename | yes | String | A filename is a nice description of the asset being uploaded. |
content-type | yes | String | The MIME type like text/json or video/mp4. |
size | yes | Long | The size of an attachment. |
digest-md5 | yes | String | The MD5 of an attachment. |
digest-sha384 | yes | String | The SHA384 of an attachment. |
stream.Attach(asset-id, filename, content-type, size, digest-md5, digest-sha384, {
success: function(response) {
// response.seq
},
failure: function(reason) {
}
});
name | type | documentation |
seq | Integer | The sequencer for the item. |
Update the viewer state of the document.
The viewer state is accessible to bubbles to provide view restriction and filtering.
For example, the viewer state is how a document can provide real-time search or pagination.
name | required | type | documentation |
viewer-state | no | ObjectNode | A connection to a document has a side-channel for passing information about the client's view into the evaluation of bubbles. This allows for developers to implement real-time queries and pagination. |
stream.Update(viewer-state, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
Disconnect from the document.
name | required | type | documentation |
stream.End({
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
For documents that want to hold secrets, then these secrets should not be stored plaintext.
This method provides the client the ability to hash a password for plain text transmission.
name | required | type | documentation |
password | yes | String | The password for your account or a document |
connection.DocumentsHashPassword(password, {
success: function(response) {
// response.passwordHash
},
failure: function(reason) {
}
});
name | type | documentation |
password-hash | String | The hash of a password. |
Create a connection to the billing document of the given identity.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
connection.BillingConnectionCreate(identity, {
next: function(payload) {
// payload.delta
},
complete: function() {
},
failure: function(reason) {
}
});
name | type | documentation |
delta | ObjectNode | A json delta representing a change of data. See the delta format for more information. |
Here, we ask if the connection if it has an asset key already.
If not, then it will generate one and send it along.
Otherwise, it will return the key bound to the connection.
This is allows anyone to have access to assets which are not exposed directly via a web handler should they see the asset within their document view.
This method has no parameters.
connection.ConfigureMakeOrGetAssetKey({
success: function(response) {
// response.assetKey
},
failure: function(reason) {
}
});
name | type | documentation |
asset-key | String | A key used to connect the dots from the connection to assets to a browser. This is a session-based encryption scheme to protect assets from leaking outside the browser. |
Start an upload for the given document with the given filename and content type.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
space | yes | String | A 'space' is a collection of documents with the same schema and logic, and the 'space' parameter is used to denote the name of that collection. Spaces are lower case ASCII using the regex a-z[a-z0-9-]* to validation with a minimum length of three characters. The space name must also not contain a '--' |
key | yes | String | Within a space, documents are organized within a map and the 'key' parameter will uniquely identify documents. Keys are lower case ASCII using the regex [a-z0-9._-]* for validation |
filename | yes | String | A filename is a nice description of the asset being uploaded. |
content-type | yes | String | The MIME type like text/json or video/mp4. |
connection.AttachmentStart(identity, space, key, filename, content-type, {
next: function(payload) {
// payload.chunk_request_size
},
complete: function() {
},
failure: function(reason) {
}
});
name | type | documentation |
chunk_request_size | Integer | The attachment uploader is asking for a chunk size. Using the WebSocket leverages a flow control based uploader such that contention on the WebSocket is minimized. |
Start an upload for the given document with the given filename and content type.
name | required | type | documentation |
identity | yes | String | Identity is a token to authenticate a user. |
domain | yes | String | A domain name. |
filename | yes | String | A filename is a nice description of the asset being uploaded. |
content-type | yes | String | The MIME type like text/json or video/mp4. |
connection.AttachmentStartByDomain(identity, domain, filename, content-type, {
next: function(payload) {
// payload.chunk_request_size
},
complete: function() {
},
failure: function(reason) {
}
});
name | type | documentation |
chunk_request_size | Integer | The attachment uploader is asking for a chunk size. Using the WebSocket leverages a flow control based uploader such that contention on the WebSocket is minimized. |
Append a chunk with an MD5 to ensure data integrity.
name | required | type | documentation |
chunk-md5 | yes | String | A md5 hash of a chunk being uploaded. This provides uploads with end-to-end data-integrity. |
base64-bytes | yes | String | Bytes encoded in base64. |
stream.Append(chunk-md5, base64-bytes, {
success: function() {
},
failure: function(reason) {
}
});
This method simply returns void.
Finishing uploading the attachment upload.
name | required | type | documentation |
stream.Finish({
success: function(response) {
// response.assetId
},
failure: function(reason) {
}
});
name | type | documentation |
asset-id | String | The id of an uploaded asset. |