Logs API

Overview of logs API methods

post
Create Log

https://api.codemash.io/:version/logs
Creates a custom log.
Request
Response
Request
Path Parameters
version
required
string
The version of the API endpoint. Current latest v1.
Headers
Authorization
required
string
User's bearer token.
x-cm-projectid
required
string
Your project's ID. Can be passed as a query parameter.
Body Parameters
message
required
string
The message of the log.
items
optional
object
Key-value pair (string: string) object of custom items.
level
optional
string
Severity level of a log. Possible values: Information, Warning, Error.
Response
200: OK
Returns an ID of inserted log.
{
result: "{LOG_ID}"
}
.NET
Node
.NET
var client = new CodeMashClient(apiKey, projectId);
var logsService = new CodeMashLogsService(client);
await logsService.CreateLogAsync(new CreateLogRequest
{
Message = "Custom log",
Level = "Information"
});
Node