earthref.fiesta
Module earthref.fiesta
API
![](https://bcentral-dev-packageicons.azureedge.net/images/ballerinax_earthref.fiesta_1.3.0.png)
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![](/images/permalink.svg)
earthref.fiesta: Client![](/images/permalink.svg)
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![](/images/permalink.svg)
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 (ClientConfig clientConfig, string serviceUrl)
- clientConfig ClientConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://api.earthref.org" - URL of the target service
checkHealth![](/images/permalink.svg)
function checkHealth() returns InlineResponse200|error
Check the health of the API
Return Type
- InlineResponse200|error - Health check passed
authenticate![](/images/permalink.svg)
Authenticate a username and password
downloadPublicFiles![](/images/permalink.svg)
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![](/images/permalink.svg)
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![](/images/permalink.svg)
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![](/images/permalink.svg)
function validateContribution(string repository, RepositoryValidateBody payload) returns json|error
Validate a contribution
Return Type
- json|error - The validation result was returned.
downloadPrivateFiles![](/images/permalink.svg)
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![](/images/permalink.svg)
Retrieve the data for a private contribution
validatePrivateContribution![](/images/permalink.svg)
Validate a private contribution
Return Type
- json|error? - The validation result was returned.
getPrivateTable![](/images/permalink.svg)
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![](/images/permalink.svg)
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![](/images/permalink.svg)
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![](/images/permalink.svg)
function deletePrivateContribution(string repository, int id) returns InlineResponse2001|error?
Delete a private contribution
Return Type
- InlineResponse2001|error? - The contribution was deleted.
Records![](/images/permalink.svg)
earthref.fiesta: ClientConfig![](/images/permalink.svg)
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 string(default "1.1") - The HTTP version understood by the client
- http1Settings ClientHttp1Settings(default {}) - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings(default {}) - 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
- followRedirects FollowRedirects?(default ()) - Configurations associated with Redirection
- poolConfig PoolConfiguration?(default ()) - Configurations associated with request pooling
- cache CacheConfig(default {}) - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig?(default ()) - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig?(default ()) - Configurations associated with retrying
- cookieConfig CookieConfig?(default ()) - Configurations associated with cookies
- responseLimits ResponseLimitConfigs(default {}) - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket?(default ()) - SSL/TLS-related options
earthref.fiesta: ErrorReponse![](/images/permalink.svg)
Fields
- errors MessageResponse[]? -
earthref.fiesta: InlineResponse200![](/images/permalink.svg)
Fields
- message string -
earthref.fiesta: InlineResponse2001![](/images/permalink.svg)
Fields
- rowsDeleted int -
earthref.fiesta: InlineResponse201![](/images/permalink.svg)
Fields
- id int -
earthref.fiesta: InlineResponse202![](/images/permalink.svg)
Fields
- rowsAdded int -
- rowsChanged int -
- rowsDeleted int -
earthref.fiesta: InlineResponse500![](/images/permalink.svg)
Fields
- errors InlineResponse500Errors[] -
earthref.fiesta: InlineResponse500Errors![](/images/permalink.svg)
Fields
- message string -
earthref.fiesta: MessageResponse![](/images/permalink.svg)
Fields
- message string -
earthref.fiesta: RepositoryPrivateBody![](/images/permalink.svg)
Fields
- filename string[]? -
earthref.fiesta: RepositoryValidateBody![](/images/permalink.svg)
Fields
- filename string[]? -
Import
import ballerinax/earthref.fiesta;
Metadata
Released date: over 1 year ago
Version: 1.3.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.2.1
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 0
Weekly downloads
Keywords
IT Operations/Geographic Information Systems
Cost/Free
Contributors