Gemma.WebApi

<back to all web services

UpdateContenutoTraduzioni

Contenuti

Aggiorna o inserisce le traduzioni per un contenuto specifico basandosi sui codici ISO delle lingue.

Requires Authentication
Requires any of the roles:Admin, ApiUser
The following routes are available for this service:
POST/contenuti/{ContenutoId}/traduzioni
UpdateContenutoTraduzioni Parameters:
NameParameterData TypeRequiredDescription
ContenutoIdpathintYesL'ID numerico del contenuto da tradurre
TraduzionibodyList<TraduzioneEntry>YesElenco delle traduzioni da applicare (upsert)
TraduzioneEntry Parameters:
NameParameterData TypeRequiredDescription
CodiceLinguaformstringYesCodice ISO della lingua (es. IT, EN)
TipoformstringYesTipo di contenuto. Accetta il valore numerico o il nome (es: 1 o 'PlainText', 2 o 'HtmlText')
TestoformstringYesIl testo tradotto vero e proprio
IsVisibileformboolNoDefinisce se questa specifica traduzione รจ pubblicata o meno

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /contenuti/{ContenutoId}/traduzioni HTTP/1.1 
Host: gemma.api.kerberos.energy 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"contenutoId":0,"traduzioni":[{"codiceLingua":"String","tipo":"String","testo":"String","isVisibile":false}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

[{"testo":"String","isVisibile":false,"chiave":"String","contenutoId":0,"linguaId":0,"tipo":"Unknown","tipoId":0,"codiceLingua":"String"}]