8 rute, cu exemplu de cerere pentru fiecare.
Adresa de bază: https://app.ilustromania.com/nucleu. Autentificarea, formatul și erorile sunt în Prezentarea API-ului.
Modulul automatizari
GET/v1/automatizari
Automatizările firmei
Registrul automatizărilor cu fluxurile, orele, starea ultimei rulări și alegerile firmei (administrator).
curl https://app.ilustromania.com/nucleu/v1/automatizari \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE"const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/automatizari", {
headers: {
"Cookie": `__Host-sesiune=${process.env.JETON_SESIUNE}`,
},
});
const date = await raspuns.json();import os
import requests
raspuns = requests.get(
"https://app.ilustromania.com/nucleu/v1/automatizari",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
)
date = raspuns.json()DELETE/v1/automatizari/{id}
Șterge o automatizare din arhivă
Șterge alegerile unei automatizări deja oprite (doar din arhivă).
| Nume | Tip | Descriere |
|---|---|---|
id | string | identificatorul resursei |
curl -X DELETE https://app.ilustromania.com/nucleu/v1/automatizari/{id} \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE"const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/automatizari/{id}", {
method: "DELETE",
headers: {
"Cookie": `__Host-sesiune=${process.env.JETON_SESIUNE}`,
},
});
const date = await raspuns.json();import os
import requests
raspuns = requests.delete(
"https://app.ilustromania.com/nucleu/v1/automatizari/{id}",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
)
date = raspuns.json()POST/v1/automatizari/{id}
Modifică o automatizare
Administratorul salvează setările alese pentru o automatizare.
| Nume | Tip | Descriere |
|---|---|---|
id | string | identificatorul resursei |
curl -X POST https://app.ilustromania.com/nucleu/v1/automatizari/{id} \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/automatizari/{id}", {
method: "POST",
headers: {
"Cookie": `__Host-sesiune=${process.env.JETON_SESIUNE}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ … }),
});
const date = await raspuns.json();import os
import requests
raspuns = requests.post(
"https://app.ilustromania.com/nucleu/v1/automatizari/{id}",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
json={ … },
)
date = raspuns.json()POST/v1/automatizari/{id}/activ
Pornește sau oprește o automatizare
Administratorul schimbă starea activ a unei automatizări.
| Nume | Tip | Descriere |
|---|---|---|
id | string | identificatorul resursei |
curl -X POST https://app.ilustromania.com/nucleu/v1/automatizari/{id}/activ \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/automatizari/{id}/activ", {
method: "POST",
headers: {
"Cookie": `__Host-sesiune=${process.env.JETON_SESIUNE}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ … }),
});
const date = await raspuns.json();import os
import requests
raspuns = requests.post(
"https://app.ilustromania.com/nucleu/v1/automatizari/{id}/activ",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
json={ … },
)
date = raspuns.json()Modulul update-uri
GET/v1/update-uri
Update-urile aplicației
Noutățile aplicației pentru omul logat, cu numărul celor nevăzute.
curl https://app.ilustromania.com/nucleu/v1/update-uri \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE"const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/update-uri", {
headers: {
"Cookie": `__Host-sesiune=${process.env.JETON_SESIUNE}`,
},
});
const date = await raspuns.json();import os
import requests
raspuns = requests.get(
"https://app.ilustromania.com/nucleu/v1/update-uri",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
)
date = raspuns.json()POST/v1/update-uri
Adaugă un update
Publică o noutate în aplicație; doar administratorul, 409 versiune_existenta.
curl -X POST https://app.ilustromania.com/nucleu/v1/update-uri \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/update-uri", {
method: "POST",
headers: {
"Cookie": `__Host-sesiune=${process.env.JETON_SESIUNE}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ … }),
});
const date = await raspuns.json();import os
import requests
raspuns = requests.post(
"https://app.ilustromania.com/nucleu/v1/update-uri",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
json={ … },
)
date = raspuns.json()POST/v1/update-uri/{id}/vazut
Marchează update-ul văzut
Notează că omul a văzut update-ul :id; 404 dacă nu există.
| Nume | Tip | Descriere |
|---|---|---|
id | string | identificatorul resursei |
curl -X POST https://app.ilustromania.com/nucleu/v1/update-uri/{id}/vazut \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/update-uri/{id}/vazut", {
method: "POST",
headers: {
"Cookie": `__Host-sesiune=${process.env.JETON_SESIUNE}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ … }),
});
const date = await raspuns.json();import os
import requests
raspuns = requests.post(
"https://app.ilustromania.com/nucleu/v1/update-uri/{id}/vazut",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
json={ … },
)
date = raspuns.json()GET/v1/update-uri/poza
Captura unui update
Servește captura de ecran a unui update după nume de fișier validat; doar rolurile de vânzări.
curl https://app.ilustromania.com/nucleu/v1/update-uri/poza \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE"const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/update-uri/poza", {
headers: {
"Cookie": `__Host-sesiune=${process.env.JETON_SESIUNE}`,
},
});
const date = await raspuns.json();import os
import requests
raspuns = requests.get(
"https://app.ilustromania.com/nucleu/v1/update-uri/poza",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
)
date = raspuns.json()