Add a log to an action run
POST/v1/actions/runs/:run_id/logs
This route allows you to send a log message back to Port, which will be displayed in the action run's page. You can also use this route to update the run's termination status (SUCCESS/FAILURE) and label describing the status.
To learn more about action runs, check out the documentation.
Request
Parameters (JSON)
{
"parameters": [
{
"schema": {
"type": "string"
},
"in": "path",
"name": "run_id",
"required": true,
"description": "The identifier of the action run."
}
]
}Request body schema (JSON)
{
"title": "Body",
"body": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"terminationStatus": {
"type": "string",
"enum": [
"SUCCESS",
"FAILURE"
],
"description": "The termination status of the action run. Can be left blank if you only want to send a log message."
},
"statusLabel": {
"type": "string",
"description": "A label to describe the status of the action run. Can be left blank if you only want to send a log message."
},
"message": {
"type": "string",
"description": "The log message to send back to Port."
}
},
"additionalProperties": false,
"required": [
"message"
]
}
}
},
"required": true
}
}Responses
- 201
- 401
- 404
- 413
- 422
OK
Default Response
A resource with the provided identifier was not found
Request body is too large (limit is 1MiB)
The json provided does not match the route's schema
Responses (JSON)
{
"responses": {
"201": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"enum": [
true
]
},
"runLog": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"runId": {
"type": "string"
},
"message": {
"type": "string"
},
"createdBy": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"runId",
"message",
"createdBy",
"createdAt"
]
}
},
"required": [
"ok"
],
"additionalProperties": false,
"description": "OK"
}
}
}
},
"401": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false
}
}
}
},
"404": {
"description": "A resource with the provided identifier was not found",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error",
"message"
],
"additionalProperties": false,
"description": "A resource with the provided identifier was not found"
}
}
}
},
"413": {
"description": "Request body is too large (limit is 1MiB)",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false,
"description": "Request body is too large (limit is 1MiB)"
}
}
}
},
"422": {
"description": "The json provided does not match the route's schema",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error",
"message"
],
"additionalProperties": false,
"description": "The json provided does not match the route's schema"
}
}
}
}
}
}