Skip to content

On-premise users: click in-app to access the full platform documentation for your version of DataRobot.

Comments

This page outlines the operations, endpoints, parameters, and example requests and responses for the Comments.

POST /api/v2/comments/

Post a comment

Code samples

# You can also use wget
curl -X POST https://app.datarobot.com/api/v2/comments/ \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Body parameter

{
  "content": "string",
  "entityId": "string",
  "entityType": "useCase",
  "mentions": [
    "string"
  ]
}

Parameters

Name In Type Required Description
body body Comment false none

Example responses

200 Response

{
  "content": "string",
  "createdAt": "string",
  "createdBy": {
    "firstName": "string",
    "id": "string",
    "lastName": "string",
    "username": "string"
  },
  "entityId": "string",
  "entityType": "useCase",
  "id": "string",
  "mentions": [
    {
      "firstName": "string",
      "id": "string",
      "lastName": "string",
      "username": "string"
    }
  ],
  "updatedAt": "string"
}

Responses

Status Meaning Description Schema
200 OK none CommentRetrieve
201 Created The comment was successfully created None
422 Unprocessable Entity The request was formatted improperly None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

DELETE /api/v2/comments/{commentId}/

Delete a comment

Code samples

# You can also use wget
curl -X DELETE https://app.datarobot.com/api/v2/comments/{commentId}/ \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
commentId path string true The ID of the comment

Responses

Status Meaning Description Schema
200 OK none None
204 No Content The use case comment was deleted None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/comments/{commentId}/

Retrieve a comment

Code samples

# You can also use wget
curl -X GET https://app.datarobot.com/api/v2/comments/{commentId}/ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
commentId path string true The ID of the comment

Example responses

200 Response

{
  "content": "string",
  "createdAt": "string",
  "createdBy": {
    "firstName": "string",
    "id": "string",
    "lastName": "string",
    "username": "string"
  },
  "entityId": "string",
  "entityType": "useCase",
  "id": "string",
  "mentions": [
    {
      "firstName": "string",
      "id": "string",
      "lastName": "string",
      "username": "string"
    }
  ],
  "updatedAt": "string"
}

Responses

Status Meaning Description Schema
200 OK none CommentRetrieve

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

PATCH /api/v2/comments/{commentId}/

Update a comment

Code samples

# You can also use wget
curl -X PATCH https://app.datarobot.com/api/v2/comments/{commentId}/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {access-token}"

Body parameter

{
  "content": "string",
  "mentions": [
    "string"
  ]
}

Parameters

Name In Type Required Description
commentId path string true The ID of the comment
body body CommentUpdate false none

Responses

Status Meaning Description Schema
200 OK none None
204 No Content The comment was successfully updated None
422 Unprocessable Entity The request was formatted improperly None

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

GET /api/v2/comments/{entityType}/{entityId}/

List comments

Code samples

# You can also use wget
curl -X GET https://app.datarobot.com/api/v2/comments/{entityType}/{entityId}/ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Parameters

Name In Type Required Description
offset query integer false The number of records to skip over. Default 0.
limit query integer false The number of records to return in the range from 1 to 100. Default 100.
orderBy query string false Sort comments by a field of the comment.
entityId path string true ID of the entity to retrieve comments of
entityType path string true Type of the entity to retrieve a comments of, currently only useCase is supported

Enumerated Values

Parameter Value
orderBy [createdAt, -createdAt, updatedAt, -updatedAt]
entityType [useCase, model, catalog]

Example responses

200 Response

{
  "count": 0,
  "data": [
    {
      "content": "string",
      "createdAt": "string",
      "createdBy": {
        "firstName": "string",
        "id": "string",
        "lastName": "string",
        "username": "string"
      },
      "entityId": "string",
      "entityType": "useCase",
      "id": "string",
      "mentions": [
        {
          "firstName": "string",
          "id": "string",
          "lastName": "string",
          "username": "string"
        }
      ],
      "updatedAt": "string"
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "totalCount": 0
}

Responses

Status Meaning Description Schema
200 OK none CommentList

To perform this operation, you must be authenticated by means of one of the following methods:

BearerAuth

Schemas

Comment

{
  "content": "string",
  "entityId": "string",
  "entityType": "useCase",
  "mentions": [
    "string"
  ]
}

Properties

Name Type Required Restrictions Description
content string true maxLength: 10000
Content of the comment, 10000 symbols max
entityId string true ID of the entity to post the comment to
entityType string true Type of the entity to post the comment to, currently only useCase is supported
mentions [string] false maxItems: 100
A list of users IDs mentioned in the content

Enumerated Values

Property Value
entityType [useCase, model, catalog]

CommentList

{
  "count": 0,
  "data": [
    {
      "content": "string",
      "createdAt": "string",
      "createdBy": {
        "firstName": "string",
        "id": "string",
        "lastName": "string",
        "username": "string"
      },
      "entityId": "string",
      "entityType": "useCase",
      "id": "string",
      "mentions": [
        {
          "firstName": "string",
          "id": "string",
          "lastName": "string",
          "username": "string"
        }
      ],
      "updatedAt": "string"
    }
  ],
  "next": "http://example.com",
  "previous": "http://example.com",
  "totalCount": 0
}

Properties

Name Type Required Restrictions Description
count integer true Number of items returned on this page
data [CommentRetrieve] true A list of comments
next string(uri)¦null true URL pointing to the next page (if null, there is no next page)
previous string(uri)¦null true URL pointing to the previous page (if null, there is no previous page)
totalCount integer true Number of all available items

CommentRetrieve

{
  "content": "string",
  "createdAt": "string",
  "createdBy": {
    "firstName": "string",
    "id": "string",
    "lastName": "string",
    "username": "string"
  },
  "entityId": "string",
  "entityType": "useCase",
  "id": "string",
  "mentions": [
    {
      "firstName": "string",
      "id": "string",
      "lastName": "string",
      "username": "string"
    }
  ],
  "updatedAt": "string"
}

Properties

Name Type Required Restrictions Description
content string true Content of the comment
createdAt string true Timestamp when the comment was created
createdBy CommentUser true none
entityId string true ID of the entity the comment posted to
entityType string true Type of the entity to post the comment to, currently only useCase is supported
id string true ID of the comment
mentions [CommentUser] true A list of users objects (see below) mentioned in the content
updatedAt string true Timestamp when the comment was updated

Enumerated Values

Property Value
entityType [useCase, model, catalog]

CommentUpdate

{
  "content": "string",
  "mentions": [
    "string"
  ]
}

Properties

Name Type Required Restrictions Description
content string true maxLength: 10000
Updated content of the comment, 10000 symbols max
mentions [string] false maxItems: 100
A list of users IDs mentioned in the content

CommentUser

{
  "firstName": "string",
  "id": "string",
  "lastName": "string",
  "username": "string"
}

Properties

Name Type Required Restrictions Description
firstName string true First name of the commenter
id string true User ID of the commenter
lastName string true Last name of the commenter
username string true Username of the commenter

Updated October 31, 2024