Kantata Kantata OX Knowledge Base
Release Notes
Status Page

Posts

A Post represents a message written by participants in a project that appears in the project. Replies are only included if they are directly related to a post. Replies to events, such as Change Orders or Story Created Events, are not included.

Fetching a list of Posts

This endpoint returns structured Post objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the posts top-level JSON key. Please see our Response Format section for more information.

Request
query Parameters
created_after
string <date-time>

Filter for records created after a specified datetime. The datetime must be in ISO 8601 format.

created_before
string <date-time>

Filter for records created before a specified datetime. The datetime must be in ISO 8601 format.

external_reference_external_message
string

Filter the objects based on the external message of their associated external references. This is an exact match.

external_reference_external_status
string

Filter by the status of the external object in the external system.

external_reference_service_model
string

Filter by the type of the external object this external reference belongs to.

external_reference_service_model_ref
integer <int32>

Filter by the id of the external object this external reference belongs to.

external_reference_service_model_refs
string

Filter for objects that correlate to the specified external object IDs. Provide a comma-separated list of up to 200 external IDs.

external_reference_service_name
string

Filter by the name of the provider for integration.

external_reference_status
string

Filter by the status of the integration, this can be successful or fail.

from_archived_workspaces
boolean
Default: false

Also includes posts from archived projects.

has_external_references
boolean

Filter by whether or not the object has external references.

include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • attachments (Attachments::PostAttachment) - Any attachments associated to the post.
  • external_references (ExternalReference) - Includes references to external integrations for this object.
  • google_documents (GoogleDocument) - The post's Google document objects, available in google_document_ids; returned in the google_documents top-level key.
  • newest_reply (Post) - The most recent reply to the post.
  • newest_reply_user (User) - The user who made the most recent reply to the post.
  • recipients (User) - On private posts, the recipient_ids array contains the IDs of recipients, returned in the users top-level key.
  • replies (Post) - Replies made to this post, returned in the posts top-level key. Posts will contain a reply_ids array.
  • story (Story) - The task (if any) to which the post is linked.
  • subject (polymorphic) - When you include this association, posts that are replies will have a subject_id key. This references their parent post in the posts top-level key.
  • user (User) - The user who created the post.
  • workspace (Workspace) - The project to which this post belongs.
only
string

Allows you to request one or more resources directly by ID. Multiple IDs can be supplied in a comma separated list, like GET /api/v1/workspaces.json?only=5,6,7.

order
string
Default: "newest_reply_at:desc"

Supply order with the name of a valid sort field for the endpoint and a direction.

Valid values: newest_reply_at:asc and newest_reply_at:desc.

page
integer <int32>
Default: 1
parents_only
boolean
Default: false

Results will only include parent posts (without including replies by themselves).

per_page
integer <int32> <= 200
Default: 20
private
boolean

Only includes posts that are private to the current user.

search
string
story_id
integer <int32>

Only includes posts from the specified task.

story_ids
string

Filter for posts linked to specific tasks. Provide a comma-separated list of task IDs.

updated_after
string <date-time>

Filter for records updated after a specified datetime. The datetime must be in ISO 8601 format.

updated_before
string <date-time>

Filter for records updated before a specified datetime. The datetime must be in ISO 8601 format.

without_external_reference_service_name
string

Exclude by the existence of an external reference with the specified service name.

workspace_id
integer <int32>

Only includes posts from the specified project.

Responses
200

A list of Posts have been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/posts
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "posts": {
    },
  • "external_references": {
    },
  • "users": {
    },
  • "workspaces": {
    },
  • "stories": {
    },
  • "attachments": {
    }
}

Creating a new Post

This endpoint returns structured Post objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the posts top-level JSON key. Please see our Response Format section for more information.

Request
query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • attachments (Attachments::PostAttachment) - Any attachments associated to the post.
  • external_references (ExternalReference) - Includes references to external integrations for this object.
  • google_documents (GoogleDocument) - The post's Google document objects, available in google_document_ids; returned in the google_documents top-level key.
  • newest_reply (Post) - The most recent reply to the post.
  • newest_reply_user (User) - The user who made the most recent reply to the post.
  • recipients (User) - On private posts, the recipient_ids array contains the IDs of recipients, returned in the users top-level key.
  • replies (Post) - Replies made to this post, returned in the posts top-level key. Posts will contain a reply_ids array.
  • story (Story) - The task (if any) to which the post is linked.
  • subject (polymorphic) - When you include this association, posts that are replies will have a subject_id key. This references their parent post in the posts top-level key.
  • user (User) - The user who created the post.
  • workspace (Workspace) - The project to which this post belongs.
