API V1 · Context Images
Delete context image
curl --request DELETE \ --url https://api.lingohub.com/v1/acme-corp/projects/my-project/contextImages/ID \ --header 'Authorization: Bearer YOUR_API_KEY'import requests
url = "https://api.lingohub.com/v1/acme-corp/projects/my-project/contextImages/ID"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.delete(url, headers=headers)
print(response.json())const url = 'https://api.lingohub.com/v1/acme-corp/projects/my-project/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/acme-corp/projects/my-project/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/acme-corp/projects/my-project/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/acme-corp/projects/my-project/contextImages/ID', [ 'headers' => [ 'Authorization' => 'Bearer YOUR_API_KEY', ],]);
echo $response->getBody();require 'uri'require 'net/http'
url = URI("https://api.lingohub.com/v1/acme-corp/projects/my-project/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/acme-corp/projects/my-project/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”The URL slug of the workspace. The project links that GET /v1/projects returns contain it: /v1/{workspaceUrl}/projects/{projectUrl}.
Example
acme-corpThe URL slug of the project within its workspace. The project links that GET /v1/projects returns contain it: /v1/{workspaceUrl}/projects/{projectUrl}.
Example
my-projectSpecific 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
Responses
Section titled “Responses”OK: The context image is deleted. The response has no body.
Bad Request: The id is not a context image id.
object
Example generated
{ "url": "example", "message": "example", "text": "example"}Unauthorized: Authentication credentials are missing or invalid.
object
object
object
object
object
Example
{ "error": { "status": "100 CONTINUE" }}Forbidden: The authenticated user does not have context image management permission on this project.
object
Example generated
{ "url": "example", "message": "example", "text": "example"}Not Found: The specified workspace, project or context image does not exist.
object
Example generated
{ "message": "example", "items": [ "example" ]}