Create a dependency
Create one dependency, or several at once by sending an array.
curl --request POST \
--url https://{instance}/api/v2/deliverable/dependencies \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"rootParentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fromId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "fs",
"lagTimeSec": 0,
"isArchived": false,
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rootParentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
fromId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
toId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
type: 'fs',
lagTimeSec: 0,
isArchived: false,
archivedAt: '2023-11-07T05:31:56Z',
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://{instance}/api/v2/deliverable/dependencies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/deliverable/dependencies"
payload = {
"rootParentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fromId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "fs",
"lagTimeSec": 0,
"isArchived": False,
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"value": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "fs",
"rootParentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fromId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lagTimeSec": 0,
"isArchived": false,
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}Authorizations
Organization-scoped API key. Create one in the BuildingSwell app under Organization settings, API keys.
Body
- object
- object[]
Root of the tree both nodes belong to.
Node the link runs from, the predecessor.
Node the link runs to, the successor.
Unique id. Generated on create unless you supply one.
Link type: fs finish-to-start, ff finish-to-finish, sf start-to-finish, ss start-to-start.
fs, ff, sf, ss Lag between the two nodes, in seconds. Negative values lead.
Archived links no longer affect scheduling.
When the link was archived.
When the record was created.
When the record last changed.
Response
The created dependency. An array request returns values instead of value.
- Option 1
- Option 2
A scheduling link between two deliverables in the same tree. Creating or changing one re-rolls the downstream node's dates.
Show child attributes
Show child attributes
curl --request POST \
--url https://{instance}/api/v2/deliverable/dependencies \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"rootParentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fromId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "fs",
"lagTimeSec": 0,
"isArchived": false,
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rootParentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
fromId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
toId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
type: 'fs',
lagTimeSec: 0,
isArchived: false,
archivedAt: '2023-11-07T05:31:56Z',
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://{instance}/api/v2/deliverable/dependencies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/deliverable/dependencies"
payload = {
"rootParentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fromId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "fs",
"lagTimeSec": 0,
"isArchived": False,
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"value": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "fs",
"rootParentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fromId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lagTimeSec": 0,
"isArchived": false,
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}