Client library for elmah.io API
npm install --save @datafire/elmah
let elmah = require('@datafire/elmah').create({
api_key: ""
});
.then(data => {
console.log(data);
});
This is 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:
Fetch a list of deployments.
elmah.Deployments_GetAll(null, context)
This action has no parameters
- output
array
- items Deployment
Create a new deployment.
elmah.Deployments_Create({}, context)
- input
object
- body CreateDeployment
- output CreateDeploymentResult
This endpoint doesn't clear the version number of messages already annotated with this deployment version.
elmah.Deployments_Delete({
"id": ""
}, context)
- input
object
- id required
string
: The ID of the deployment to delete.
- id required
Output schema unknown
Fetch a deployment by its ID.
elmah.Deployments_Get({
"id": ""
}, context)
- input
object
- id required
string
: The ID of the deployment to fetch.
- id required
- output Deployment
Create a new heartbeat.
elmah.Heartbeats_Create({
"id": "",
"logId": ""
}, context)
- input
object
- id required
string
: The ID of the heartbeat check. - logId required
string
: The ID of the log containing the heartbeat check. - body CreateHeartbeat
- id required
Output schema unknown
Fetch a list of logs.
elmah.Logs_GetAll(null, context)
This action has no parameters
- output
array
- items Log
Create a new log.
elmah.Logs_Create({}, context)
- input
object
- body CreateLog
- output CreateLogResult
Fetch a log by its ID.
elmah.Logs_Get({
"id": ""
}, context)
- input
object
- id required
string
: The ID of the log to fetch.
- id required
- output Log
Deletes a list of messages by logid and query.
elmah.Messages_DeleteAll({
"logId": ""
}, context)
- input
object
- logId required
string
: The ID of the log containing the message. - body Search
- logId required
Output schema unknown
Fetch messages from a log.
elmah.Messages_GetAll({
"logId": ""
}, context)
- input
object
- logId required
string
: The ID of the log containing the messages. - pageIndex
integer
: The page number of the result. - pageSize
integer
: The number of messages to load (max 100) or 15 if not set. - query
string
: A full-text or Lucene query to limit the messages by. - from
string
: A start date and time to search from (not included). - to
string
: An end date and time to search to (not included). - includeHeaders
boolean
: Include headers like server variables and cookies in the result (slower).
- logId required
- output MessagesResult
Create a new message.
elmah.Messages_Create({
"logId": ""
}, context)
- input
object
- logId required
string
: The ID of the log which should contain the new message. - body CreateMessage
- logId required
Output schema unknown
Create one or more new messages.
elmah.Messages_CreateBulk({
"logId": ""
}, context)
- input
object
- logId required
string
: The ID of the log which should contain the new messages. - body
array
: The messages to create.- items CreateMessage
- logId required
- output
array
- items CreateBulkMessageResult
Delete a message by its ID.
elmah.Messages_Delete({
"id": "",
"logId": ""
}, context)
- input
object
- id required
string
: The ID of the message to delete. - logId required
string
: The ID of the log containing the message.
- id required
Output schema unknown
Fetch a message by its ID.
elmah.Messages_Get({
"id": "",
"logId": ""
}, context)
- input
object
- id required
string
: The ID of the message to fetch. - logId required
string
: The ID of the log containing the message.
- id required
- output Message
Fix a message by its ID.
elmah.Messages_Fix({
"id": "",
"logId": ""
}, context)
- input
object
- id required
string
: The ID of the message to fix. - logId required
string
: The ID of the log containing the message. - markAllAsFixed
boolean
: If set to true, all instances of the log message are set to fixed.
- id required
Output schema unknown
Hide a message by its ID.
elmah.Messages_Hide({
"id": "",
"logId": ""
}, context)
- input
object
- id required
string
: The ID of the message to hide. - logId required
string
: The ID of the log containing the message.
- id required
Output schema unknown
Fetch a list of uptime checks. Currently in closed beta. Get in contact to get access to this endpoint.
elmah.UptimeChecks_GetAll(null, context)
This action has no parameters
- output
array
- items UptimeCheck
- CreateBulkMessageResult
object
- location
string
: The location of the created message if StatusCode equals Created. - statusCode
integer
: Status code of the individual messages as if it were being created through the non-bulk endpoint.
- location
- CreateDeployment
object
- created
string
: When was this deployment created in UTC. Defaults to current time if not specified. - description
string
: Optional description of this deployment. Can be markdown or clear text. - logId
string
: As default, deployments are attached all logs of the organization. If you want a deployment to - userEmail
string
: The email of the person responsible for creating this deployment. This can be the email taken from - userName
string
: The name of the person responsible for creating this deployment. This can be the name taken from - version required
string
: The version number of this deployment. The value of version can be a SemVer compliant string or any other
- created
- CreateDeploymentResult
object
- location
string
: The location of the created deployment.
- location
- CreateHeartbeat
object
- application
string
: Optional string to identify which application logged this message. You can use this if you have multiple applications and services logging to the same log. - reason
string
: If result is "Degraded" or "Unhealthy" you can use this property to specify why. - result
string
: The result of this heartbeat. Can be "Healthy, "Degraded", or "Unhealthy". Defaults to "Healthy" - version
string
: Optional string to identify which version of your application logged this message. If not specified, any errors, warnings, or information messages will get
- application
- CreateLog
object
- name required
string
: Name of the new log.
- name required
- CreateLogResult
object
- location
string
: The location of the created log.
- location
- CreateMessage
object
- application
string
: Used to identify which application logged this message. You can use this if you have multiple applications and services logging to the same log - cookies
array
: A key/value pair of cookies. This property only makes sense for logging messages related to web requests.- items Item
- data
array
: A key/value pair of user-defined fields and their values. When logging an exception, the Data dictionary of- items Item
- dateTime
string
: The date and time in UTC of the message. If you don't provide us with a value in dateTime, we will set the current date and time in UTC. - detail
string
: A longer description of the message. For errors this could be a stacktrace, but it's really up to you what to log in there. - form
array
: A key/value pair of form fields and their values. This property makes sense if logging message related to users inputting data in a form.- items Item
- hostname
string
: The hostname of the server logging the message. - method
string
: If message relates to a HTTP request, you may send the HTTP method of that request. If you don't provide us with a method, we will try to find a key named REQUEST_METHOD in serverVariables. - queryString
array
: A key/value pair of query string parameters. This property makes sense if logging message related to a HTTP request.- items Item
- serverVariables
array
: A key/value pair of server values. Server variables are typically related to handling requests in a webserver but could be used for other types of information as well.- items Item
- severity
string
: An enum value representing the severity of this message. The following values are allowed: Verbose, Debug, Information, Warning, Error, Fatal - source
string
: The source of the code logging the message. This could be the assembly name. - statusCode
integer
: If the message logged relates to a HTTP status code, you can put the code in this property. This would probably only be relevant for errors, - title
string
: The textual title or headline of the message to log. - titleTemplate
string
: The title template of the message to log. This property can be used from logging frameworks that supports - type
string
: The type of message. If logging an error, the type of the exception would go into type but you can put anything in there, that makes sense for your domain. - url
string
: If message relates to a HTTP request, you may send the URL of that request. If you don't provide us with an URL, we will try to find a key named URL in serverVariables. - user
string
: An identification of the user triggering this message. You can put the users email address or your user key into this property. - version
string
: Versions can be used to distinguish messages from different versions of your software. The value of version can be a SemVer compliant string or any other
- application
- CreateMessageResult
object
- location
string
: The location of the created message.
- location
- Deployment
object
- created
string
: When was this deployment created. - createdBy
string
: The elmah.io id of the user creating this deployment. Since deployments are created on a subscription, - description
string
: Sescription of this deployment in markdown or clear text. - id
string
: The ID of this deployment. - logId
string
: If the deployment is attached a single log, this property is set to the ID of that log. - userEmail
string
: The email of the person responsible for creating this deployment. - userName
string
: The name of the person responsible for creating this deployment. - version
string
: The version number of this deployment. The value of version can be a SemVer compliant string or any other
- created
- Item
object
: Represents a key value pair.- key
string
: The key of the item. - value
string
: The value of the item.
- key
- Log
object
- color
string
: Color of the log. The color will always be one of the following (green being the default): - environmentName
string
: Environment name this log is in or "Other" if not in an environment. - id
string
: ID of the log. - name
string
: Name of the log.
- color
- Message
object
- application
string
: Used to identify which application logged this message. You can use this if you have multiple applications and services logging to the same log - cookies
array
: A key/value pair of cookies. This property only makes sense for logging messages related to web requests.- items Item
- data
array
: A key/value pair of user-defined fields and their values. When logging an exception, the Data dictionary of- items Item
- dateTime
string
: The date and time in UTC of the message. If you don't provide us with a value in dateTime, we will set the current date and time in UTC. - detail
string
: A longer description of the message. For errors this could be a stacktrace, but it's really up to you what to log in there. - form
array
: A key/value pair of form fields and their values. This property makes sense if logging message related to users inputting data in a form.- items Item
- hostname
string
: The hostname of the server logging the message. - id
string
: The ID of this message. - method
string
: If message relates to a HTTP request, you may send the HTTP method of that request. If you don't provide us with a method, we will try to find a key named REQUEST_METHOD in serverVariables. - queryString
array
: A key/value pair of query string parameters. This property makes sense if logging message related to a HTTP request.- items Item
- serverVariables
array
: A key/value pair of server values. Server variables are typically related to handling requests in a webserver but could be used for other types of information as well.- items Item
- severity
string
: An enum value representing the severity of this message. The following values are allowed: Verbose, Debug, Information, Warning, Error, Fatal - source
string
: The source of the code logging the message. This could be the assembly name. - statusCode
integer
: If the message logged relates to a HTTP status code, you can put the code in this property. This would probably only be relevant for errors, - title
string
: The textual title or headline of the message to log. - titleTemplate
string
: The title template of the message to log. This property can be used from logging frameworks that supports - type
string
: The type of message. If logging an error, the type of the exception would go into type but you can put anything in there, that makes sense for your domain. - url
string
: If message relates to a HTTP request, you may send the URL of that request. If you don't provide us with an URL, we will try to find a key named URL in serverVariables. - user
string
: An identification of the user triggering this message. You can put the users email address or your user key into this property. - version
string
: Versions can be used to distinguish messages from different versions of your software. The value of version can be a SemVer compliant string or any other
- application
- MessageOverview
object
- application
string
: Used to identify which application logged this message. You can use this if you have multiple applications and services logging to the same log - cookies
array
: A key/value pair of cookies. This property only makes sense for logging messages related to web requests.- items Item
- data
array
: A key/value pair of user-defined fields and their values. When logging an exception, the Data dictionary of- items Item
- dateTime
string
: The date and time in UTC of the message. If you don't provide us with a value in dateTime, we will set the current date and time in UTC. - detail
string
: A longer description of the message. For errors this could be a stacktrace, but it's really up to you what to log in there. - form
array
: A key/value pair of form fields and their values. This property makes sense if logging message related to users inputting data in a form.- items Item
- hostname
string
: The hostname of the server logging the message. - id
string
: The ID of this message. - method
string
: If message relates to a HTTP request, you may send the HTTP method of that request. If you don't provide us with a method, we will try to find a key named REQUEST_METHOD in serverVariables. - queryString
array
: A key/value pair of query string parameters. This property makes sense if logging message related to a HTTP request.- items Item
- serverVariables
array
: A key/value pair of server values. Server variables are typically related to handling requests in a webserver but could be used for other types of information as well.- items Item
- severity
string
: An enum value representing the severity of this message. The following values are allowed: Verbose, Debug, Information, Warning, Error, Fatal - source
string
: The source of the code logging the message. This could be the assembly name. - statusCode
integer
: If the message logged relates to a HTTP status code, you can put the code in this property. This would probably only be relevant for errors, - title
string
: The textual title or headline of the message to log. - titleTemplate
string
: The title template of the message to log. This property can be used from logging frameworks that supports - type
string
: The type of message. If logging an error, the type of the exception would go into type but you can put anything in there, that makes sense for your domain. - url
string
: If message relates to a HTTP request, you may send the URL of that request. If you don't provide us with an URL, we will try to find a key named URL in serverVariables. - user
string
: An identification of the user triggering this message. You can put the users email address or your user key into this property. - version
string
: Versions can be used to distinguish messages from different versions of your software. The value of version can be a SemVer compliant string or any other
- application
- MessagesResult
object
- messages
array
: Log messages.- items MessageOverview
- total
integer
: The total number of log messages found.
- messages
- Search
object
- from
string
: Search from this date. - query
string
: Lucene query. - to
string
: Search to this date.
- from
- UptimeCheck
object
- id
string
: ID of the uptime check. - name
string
: Name of the uptime check. - status
string
: Current status of the uptime check. - url
string
: Url of the uptime check.
- id