> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs-unsw-v6.advance-uac.com/unsw-advance-institution-api/catalogue/remove-a-specialisation-from-a-curriculum-container/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-unsw-v6.advance-uac.com/_mcp/server. # Remove a specialisation from a curriculum container DELETE https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures/{structureId}/specialisations/{code}/{year} Removes the specialisation from this container. The specialisation itself stays in the institution's specialisation catalogue. Only its membership of this container is removed. The `itemType` is not part of the path: a code identifies one specialisation, so it is matched on code and year whichever kind it was added as. 404 if the container is unknown or the specialisation isn't in it. Optionally assert the owner with `programCode` and `programYear`, or `specialisationCode` and `specialisationYear`. Supply one pair, not both. Reference: https://docs-unsw-v6.advance-uac.com/unsw-advance-institution-api/catalogue/remove-a-specialisation-from-a-curriculum-container ## Authentication - `Authorization` header (bearer token, required) — Paste a Keycloak access token (no "Bearer " prefix) ## Servers - `https://unsw-v6-dev.advance-uac.com/institution-api` (Dev, default) - `https://unsw-v6-test.advance-uac.com/institution-api` (Test) ## Request ### Path parameters - `code` (string, required) - `structureId` (string, required) - `year` (integer, required) ### Query parameters - `programCode` (string, optional) - `programYear` (integer, optional) - `specialisationCode` (string, optional) - `specialisationYear` (integer, optional) ## Response ### 204 The specialisation was removed from the container. ## Errors ### 400 Bad Request Error The request was rejected. See `error` for which field and why. - `status` (integer, optional) — Repeats the HTTP status code. - `error` (string, optional) — What went wrong, in a form safe to show a developer. ### 404 Not Found Error No such container, or the specialisation is not in it. - `status` (integer, optional) — Repeats the HTTP status code. - `error` (string, optional) — What went wrong, in a form safe to show a developer. ## Examples **SDK Code** ```python import requests url = "https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures/structureId/specialisations/code/1" headers = {"Authorization": "Bearer "} response = requests.delete(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures/structureId/specialisations/code/1'; const options = {method: 'DELETE', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures/structureId/specialisations/code/1" req, _ := http.NewRequest("DELETE", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures/structureId/specialisations/code/1") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Delete.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.delete("https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures/structureId/specialisations/code/1") .header("Authorization", "Bearer ") .asString(); ``` ```php request('DELETE', 'https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures/structureId/specialisations/code/1', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures/structureId/specialisations/code/1"); var request = new RestRequest(Method.DELETE); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/structures/structureId/specialisations/code/1")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "DELETE" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```