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 .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	contenutoId: 0,
	traduzioni: 
	[
		{
			codiceLingua: String,
			tipo: String,
			testo: String,
			isVisibile: False
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

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