Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

API 1.x endpoint calls need to be updated to 2.0  #4461

@ericholguin

Description

@ericholguin

I'm submitting a ...

  • bug report
  • new feature / enhancement request
  • improvement request (usability, performance, tech debt, etc.)
  • other

Traffic Control components affected ...

  • CDN in a Box
  • Documentation
  • Grove
  • Traffic Control Client
  • Traffic Monitor
  • Traffic Ops
  • Traffic Ops ORT
  • Traffic Portal
  • Traffic Router
  • Traffic Stats
  • Traffic Vault
  • unknown

Current behavior:

The following code needs to be updated to use 2.0:

if r.Method == "POST" && r.URL.Path == "/api/1.2/user/login" {

url := fmt.Sprintf("https://%v/api/1.2/user/login", r.URL.Query().Get("opsHost"))

local url=$TO_URL/api/1.2/user/login

to-get api/1.2/dbdump >"$dumpfile"

cdns=$(to-get api/1.3/cdns | jq -Sr '.response|.[]|.name' | grep -v ALL)

my $login_url = "$b_url/api/1.2/user/login";

r, e := http.NewRequest(http.MethodGet, "https://example.test/api/1.4/deliveryservice_stats", nil)

w.Header().Set(http.CanonicalHeaderKey("location"), inf.Config.URL.Scheme+"://"+r.Host+"/api/1.4/jobs?id="+strconv.FormatUint(uint64(*result.ID), 10))

w.Header().Set(http.CanonicalHeaderKey("location"), inf.Config.URL.Scheme+"://"+r.Host+"/api/1.4/jobs?id="+strconv.FormatUint(uint64(*result.ID), 10))

Expected / new behavior:

Minimal reproduction of the problem with instructions:

Anything else:

Metadata

Metadata

Assignees

Labels

cdn-in-a-boxrelated to the Docker-based CDN-in-a-Box systemgood first issuefirst-time committers will find this easy to resolvehacktoberfesttech debtrework due to choosing easy/limited solution

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions