Developers

Slider

Our SDKs make it easy and secure to store records in their country of origin

1

Create an account and
get an API key

2

Use the SDK for your
language

3

You must use an InCountry SDK
to ensure that data is encrypted

Developer Tabs

Usage

1. Create storage instance
from incountry import Storage

storage = Storage(
    # Required to be passed in, or as environment variable INC_API_KEY
    api_key='string',

    # Required to be passed in, or as environment variable INC_ENVIRONMENT_ID
    environment_id='string'
)

2. Writes
write_response = storage.write(
    # Required country code of where to store the data
    country='string',

    # Required record key
    key='string',

    # Optional payload
    body='string',

    # Optional
    profile_key='string',
    
    # Optional
    range_key='string',

    # Optional
    key2='string',
    
    # Optional
    key3='string'
)
3. Reads
read_response = storage.read(
    # Required country code
    country='string',

    # Required record key
    key='string'
)

4. Deletes
delete_response = storage.delete(
    # Required country code
    country='string',

    # Required record key
    key='string'
)

Installation
npm install incountry

Usage

1. Create storage instance

var storage = new Storage({
apiKey: 'string', // Required to be passed in, or as environment variable INC_API_KEY
environmentId: 'string', // Required to be passed in, or as environment variable INC_ENVIRONMENT_ID
},
countriesCache, // Controls how often to update the countries listing the SDK uses for routing requests
cryptKeyAccessor, // Allows for a secure callback to grab the secret to use for crypto
logger // Allows for logging at different log levels in a consistent manner
);

2. Writes
var writeResponse = await storage.writeAsync({
country: 'string', // Required country code of where to store the data
key: 'string', // Required record key
body: 'string', // Optional payload
profile_key: 'string', // Optional
range_key: 'string', // Optional
key2: 'string', // Optional
key3: 'string' // Optional
});

// Use writeReponse.status for status code.

3. Reads
var readResponse = await storage.readAsync({
country: 'string', // Required country code
key: 'string' // Required record key
});

// Use readResponse.status for status code, and readResponse.data for payload received.

4. Batches
// Currently only GET batches are supported
var batchResponse = await storage.batchAsync({
"GET": [
// Array of strings mapping to keys
]
})

// Use batchResponse.status for status code, and batchResponse.data for payload received.

5. Deletes
var deleteResponse = await storage.deleteAsync({
country: 'string', // Required country code
key: 'string' // Required record key
});

// Use deleteResponse.status for status code.
This is the java SDK for the InCountry storage network. 
Sign up for a free account at https://incountry.com, 
then note down your Zone ID and API key.

Usage
1. Create Storage instance

1.1. Import Storage package

import com.incountry.Storage;

1.2. Set environment variables (optional)

export INC_ENVIRONMENT_ID=<environment id>
export INC_API_KEY=<api key>
export INC_SECRET_KEY=<secret key>- Create an instance

1.3. Create an instance

If environment variables are set:

Storage store = new Storage();

If not, pass values to the constructor:

Storage store = new Storage(environment_id, api_key, secret_key);

2. Writes

Write method has the following signature:

public void write(String country, String key, String body, String profile_key, String range_key, String key2, String key3)

All the parameters except country and key can be null. For example,

store.write("US", "some_row_key", "Some data", null, null, null, null);

3. Reads

Read method has the following signature:

public Data read(String country, String key)
Parameters country and key are mandatory. For example:

import com.incountry.Data;
...
Data d = store.read("US", "some_row_key");

4. Deletes

Delete method has the following signature:

public String delete(String country, String key)
The record can be deleted using the following syntax:

store.delete("US", "some_row_key");

For more information and to
discuss pricing, please complete
this information.



We have placed cookies on your device to help make this website better. By continuing to use this website you agree to our Cookie Policy. X