Articles in this section
Category / Section

Retrieving Field Dependency Data via Developer API

2 mins read
Updated:

You can retrieve the “Field Dependency” data using our Developer API, which provides a flexible and efficient way to access field dependency records.

Use the following endpoint to fetch field dependency data

🔗 Get Field Dependency – Developer API link

Sample Code Snippets

C# Sample
using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program
{
   static async Task Main()
   {
       var apiKey = "{yourapikey}";
       var apiUrl = "https://{yourdomain}/api/v1/field_dependencies/1";

       using var client = new HttpClient();
       client.DefaultRequestHeaders.Add("x-api-key", apiKey);

       var response = await client.GetAsync(apiUrl);
       var content = await response.Content.ReadAsStringAsync();

       Console.WriteLine("Response: " + content);
   }
} 

Java Sample

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class ApiCall {
   public static void main(String[] args) {
       String apiKey = "{yourapikey}";
       String apiUrl = "https://{yourdomain}/api/v1/field_dependencies/1";

       try {
           URL url = new URL(apiUrl);
           HttpURLConnection con = (HttpURLConnection) url.openConnection();
           con.setRequestMethod("GET");
           con.setRequestProperty("x-api-key", apiKey);

           int status = con.getResponseCode();
           BufferedReader in = new BufferedReader(new InputStreamReader(
                   con.getInputStream()));
           String inputLine;
           StringBuilder content = new StringBuilder();
           while ((inputLine = in.readLine()) != null) {
               content.append(inputLine);
           }
           in.close();
           con.disconnect();

           System.out.println("Response: " + content.toString());
       } catch (Exception e) {
          e.printStackTrace();
       }
   }
} 

To authenticate your API requests, you’ll need to generate an API key. Please refer to this article for step-by-step instructions:
How to Generate a BoldDesk API Key

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied