ballerinax/elmah Ballerina library

1.5.1

Overview

This is a generated connector for Elmah.io REST API v3 OpenAPI Specification.

The public REST API for elmah.io. All of the integrations communicates with elmah.io through this API.

For additional help getting started with the API, visit the following help articles:

  • [Using the REST API](https://docs.elmah.io/using-the-rest-api/)
  • [Where is my API key?](https://docs.elmah.io/where-is-my-api-key/)
  • [Where is my log ID?](https://docs.elmah.io/where-is-my-log-id/)
  • [How to configure API key permissions](https://docs.elmah.io/how-to-configure-api-key-permissions/)

Prerequisites

  • Create an Elmah account
  • Obtain tokens

Quickstart

To use the Elmah.io connector in your Ballerina application, update the .bal file as follows:

Step 1 - Import connector

First, import the ballerinax/hubspot.crm.pipeline module into the Ballerina project.

Copy
import ballerinax/elmah;

Step 2 - Create a new connector instance

You can now make the connection configuration using the access token.

Copy
elmah:ApiKeysConfig config = {
    apikey : "<your apiKey>"
};

elmah:Client baseClient = check new Client(config);

Step 3 - Invoke connector operation

  1. Create a deployment
Copy
elmah:CreateDeployment dep = {
    'version: "0.1.8",
    created: "2021-07-28T11:26:00.834Z"
};

elmah:CreateDeploymentResult|error bEvent = baseClient->deploymentsCreate(dep);

if (bEvent is elmah:CreateDeploymentResult) {
    log:printInfo("Deplyment" + bEvent.toString());
} else {
    log:printError(msg = bEvent.message());
}
  1. List deployments
Copy
elmah:Deployment[]|error bEvent = baseClient->deploymentsGetAll();

if (bEvent is elmah:Deployment[]) {
    log:printInfo("Deployment list" + bEvent.toString());
} else {
     log:printError((msg = bEvent.message());
}
  1. Use bal run command to compile and run the Ballerina program

Import

import ballerinax/elmah;Copy

Metadata

Released date: 12 months ago

Version: 1.5.1

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.4.1

GraalVM compatible: Yes


Pull count

Total: 2

Current verison: 0


Weekly downloads


Source repository


Keywords

IT Operations/Debug Tools

Cost/Paid


Contributors

Other versions

See more...