earthref.fiesta
Module earthref.fiesta
API
ballerinax/earthref.fiesta Ballerina library
Overview
This is a generated connector for EarthRef.org's FIESTA API v1.2.0 OpenAPI Specification.
EarthRef.org is a geoscience umbrella website for several data repositories. These repositories, unified under the mandate to preserve their respective data and promote scientific collaboration in their fields, are also disparate in their schemata. The Framework for Integrated Earth Science and Technology Applications (FIESTA) project is creating the tools to easily customize and manage these geoscience repositories and the FIESTA API is a core component of that solution.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create an EarthRef.org user account.
- Obtain tokens
- Follow this link to obtain tokens
Clients
earthref.fiesta: Client
This is a generated connector for EarthRef.org's FIESTA API v1.2.0 OpenAPI Specification.
EarthRef.org is a geoscience umbrella website for several data repositories. These repositories, unified under the mandate to preserve their respective data and promote scientific collaboration in their fields, are also disparate in their schemata. The Framework for Integrated Earth Science and Technology Applications (FIESTA) project is creating the tools to easily customize and manage these geoscience repositories and the FIESTA API is a core component of that solution.
Authentication
The API is served over HTTPS thereby making HTTP Basic Authentication secure. The credentials are the username and password of an active EarthRef.org user account and provide access to that user's private workspace in any of EarthRef.org FIESTA repositories.
Constructor
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials.
Create an EarthRef.org user account and obtain tokens following this guide.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://api.earthref.org" - URL of the target service
checkHealth
function checkHealth() returns InlineResponse200|error
Check the health of the API
Return Type
- InlineResponse200|error - Health check passed
authenticate
Authenticate a username and password
downloadPublicFiles
function downloadPublicFiles(string repository, int nMaxContributions, string? query, int[]? id, string[]? doi, string[]? contributorName) returns json|error?
Download the zip archive of files for one or more public contributions
Parameters
- repository string - Repository
- nMaxContributions int (default 10) - Maximum number of contributions to download in descending timestamp order
- query string? (default ()) - One or more Elasticsearch query strings to match any data model text field (https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax)
- id int[]? (default ()) - One or more contribution IDs to match
- doi string[]? (default ()) - One or more reference DOIs to match
- contributorName string[]? (default ()) - One or more contributor names to match
Return Type
- json|error? - A zip archive of files for the public contributions
getPublicContributionData
Retrieve the data for a public or shared private contribution
Parameters
- repository string - Repository
- id int? (default ()) - The ID of the contribution to retrieve
- 'key string? (default ()) - The private key for retrieving a shared contribution
getPublicTable
function getPublicTable(string repository, string 'table, int? nMaxRows, int? 'from, string[]? query) returns string|error?
Retrieve public data rows
Parameters
- repository string - Repository
- 'table string - Table name
- nMaxRows int? (default ()) - Max number of rows to return
- 'from int? (default ()) - Starting record number for paging
- query string[]? (default ()) - One or more Elasticsearch query strings to match any data model text field (https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html)
validateContribution
function validateContribution(string repository, RepositoryValidateBody payload) returns json|error
Validate a contribution
Return Type
- json|error - The validation result was returned.
downloadPrivateFiles
Download the zip archive of the files for a private contribution
Return Type
- json|error? - A zip archive of files for the private contribution
getPrivateContributionData
Retrieve the data for a private contribution
validatePrivateContribution
Validate a private contribution
Return Type
- json|error? - The validation result was returned.
getPrivateTable
function getPrivateTable(string repository, string 'table, int? nMaxRows, int? 'from, string[]? query) returns Response|error
Retrieve private data rows
Parameters
- repository string - Repository
- 'table string - Table name
- nMaxRows int? (default ()) - Max number of rows to return
- 'from int? (default ()) - Starting record number for paging
- query string[]? (default ()) - One or more Elasticsearch query strings to match any data model text field (https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html)
updatePrivateContribution
function updatePrivateContribution(string repository, int id, RepositoryPrivateBody payload) returns InlineResponse202|error?
Update a private contribution
Parameters
- repository string - Repository
- id int - Contribution IDs
- payload RepositoryPrivateBody - Request payload
Return Type
- InlineResponse202|error? - The file(s) were uploaded to the contribution and are being processed.
createPrivateContribution
function createPrivateContribution(string repository) returns InlineResponse201|error?
Create a private contribution
Parameters
- repository string - Repository
Return Type
- InlineResponse201|error? - The private contribution was created.
deletePrivateContribution
function deletePrivateContribution(string repository, int id) returns InlineResponse2001|error?
Delete a private contribution
Return Type
- InlineResponse2001|error? - The contribution was deleted.
Records
earthref.fiesta: ClientHttp1Settings
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
earthref.fiesta: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth CredentialsConfig - Configurations related to client authentication
- 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
earthref.fiesta: ErrorReponse
Fields
- errors MessageResponse[]? -
earthref.fiesta: InlineResponse200
Fields
- message string -
earthref.fiesta: InlineResponse2001
Fields
- rowsDeleted int -
earthref.fiesta: InlineResponse201
Fields
- id int -
earthref.fiesta: InlineResponse202
Fields
- rowsAdded int -
- rowsChanged int -
- rowsDeleted int -
earthref.fiesta: InlineResponse500
Fields
- errors InlineResponse500Errors[] -
earthref.fiesta: InlineResponse500Errors
Fields
- message string -
earthref.fiesta: MessageResponse
Fields
- message string -
earthref.fiesta: ProxyConfig
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
earthref.fiesta: RepositoryPrivateBody
Fields
- filename string[]? -
earthref.fiesta: RepositoryValidateBody
Fields
- filename string[]? -
Import
import ballerinax/earthref.fiesta;
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: 1
Current verison: 0
Weekly downloads
Keywords
IT Operations/Geographic Information Systems
Cost/Free
Contributors