Get Allocations By Project
curl --request GET \
--url https://planner.svc.v2.projectcor.com/allocation/getAllocations/{projectId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://planner.svc.v2.projectcor.com/allocation/getAllocations/{projectId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://planner.svc.v2.projectcor.com/allocation/getAllocations/{projectId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://planner.svc.v2.projectcor.com/allocation/getAllocations/{projectId}';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://planner.svc.v2.projectcor.com/allocation/getAllocations/{projectId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://planner.svc.v2.projectcor.com/allocation/getAllocations/{projectId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"users": [
{
"userId": 1234,
"firstName": "John",
"lastName": "Doe",
"positionName": "Developer",
"categoryName": "Engineering",
"categoryId": "10",
"picture": "",
"userPositionId": "5",
"companyId": 41195,
"hidden": false,
"isDeleted": false,
"labelsByCategory": [],
"createdAt": "2024-01-15T10:00:00",
"allocations": [
{
"primaryKey": "00000001",
"from": "2024-06-01T00:00:00",
"to": "2024-08-31T00:00:00",
"allocatedHours": 20,
"capacity": 160,
"availabilityLeft": 140,
"createdAt": "2024-05-20T14:30:00",
"allocationUserAnotherProjects": [
{
"projectId": 5678,
"projectName": "Project Alpha",
"clientName": "Client ABC",
"allocatedHours": 15
},
{
"projectId": 5679,
"projectName": "Project Beta",
"clientName": "Client XYZ",
"allocatedHours": 5
}
]
}
],
"totalAllocatedHours": 20
}
]
}Allocations
Get Allocations By Project
Gets information about user allocations for a given project. Returns all users allocated to the project along with their allocation details and allocations in other projects.
GET
/
allocation
/
getAllocations
/
{projectId}
Get Allocations By Project
curl --request GET \
--url https://planner.svc.v2.projectcor.com/allocation/getAllocations/{projectId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://planner.svc.v2.projectcor.com/allocation/getAllocations/{projectId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://planner.svc.v2.projectcor.com/allocation/getAllocations/{projectId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://planner.svc.v2.projectcor.com/allocation/getAllocations/{projectId}';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://planner.svc.v2.projectcor.com/allocation/getAllocations/{projectId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://planner.svc.v2.projectcor.com/allocation/getAllocations/{projectId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"users": [
{
"userId": 1234,
"firstName": "John",
"lastName": "Doe",
"positionName": "Developer",
"categoryName": "Engineering",
"categoryId": "10",
"picture": "",
"userPositionId": "5",
"companyId": 41195,
"hidden": false,
"isDeleted": false,
"labelsByCategory": [],
"createdAt": "2024-01-15T10:00:00",
"allocations": [
{
"primaryKey": "00000001",
"from": "2024-06-01T00:00:00",
"to": "2024-08-31T00:00:00",
"allocatedHours": 20,
"capacity": 160,
"availabilityLeft": 140,
"createdAt": "2024-05-20T14:30:00",
"allocationUserAnotherProjects": [
{
"projectId": 5678,
"projectName": "Project Alpha",
"clientName": "Client ABC",
"allocatedHours": 15
},
{
"projectId": 5679,
"projectName": "Project Beta",
"clientName": "Client XYZ",
"allocatedHours": 5
}
]
}
],
"totalAllocatedHours": 20
}
]
}Authorizations
Uses the same authentication as the main COR API. Obtain a token from https://api.projectcor.com/v1/oauth/token
Path Parameters
Project ID to get allocations for
Response
200 - application/json
List of user allocations for the project
List of users allocated to the project
Show child attributes
Show child attributes
Was this page helpful?
⌘I

