Chilkat Online Tools

Unicode C++ / Datadog API Collection / Get links for a team

Back to Collection Items

void ChilkatSample(void)
    {
    success = http.QuickGetSb(L"https://api.app.ddog-gov.com/api/v2/team/:team_id/links",sbResponseBody);    jResp.LoadSb(sbResponseBody);    jResp.put_EmitCompact(false);    jResp.put_I(i);    Label = jResp.stringOf(L"data[i].attributes.label");    v_Url = jResp.stringOf(L"data[i].attributes.url");    Position = jResp.stringOf(L"data[i].attributes.position");    Team_id = jResp.stringOf(L"data[i].attributes.team_id");    id = jResp.stringOf(L"data[i].id");    v_type = jResp.stringOf(L"data[i].type");    i = i + 1;
    }

Curl Command

curl -X GET
	-H "Accept: application/json"
https://api.app.ddog-gov.com/api/v2/team/:team_id/links

Postman Collection Item JSON

{
  "name": "Get links for a team",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/api/v2/team/:team_id/links",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v2",
        "team",
        ":team_id",
        "links"
      ],
      "variable": [
        {
          "key": "team_id",
          "value": "<string>"
        }
      ]
    },
    "description": "Get all links for a given team."
  },
  "response": [
    {
      "name": "OK",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v2/team/:team_id/links",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "team",
            ":team_id",
            "links"
          ],
          "variable": [
            {
              "key": "team_id"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"data\": [\n    {\n      \"attributes\": {\n        \"label\": \"<string>\",\n        \"url\": \"<string>\",\n        \"position\": \"<integer>\",\n        \"team_id\": \"<string>\"\n      },\n      \"id\": \"<string>\",\n      \"type\": \"team_links\"\n    },\n    {\n      \"attributes\": {\n        \"label\": \"<string>\",\n        \"url\": \"<string>\",\n        \"position\": \"<integer>\",\n        \"team_id\": \"<string>\"\n      },\n      \"id\": \"<string>\",\n      \"type\": \"team_links\"\n    }\n  ]\n}"
    },
    {
      "name": "API error response.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v2/team/:team_id/links",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "team",
            ":team_id",
            "links"
          ],
          "variable": [
            {
              "key": "team_id"
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    },
    {
      "name": "Too many requests",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v2/team/:team_id/links",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "team",
            ":team_id",
            "links"
          ],
          "variable": [
            {
              "key": "team_id"
            }
          ]
        }
      },
      "status": "Too Many Requests",
      "code": 429,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    }
  ]
}