​

Add planned relation

POST
https://example.kaiten.ru/api/latest/cards/{card_id}/planned-relation

Creates a relation from the card card_id (predecessor) to the card target_card_id (successor). Both cards must have planned_start and planned_end, and the user must be able to edit both cards. Card dates do not change when the relation is created. The new relation has no gap: gap and gap_type sent in this request are ignored. To set a gap or change the type, use Update planned relation.

Path parameters
NameTypeReference
card_idrequiredintegerPredecessor card ID
Headers
NameValue
Content-Typeapplication/json
Attributes
schema
NameTypeConstraintsDescription
target_card_id
required
integer

Successor card ID

type
required
enum
[
  end-start,
  start-start,
  end-end,
  start-end
]

Which dates are linked, predecessor's date first: end-start: the successor starts when the predecessor ends (finish-to-start) start-start: the successor starts when the predecessor starts (start-to-start) end-end: the successor ends when the predecessor ends (finish-to-finish) start-end: the successor ends when the predecessor starts (start-to-finish)

Responses

200
DescriptionResponse typeExample
SuccessObject
Open
Response Attributes
NameTypeDescription
created

string

Create date
updated

string

Last update timestamp
source_id

integer

Predecessor card ID
target_id

integer

Successor card ID
type

string

Relation type: end-start, start-start, end-end or start-end
author_id

integer

ID of the user who created the relation
gap

null

Gap, always null for a new relation
gap_type

null

Gap unit, always null for a new relation
400
DescriptionResponse typeExample
Validation error (target_card_id or type is missing, unknown type); one of the cards has no planned_start or planned_end; the cards are already linked in this direction ("relation already exists"); or the relation would create a loop, including a relation back to an already linked card and a relation of a card to itself ("impermissible target_id - circular dependency detected")Object
Open
Response Attributes
NameTypeDescription
message

string

Error message
401
DescriptionResponse typeExample
Invalid tokenString
Open
402
DescriptionResponse typeExample
The tariff does not include the gantt and resource planning featureObject
Open
Response Attributes
NameTypeDescription
message

string

Error message
featurePath

string

Missing tariff feature
403
DescriptionResponse typeExample
The user cannot edit one of the cards, or one of the cards does not existResponse body does not exist
logo
Kaiten
If you have any questions or need help with integration feel free to write us at support@kaiten.ru

Path Parameters

  1  curl --request POST \
  2       --url 'https://example.kaiten.ru/api/latest/cards/{card_id}/planned-relation' \
  3       --header 'Accept: application/json' \
  4       --header 'Content-Type: application/json'
  5      

Response

ClickTry It!to start a request and see the response here!