API V1 · Context Images
Delete context image
DELETE
/v1/{workspaceUrl}/projects/{projectUrl}/contextImages/{id}
curl --request DELETE \ --url https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/contextImages/ID \ --header 'Authorization: Bearer YOUR_API_KEY'import requests
url = "https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/contextImages/ID"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.delete(url, headers=headers)
print(response.json())const url = 'https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/contextImages/ID';const options = {method: 'DELETE', headers: {Authorization: 'Bearer YOUR_API_KEY'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/contextImages/ID"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer YOUR_API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/contextImages/ID") .delete(null) .addHeader("Authorization", "Bearer YOUR_API_KEY") .build();
Response response = client.newCall(request).execute();<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('DELETE', 'https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/contextImages/ID', [ 'headers' => [ 'Authorization' => 'Bearer YOUR_API_KEY', ],]);
echo $response->getBody();require 'uri'require 'net/http'
url = URI("https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/contextImages/ID")
http = Net::HTTP.new(url.host, url.port)http.use_ssl = true
request = Net::HTTP::Delete.new(url)request["Authorization"] = 'Bearer YOUR_API_KEY'
response = http.request(request)puts response.read_bodyusing System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Delete, RequestUri = new Uri("https://api.lingohub.com/v1/WORKSPACE_URL/projects/PROJECT_URL/contextImages/ID"), Headers = { { "Authorization", "Bearer YOUR_API_KEY" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}Delete the specified context image
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”workspaceUrl
required
string
WorkspaceUrl
projectUrl
required
string
ProjectUrl
id
required
Specific Id that is created from the id and the ‘type’ of the corresponding resource. When used in requests, its value is the prefix of the FriendlyIdType followed by the encrypted id of the resource. I.e : For context_images, a valid request param value would be : ci_18USq6822XIv-19847171
string
Responses
Section titled “Responses”OK: Delete the context image corresponding to the specified id