kinto
Module kinto
API
![](https://bcentral-packageicons.azureedge.net/images/ballerinax_kinto_1.5.0.png)
ballerinax/kinto Ballerina library
Overview
This is a generated connector for Kinto API v1.22 OpenAPI specification.
The Kinto API provides the capability to store and retrieve JSON data.
Quickstart
To use the Kinto connector in your Ballerina application, update the .bal file as follows:
Step 1: Import connector
Import the ballerinax/kinto module into the Ballerina project.
import ballerinax/kinto;
Step 2: Create a new connector instance
kinto:Client kintoClient = check new();
Step 3: Invoke connector operation
-
Now you can use the operations available within the connector. Note that they are in the form of remote operations.
Following is an example on how to get buckets using the connector.public function main() returns error? { Schema entity = check kintoClient->getBuckets(); }
-
Use
bal run
command to compile and run the Ballerina program.
Clients![](/images/permalink.svg)
kinto: Client![](/images/permalink.svg)
This is a generated connector for Kinto v1.22 OpenAPI specification. The Kinto API provides the capability to store and retrieve JSON data.
Constructor![](/images/permalink.svg)
Gets invoked to initialize the connector
.
The connector initialization does not require setting the API credentials.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig {} - The configurations to be used when initializing the
connector
- serviceUrl string "https://firefox.settings.services.mozilla.com/v1" - URL of the target service
serverInfo![](/images/permalink.svg)
function serverInfo() returns json|error
Return Type
- json|error - Return information about the running Instance.
getOpenapiSpec![](/images/permalink.svg)
function getOpenapiSpec() returns json|error
Return Type
- json|error - Return an OpenAPI description of the running instance.
heartbeat![](/images/permalink.svg)
function heartbeat() returns json|error
Return Type
- json|error - Server is working properly.
lbheartbeat![](/images/permalink.svg)
function lbheartbeat() returns json|error
Return Type
- json|error - Returned if server is reachable.
getversion![](/images/permalink.svg)
function getversion() returns json|error
Return Type
- json|error - Return the running Instance version information.
batch![](/images/permalink.svg)
function batch(BatchPayloadSchema payload) returns BatchResponseBodySchema|error
Parameters
- payload BatchPayloadSchema - Batch
Return Type
- BatchResponseBodySchema|error - Return a list of operation responses.
getBuckets![](/images/permalink.svg)
function getBuckets(int? 'limit, string[]? sort, string? token, int? since, int? to, int? before, string? id, int? lastModified, string[]? fields, string? ifMatch, string? ifNoneMatch) returns Schema|error
Parameters
- 'limit int? (default ()) - Limit
- sort string[]? (default ()) - Sort
- token string? (default ()) - Token
- since int? (default ()) - Since
- to int? (default ()) - To
- before int? (default ()) - Before
- id string? (default ()) - ID
- lastModified int? (default ()) - Last modified
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
getChanges![](/images/permalink.svg)
function getChanges(int? 'limit, string[]? sort, string? token, int? since, int? to, int? before, string? id, int? lastModified, string[]? fields, string? ifMatch, string? ifNoneMatch) returns Schema1|error
Parameters
- 'limit int? (default ()) - Limit
- sort string[]? (default ()) - Sort
- token string? (default ()) - Token
- since int? (default ()) - Since
- to int? (default ()) - To
- before int? (default ()) - Before
- id string? (default ()) - ID
- lastModified int? (default ()) - Last modified
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
getCollectionChangeset![](/images/permalink.svg)
function getCollectionChangeset(string bid, string cid, string expected, string? since, int? 'limit, string? bucket, string? collection) returns Response|error
Parameters
- bid string - bid
- cid string - cid
- expected string - Expected
- since string? (default ()) - Since
- 'limit int? (default ()) - Limit
- bucket string? (default ()) - Bucket
- collection string? (default ()) - Collection
getCollections![](/images/permalink.svg)
function getCollections(string bucketId, int? 'limit, string[]? sort, string? token, int? since, int? to, int? before, string? id, int? lastModified, string[]? fields, string? ifMatch, string? ifNoneMatch) returns Schema2|error
Parameters
- bucketId string - Bucket ID
- 'limit int? (default ()) - Limit
- sort string[]? (default ()) - Sort
- token string? (default ()) - Token
- since int? (default ()) - Since
- to int? (default ()) - To
- before int? (default ()) - Before
- id string? (default ()) - ID
- lastModified int? (default ()) - Last modified
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
getRecords![](/images/permalink.svg)
function getRecords(string bucketId, string collectionId, int? 'limit, string[]? sort, string? token, int? since, int? to, int? before, string? id, int? lastModified, string[]? fields, string? ifMatch, string? ifNoneMatch) returns Schema3|error
Parameters
- bucketId string - Bucket ID
- collectionId string - Collection ID
- 'limit int? (default ()) - Limit
- sort string[]? (default ()) - Sort
- token string? (default ()) - Token
- since int? (default ()) - Since
- to int? (default ()) - To
- before int? (default ()) - Before
- id string? (default ()) - ID
- lastModified int? (default ()) - Last modified
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
getRecord![](/images/permalink.svg)
function getRecord(string bucketId, string collectionId, string id, string[]? fields, string? ifMatch, string? ifNoneMatch) returns ObjectSchema|error
Parameters
- bucketId string - Bucket ID
- collectionId string - Collection ID
- id string - ID
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
Return Type
- ObjectSchema|error - Return the target object.
createAttachment![](/images/permalink.svg)
deleteAttachment![](/images/permalink.svg)
getCollection![](/images/permalink.svg)
function getCollection(string bucketId, string id, string[]? fields, string? ifMatch, string? ifNoneMatch) returns Objectschema1|error
Parameters
- bucketId string - Bucket ID
- id string - ID
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
Return Type
- Objectschema1|error - Return the target object.
getGroups![](/images/permalink.svg)
function getGroups(string bucketId, int? 'limit, string[]? sort, string? token, int? since, int? to, int? before, string? id, int? lastModified, string[]? fields, string? ifMatch, string? ifNoneMatch) returns Schema4|error
Parameters
- bucketId string - Bucket ID
- 'limit int? (default ()) - Limit
- sort string[]? (default ()) - Sort
- token string? (default ()) - Token
- since int? (default ()) - Since
- to int? (default ()) - To
- before int? (default ()) - Before
- id string? (default ()) - ID
- lastModified int? (default ()) - Last modified
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
getGroup![](/images/permalink.svg)
function getGroup(string bucketId, string id, string[]? fields, string? ifMatch, string? ifNoneMatch) returns Objectschema2|error
Parameters
- bucketId string - Bucket ID
- id string - ID
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
Return Type
- Objectschema2|error - Return the target object.
getBucket![](/images/permalink.svg)
function getBucket(string id, string[]? fields, string? ifMatch, string? ifNoneMatch) returns Objectschema3|error
Parameters
- id string - ID
- fields string[]? (default ()) - Fields
- ifMatch string? (default ()) - If match
- ifNoneMatch string? (default ()) - If none match
Return Type
- Objectschema3|error - Return the target object.
contribute![](/images/permalink.svg)
function contribute() returns json|error
Return Type
- json|error - Return open source contributing information.
getBlocklist![](/images/permalink.svg)
function getBlocklist(string prefix, string apiVer, string applicationGuid, string applicationVer, string metrics, string apiVerD, string metricsParam) returns Response|error
Records![](/images/permalink.svg)
kinto: BatchPayloadSchema![](/images/permalink.svg)
Fields
- defaults Defaults? -
- requests BatchRequests[] -
kinto: BatchRequests![](/images/permalink.svg)
Fields
- body record {}? -
- headers record {}? -
- method string? -
- path string -
kinto: BatchResponseBodySchema![](/images/permalink.svg)
Fields
kinto: ClientHttp1Settings![](/images/permalink.svg)
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
kinto: ConnectionConfig![](/images/permalink.svg)
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
kinto: Defaults![](/images/permalink.svg)
Fields
- body record {}? -
- headers record {}? -
- method string? -
- path string? -
kinto: ErrorSchema![](/images/permalink.svg)
Fields
- code int -
- details anydata? -
- errno int -
- 'error string -
- info string? -
- message string? -
kinto: ObjectSchema![](/images/permalink.svg)
Fields
- data record {}? -
kinto: Objectschema1![](/images/permalink.svg)
Fields
- data record { cache_expires int, schema record {} }? -
kinto: Objectschema2![](/images/permalink.svg)
Fields
- data record { members string[] }? -
kinto: Objectschema3![](/images/permalink.svg)
Fields
- data record { 'collection\:schema record {}, 'group\:schema record {}, 'record\:schema record {} }? -
kinto: ProxyConfig![](/images/permalink.svg)
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
kinto: Schema![](/images/permalink.svg)
Fields
- data record { 'collection\:schema record {}, 'group\:schema record {}, 'record\:schema record {} }[]? -
kinto: Schema1![](/images/permalink.svg)
Fields
kinto: Schema2![](/images/permalink.svg)
Fields
- data record { cache_expires int, schema record {} }[]? -
kinto: Schema3![](/images/permalink.svg)
Fields
- data record {}[]? -
kinto: Schema4![](/images/permalink.svg)
Fields
- data record { members string[] }[]? -
Import
import ballerinax/kinto;
Metadata
Released date: over 1 year ago
Version: 1.5.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 0
Weekly downloads
Keywords
Website & App Building/App Builders
Cost/Free
Contributors
Dependencies