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.
| Attribute | Description | 
|---|---|
params | MapRequired. 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 attribute | Description | 
|---|---|
header | StringThe comment's header/title.  | 
jobKey | StringRequired. The job key property of the job to add a comment to.  | 
message | StringRequired. The comment's message/body. This must not be empty.  | 
parent | StringThe 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 key | Error | HTTP status code | 
|---|---|---|
internalError | Please see Error Log ID {number} | 500 Internal Server Error | 
jobKeyNotSpecified | jobKey not specified | 400 Bad Request | 
jobNotFound | The transaction specified by the jobKey was not found | 400 Bad Request | 
messageNotSpecified | The comment message is not specified | 400 Bad Request | 
parentNotExist | The parent comment specified does not exist | 400 Bad Request | 
unableToResolvePortal | Unable to resolve portal from request | 400 Bad Request | 
Error responses
| HTTP status code | Description | 
|---|---|
400 Bad Request | Bad request or request parameter. Check error message for details. | 
404 Not Found | Ensure the URL endpoint is entered correctly. | 
500 Internal Server Error | Exception occurred in job comment. Contact administrator. | 
Example
Ensure you specify Content-Type: application/json in the 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"
    }
}