Request Body schema: application/json
required
object
workspace_id
required
integer <int32>

The ID of the project in which the post will be created.

message
required
string

The content created in the new post.

subject_id
integer <int32>

The ID of the item to which the new post is replying (only required for replies).

subject_type
string

The type of item to which the new post is replying (only required for replies). Accepted values are Post..

story_id
integer <int32>

The ID of the task to which the new post should be linked.

recipient_ids
Array of integers <int32>

An array of User IDs for which the post is visible. These users must be participating in the target project. Including this parameter will make the post private.

attachment_ids
Array of integers <int32>

An array of PostAttachment IDs to be associated with the post. Create PostAttachments using the attachments endpoint.

Array of objects

An array of Google document to be associated with the post.

backdated_to
string <date-time>

Backdates the post creation date on imports. Defaults to Now. The datetime must be in ISO 8601 format.

Responses
200

Post has been created.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

post/posts
Request samples
application/json
{
  • "post": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "posts": {
    },
  • "external_references": {
    },
  • "users": {
    },
  • "workspaces": {
    },
  • "stories": {
    },
  • "attachments": {
    }
}

Fetching a single Post

By default, you won't receive Posts from archived workspaces (and will receive a 404 status on the "show" route) unless you provide the from_archived_workspaces:true filter.

This endpoint returns structured Post objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the posts top-level JSON key. Please see our Response Format section for more information.

Request
path Parameters
id
required
integer

The ID of the Model.

query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • attachments (Attachments::PostAttachment) - Any attachments associated to the post.
  • external_references (ExternalReference) - Includes references to external integrations for this object.
  • google_documents (GoogleDocument) - The post's Google document objects, available in google_document_ids; returned in the google_documents top-level key.
  • newest_reply (Post) - The most recent reply to the post.
  • newest_reply_user (User) - The user who made the most recent reply to the post.
  • recipients (User) - On private posts, the recipient_ids array contains the IDs of recipients, returned in the users top-level key.
  • replies (Post) - Replies made to this post, returned in the posts top-level key. Posts will contain a reply_ids array.
  • story (Story) - The task (if any) to which the post is linked.
  • subject (polymorphic) - When you include this association, posts that are replies will have a subject_id key. This references their parent post in the posts top-level key.
  • user (User) - The user who created the post.
  • workspace (Workspace) - The project to which this post belongs.
Responses
200

The Post has been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/posts/{id}
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "posts": {
    },
  • "external_references": {
    },
  • "users": {
    },
  • "workspaces": {
    },
  • "stories": {
    },
  • "attachments": {
    }
}

Updating an existing Post

This endpoint returns structured Post objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the posts top-level JSON key. Please see our Response Format section for more information.

Request
path Parameters
id
required
integer

The ID of the Model.

query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • attachments (Attachments::PostAttachment) - Any attachments associated to the post.
  • external_references (ExternalReference) - Includes references to external integrations for this object.
  • google_documents (GoogleDocument) - The post's Google document objects, available in google_document_ids; returned in the google_documents top-level key.
  • newest_reply (Post) - The most recent reply to the post.
  • newest_reply_user (User) - The user who made the most recent reply to the post.
  • recipients (User) - On private posts, the recipient_ids array contains the IDs of recipients, returned in the users top-level key.
  • replies (Post) - Replies made to this post, returned in the posts top-level key. Posts will contain a reply_ids array.
  • story (Story) - The task (if any) to which the post is linked.
  • subject (polymorphic) - When you include this association, posts that are replies will have a subject_id key. This references their parent post in the posts top-level key.
  • user (User) - The user who created the post.
  • workspace (Workspace) - The project to which this post belongs.
Request Body schema: application/json
required
object
message
string

The message content of the post.

story_id
integer <int32>

The ID of the task that is linked to the post.

Responses
200

Post has been updated.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

put/posts/{id}
Request samples
application/json
{
  • "post": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "posts": {
    },
  • "external_references": {
    },
  • "users": {
    },
  • "workspaces": {
    },
  • "stories": {
    },
  • "attachments": {
    }
}

Deleting an existing Post

The response will contain no content and an HTTP 204 status code if the request was successful, or a standard Kantata OX error message explaining why the object could not be deleted.

Request
path Parameters
id
required
integer

The ID of the Model.

Responses
204

Post has been deleted.

400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

delete/posts/{id}
Request samples
Response samples
application/json
{
  • "errors": [
    ]
}