Skip to main content

Version: 24.10

POST Comment Job

The job comment operation will add a comment against the job specified in the query.

Request

HTTP request

POST https://<JM_SERVER>/workspaces/secure/api/v1/job/comment

Request body

The POST request must contain a JSON structure describing the job comment. To support multiple parameters this API uses HTTP Content Type: application/json.

The set of query JSON attributes is listed below. All attributes are optional except where otherwise indicated. Any additional attributes are ignored or return a 400 Bad Request HTTP status code.

AttributeDescription
paramsMap
Required. A map containing comment attributes.

Supported comment attributes

The following comment attributes are supported for the Job API. Any additional attributes are ignored or return a 400 Bad Request HTTP status code.

Comment attributeDescription
headerString
The comment's header/title.
jobKeyString
Required. The job key property of the job to add a comment to.
messageString
Required. The comment's message/body. This must not be empty.
parentString
The parent comment oid, if this comment is a reply to another comment.

Response

If successful (that is, the comment was added and no errors occurred during API execution), this operation returns a response with a HTTP 200 OK status code.

Error messages

Error keyErrorHTTP status code
internalErrorPlease see Error Log ID {number}500 Internal Server Error
jobKeyNotSpecifiedjobKey not specified400 Bad Request
jobNotFoundThe transaction specified by the jobKey was not found400 Bad Request
messageNotSpecifiedThe comment message is not specified400 Bad Request
parentNotExistThe parent comment specified does not exist400 Bad Request
unableToResolvePortalUnable to resolve portal from request400 Bad Request

Error responses

HTTP status codeDescription
400 Bad RequestBad request or request parameter. Check error message for details.
404 Not FoundEnsure the URL endpoint is entered correctly.
500 Internal Server ErrorException occurred in job comment. Contact administrator.

Example

Ensure you specify Content-Type: application/json in the request.

Example request
POST /workspaces/secure/api/v1/job/comment HTTP/1.1
Host: https://transact.workspaces.com
Content-Type: application/json
{
"params": {
"jobKey": "15d071280b92c867f86975b9cd2e8765",
"header": "Adding comments to jobs",
"message": "this is an example to a comment",
"parent": "1"
}
}