page title decoration image

Returns the active links of a client

GET /api/v2/clients/{client_id}/links

Code samples

# You can also use wget
curl -X GET /api/v2/clients/{client_id}/links \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
GET /api/v2/clients/{client_id}/links HTTP/1.1

Accept: application/json

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/api/v2/clients/{client_id}/links',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/api/v2/clients/{client_id}/links',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/api/v2/clients/{client_id}/links', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/api/v2/clients/{client_id}/links', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("/api/v2/clients/{client_id}/links");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/api/v2/clients/{client_id}/links", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /api/v2/clients/{client_id}/links

Returns a list of links that the user has access to - optionally filtered by a permission.

NameInTypeRequiredDescription
client_idpathintegertrueClient ID

Example responses

200 Response

{
  "status": "success",
  "code": 200,
  "message": "Links retrieved successfully",
  "details": [
    {
      "startTaskUuid": "550e8400-e29b-41d4-a716-446655440001",
      "finishTaskUuid": "550e8400-e29b-41d4-a716-446655440002",
      "startDateTime": 1700000000,
      "finishDateTime": 1700860000,
      "typeLink": 0,
      "typeDelay": 0,
      "delayTime": 3,
      "delayRelative": false,
      "rgbColor": 16711680,
      "bold": true,
      "confirmed": false
    }
  ]
}

401 Response

{
  "status": "error",
  "code": 401,
  "message": "Authentication failed",
  "details": "JWT token not found"
}

403 Response

{
  "status": "error",
  "code": 403,
  "message": "Access denied",
  "details": "Insufficient permissions"
}

500 Response

{
  "status": "error",
  "code": 500,
  "message": "Internal server error",
  "details": "An internal server error occurred"
}
StatusMeaningDescriptionSchema
200OKLink listInline
401UnauthorizedAuthentication error (JWT token missing/invalid)ErrorResponse
403ForbiddenAccess denied (insufficient permissions)ErrorResponse
500Internal Server ErrorInternal server errorErrorResponse

Status Code 200

NameTypeRequiredRestrictionsDescription
» statusstringfalsenonenone
» codeintegerfalsenonenone
» messagestringfalsenonenone
» details[LinkItem]falsenonenone
»» startTaskUuidstring(uuid)truenoneStart task UUID
»» finishTaskUuidstring(uuid)truenoneFinish task UUID
»» startDateTimeintegertruenoneLink start time (timestamp)
»» finishDateTimeintegertruenoneLink finish time (timestamp)
»» typeLinkintegertruenoneLink type (e.g. Finish-Start, Start-Start)
»» typeDelayintegerfalsenoneDelay type (e.g. work days, calendar days)
»» delayTimeintegerfalsenoneDelay time in units according to typeDelay
»» delayRelativebooleanfalsenoneWhether the delay is relative
»» rgbColorintegerfalsenoneLink RGB color
»» boldbooleanfalsenoneWhether the link is displayed in bold
»» confirmedbooleanfalsenoneWhether the link is confirmed