This repository was archived by the owner on Nov 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 355
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
Copy link
Copy link
Closed
Labels
cdn-in-a-boxrelated to the Docker-based CDN-in-a-Box systemrelated to the Docker-based CDN-in-a-Box systemgood first issuefirst-time committers will find this easy to resolvefirst-time committers will find this easy to resolvehacktoberfesttech debtrework due to choosing easy/limited solutionrework due to choosing easy/limited solution
Milestone
Description
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) |
trafficcontrol/traffic_ops/traffic_ops_golang/invalidationjobs/invalidationjobs.go
Line 365 in 4b3d01d
| w.Header().Set(http.CanonicalHeaderKey("location"), inf.Config.URL.Scheme+"://"+r.Host+"/api/1.4/jobs?id="+strconv.FormatUint(uint64(*result.ID), 10)) |
trafficcontrol/traffic_ops/traffic_ops_golang/invalidationjobs/userinvalidationjobs.go
Line 137 in 4b3d01d
| 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:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
cdn-in-a-boxrelated to the Docker-based CDN-in-a-Box systemrelated to the Docker-based CDN-in-a-Box systemgood first issuefirst-time committers will find this easy to resolvefirst-time committers will find this easy to resolvehacktoberfesttech debtrework due to choosing easy/limited solutionrework due to choosing easy/limited solution