Delete a structure set
DELETE /api/v1/structure-sets/{id}
https://app.tanba-ooh.kz/api/v1/structure-sets/{id}
Анықтамалықтың техникалық мәтіні ағылшын тілінде жазылған.
Scope write:submissions. Submissions already created are not affected.
Аутентификация
Authorization тақырыбындағы API кілті немесе консоль сеансы.
Рұқсат: write:submissions
Параметрлер
| Атауы | Орны | Түрі | Міндетті | Сипаттама | Мысал |
|---|---|---|---|---|---|
id | жол | string (uuid) | иә | Id of the set. | 5d3f3e0a-2a53-4b3c-8d0a-6f63b4d9a111 |
Жауаптар
204 The set is deleted.
Денесі жоқ.
Қателер
Қателер problem құжаты (application/problem+json) түрінде, тұрақты code өрісімен келеді.
| Мәртебесі | Мағынасы |
|---|---|
| 401 | No valid session or API key (unauthenticated, session_expired, invalid_api_key). |
| 403 | The role or the key's scope does not allow this (forbidden, key_scope_denied, key_route_denied). |
| 404 | Nothing there, or not visible to the caller. |
| default | An error as a problem document. |
Код мысалдары
curl
curl -X DELETE 'https://app.tanba-ooh.kz/api/v1/structure-sets/5d3f3e0a-2a53-4b3c-8d0a-6f63b4d9a111' \
-H 'Authorization: Bearer YOUR_API_KEY'
Python
import requests
response = requests.delete(
"https://app.tanba-ooh.kz/api/v1/structure-sets/5d3f3e0a-2a53-4b3c-8d0a-6f63b4d9a111",
headers={
"Authorization": "Bearer YOUR_API_KEY",
},
)
print(response.status_code, response.text)
Go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("DELETE", "https://app.tanba-ooh.kz/api/v1/structure-sets/5d3f3e0a-2a53-4b3c-8d0a-6f63b4d9a111", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(resp.Status, string(data))
}