Websites ma dziś dwie metody publiczne, obie w mikroserwisie Account i obie tylko do odczytu. Tworzenie strony, przesyłanie plików, publikowanie wersji, wracanie do wcześniejszej, łączenie domeny, czytanie ruchu i zmiana planu odbywają się w dashboardzie. Nie mają metody publicznej.
| Metoda | Na co odpowiada |
|---|---|
get_account_static_websites | Strony, które posiadasz |
get_site_build_image_modes | Jakich trybów obrazów może używać kreator AI dla Twojego konta |
Wyślij żądanie ze swoim kluczem:
curl -s https://xuda.ai/cpi/get_account_static_websites \
-H 'content-type: application/json' \
-d '{"api_key":"YOUR_API_KEY"}'
const res = await fetch('https://xuda.ai/cpi/get_account_static_websites', {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ api_key: 'YOUR_API_KEY' }),
});
const { code, data } = await res.json();
import requests
res = requests.post(
'https://xuda.ai/cpi/get_account_static_websites',
json={'api_key': 'YOUR_API_KEY'},
)
Wyświetl swoje strony
get_account_static_websites nie przyjmuje żadnego pola poza Twoim kluczem. Odpowiada każdą stroną, którą posiadasz, do 1000, jako wierszami:
{
"code": 1,
"data": {
"rows": [
{ "id": "WEBSITE_ID", "value": { "app_name": "Bean There", "app_type": "static_website" } }
]
}
}
Każde id to własny identyfikator strony, a każde value to rekord strony, ten sam, który czyta dashboard. Zawiera nazwę strony, jej plan i szczegóły publikacji. Strony udostępnione Tobie nie są na tej liście, tylko te, które posiadasz, w której przestrzeni roboczej by nie były złożone.
Czytaj tryby obrazów
get_site_build_image_modes mówi, jakich rodzajów obrazów może używać kreator AI dla Twojego konta. To ta sama odpowiedź, której kreator używa, by zablokować lub otworzyć swoje wybory obrazów.
curl -s https://xuda.ai/cpi/get_site_build_image_modes \
-H 'content-type: application/json' \
-d '{"api_key":"YOUR_API_KEY"}'
{
"code": 1,
"data": {
"svg": true,
"stock": true,
"gen_low": false,
"gen_high": false,
"upgrade": true,
"reason": "AI image generation needs a paid website plan and a workspace credit plan. Upgrade to unlock it."
}
}
| Pole | Znaczenie |
|---|---|
svg | Ilustracje rysowane na samej stronie. Zawsze true |
stock | Zdjęcia stockowe. Zawsze true |
gen_low | Obrazy AI. true z płatnym członkostwem i planem kredytów przestrzeni roboczej |
gen_high | Obrazy AI wyższej jakości, na tych samych warunkach |
upgrade | true, gdy oba tryby AI są zablokowane |
reason | Dlaczego są zablokowane, w jednym zdaniu. Puste, gdy są otwarte |
Metody
archive_account_profileArchive Account ProfileArchive Account ProfileArchives account profile.1 fielduserarchive_contactArchive ContactArchive ContactArchives contact.1 fieldusercreate_account_profileCreate Account ProfileCreate Account ProfileCreates account profile.13 fieldsusercreate_contactCreate ContactCreate ContactAdds a person to the contact book by hand, from typed details rather than from a received message. Takes only the fields a contact has, name, email, phone, company, job title and its kind (personal or business, which then needs no model to classify it), and ignores anything else the caller happens to hold, such as a shipping address. The email is the book's key, so it is required and a repeat of one already filed returns the existing contact instead of a second copy.10 fieldsuserdelete_account_profileDelete Account ProfileDelete Account ProfileDeletes account profile.1 fielduserdelete_contactDelete ContactDelete ContactDeletes contact.1 fielduserfavorite_contactFavorite ContactFavorite ContactMarks contact as a favorite.1 fieldusergenerate_contact_avatarGenerate Contact AvatarGenerate Contact AvatarClears a contact's existing pictures and regenerates its profile avatar (not available on free accounts).1 fielduserget_account_advertisingGet Account AdvertisingGet Account AdvertisingReturns the user's advertising campaigns (app_type:advertising) via a Mango query.0 fieldsuserget_account_balancersGet Account BalancersGet Account BalancersReturns the user's load balancers (app_type:balancer) via a Mango query, so the sidenav bucket picks up a newly created balancer right after deploy.0 fieldsuserget_account_datacentersGet Account DatacentersGet Account DatacentersReturns the datacenters associated with the account from the user_datacenters master view.0 fieldsuserget_account_deploymentsGet Account DeploymentsGet Account DeploymentsReturns the deployments associated with the account from the user_deployments master view.0 fieldsuserget_account_infoGet Account InfoGet Account InfoReturns the account data for the requesting user, optionally enforcing usage limits.0 fieldsuserget_account_instancesGet Account InstancesGet Account InstancesReturns all instances associated with the account from the user_all_instances master view.0 fieldsuserget_account_profilesGet ProfilesGet ProfilesRetrieves account profiles.12 fieldsuserget_account_projectsGet Account ProjectsGet Account ProjectsReturns the projects owned by the account (or all projects for superuser and support accounts) from the user_projects master view.0 fieldsuserget_account_static_websitesGet Account WebsitesGet Account WebsitesReturns the user's websites (app_type:static_website) via a Mango query.0 fieldsuserget_account_vpsGet Account VPSGet Account VPSReturns the standalone virtual servers associated with the account from the user_vps master view.0 fieldsuserget_contactsGet ContactsGet ContactsRetrieves contacts.15 fieldsuserget_login_screenGet Login ScreenGet Login ScreenPublic pre-auth resolver for an account's effective login screen. Returns only source/media_type/file_url and the public branding view (UI-1752).1 fieldpublicget_site_build_image_modesGet Site Build Image ModesGet Site Build Image ModesReturns which website-builder image modes (svg, stock, gen_low, gen_high) the account may use. The two AI-generation modes require a paid membership and a workspace credit plan; otherwise they are locked and the UI shows an upgrade prompt.0 fieldsusernot_spam_contactNot Spam ContactNot Spam ContactMarks a contact as not spam, whitelists its email, and refreshes its business or personal classification.1 fielduserpin_contactPin ContactPin ContactPins contact.1 fielduserset_deep_research_contactSet Deep Research ContactSet Deep Research ContactEnables deep research on a contact, enriching its business or personal info and processing related conversation transcripts.1 fielduserset_not_contactSet Not A ContactSet Not A ContactMoves a contact out of the Contacts list into Not contacts, for a sender that is not somebody to talk to (a bank's alerts, a store's receipts, a no-reply address). Its mail is still read as before. unset_not_contact puts it back.1 fielduserunarchive_account_profileUnarchive Account ProfileUnarchive Account ProfileRestores archived account profile.1 fielduserunarchive_contactUnarchive ContactUnarchive ContactRestores archived contact.1 fielduserunfavorite_contactUnfavorite ContactUnfavorite ContactRemoves the favorite state from contact.1 fielduserunfriend_contactUnfriend ContactUnfriend ContactEnds the friend relationship with a contact by closing its team request and clearing the link from the contact.1 fielduserunpin_contactUnpin ContactUnpin ContactRemoves the pinned state from contact.1 fielduserunset_deep_research_contactUnset Deep Research ContactUnset Deep Research ContactDisables deep research on a contact and clears its cached data.1 fielduserunset_not_contactUnset Not A ContactUnset Not A ContactPuts a contact from Not contacts back in the Contacts list, and keeps it there: the no-reply rule never moves it again.1 fielduserupdate_account_infoUpdate Account InfoUpdate Account InfoUpdates account information.1 fielduserupdate_account_profileUpdate Account ProfileUpdate Account ProfileUpdates account profile.1 fielduserupdate_entity_account_profilesUpdate Entity Account ProfilesUpdate Entity Account ProfilesUpdates entity account profiles.1 fielduser
To ta sama tabela Account, której własny fragment opisują AI Workspace, Cloud Hosting i On-Prem.