*Questo contenuto è tradotto usando AI (Beta) e potrebbe contenere errori. Per visualizzare questa pagina in inglese, clicca qui.

Universe

Rappresenta un'esperienza Roblox.

Attributi

pathstring

Il percorso delle risorse dell'universo.

Formato: universes/{universe_id}.

createTimestring
Solo output

L'timestamp quando l'universo è stato creato. Questa stringa è formattata come Timestamp.

updateTimestring
Solo output

L'timestamp quando l'universo è stato aggiornato per l'ultima volta. Questa stringa è formattata come Timestamp.

displayNamestring
Solo output

Il nome dell'universo.

Questo campo può essere aggiornato aggiornando il nome del luogo di radice.

descriptionstring
Solo output

La descrizione dell'universo.

Questo campo può essere aggiornato aggiornando la descrizione del luogo di radice.

Uno dei seguenti per owner:

userstring
Solo output

L'universo è di proprietà dell'utente.

groupstring
Solo output

L'universo è di proprietà del gruppo.

visibilityEnum<string>
Solo output

Se l'universo sia o meno pubblicamente accessibile.

Valori possibili:

| Valore | Descrizione | | --- | --- | | VISIBILITY_UNSPECIFIED | Gli aggiornamenti che utilizzano questo valore lanceranno un errore sul backend.| | PUBBLICO | L'universo è pubblico.| | PRIVATO | L'universo è privato.Se la visibilità di un universo è impostata su PRIVATA, tutti i giocatori attivi verranno immediatamente rimossi da tutti i server in esecuzione. |. Valori possibili:

facebookSocialLinkobject

Il link social di Facebook.

twitterSocialLinkobject

Il link social di Twitter.

youtubeSocialLinkobject

Il link social di Youtube.

twitchSocialLinkobject

Il link social di Twitch.

discordSocialLinkobject

Il link social Discord.

robloxGroupSocialLinkobject

Il link social del gruppo Roblox.

guildedSocialLinkobject

Il link sociale Guilded.

voiceChatEnabledboolean

Se la chat vocale è abilitata o meno per gli utenti nell'Esperienza.

L'aggiornamento di questo valore non influirà sui server attivi.

ageRatingEnum<string>
Solo output

La valutazione dell'età di questo universo.

Valori possibili:

| Valore | Descrizione | | --- | --- | | AGE_RATING_UNSPECIFIED | La valutazione dell'età non è impostata.| | AGE_RATING_ALL | Supportato per tutti gli utenti.| | AGE_RATING_9_PLUS | Supportato per gli utenti di età 9 e superiori.| | AGE_RATING_13_PLUS | Supportato per gli utenti di età 13 e superiori.| | AGE_RATING_17_PLUS | Supportato per gli utenti di età 17 e superiori. |. Valori possibili:

privateServerPriceRobuxnumber

Rappresenta il prezzo in Robux dei server privati.

Se non impostato, i server privati non sono supportati per questo universo.

Può essere disabilitato solo quando si utilizza una maschera di campo.

Impostare a null disabiliterà tutti i server privati attivi.

Cambiare il prezzo annullerà tutti gli abbonamenti ai server privati.

desktopEnabledboolean

Se i giocatori possono o meno unirsi all'Esperienza attraverso il Desktop.

mobileEnabledboolean

Se i giocatori possono o meno unirsi all'Esperienza tramite Mobile.

tabletEnabledboolean

Se i giocatori possono o meno unirsi all'Esperienza tramite Tablet.

consoleEnabledboolean

Se i giocatori possono o meno unirsi all'Esperienza tramite Console.

vrEnabledboolean

Se i giocatori possono o meno unirsi all'Esperienza attraverso VR.

URL di base

https://apis.roblox.com
Risorsa Universe

{
"path": "universes/123",
"createTime": "2023-07-05T12:34:56Z",
"updateTime": "2023-07-05T12:34:56Z",
"displayName": "ROBLOX Battle [OPEN]",
"description": "OPEN SOURCE! \n Feel free to check out how we made this game and ask us about it!",
"user": "string",
"visibility": "VISIBILITY_UNSPECIFIED",
"facebookSocialLink": {
"title": "string",
"uri": "string"
},
"twitterSocialLink": {
"title": "string",
"uri": "string"
},
"youtubeSocialLink": {
"title": "string",
"uri": "string"
},
"twitchSocialLink": {
"title": "string",
"uri": "string"
},
"discordSocialLink": {
"title": "string",
"uri": "string"
},
"robloxGroupSocialLink": {
"title": "string",
"uri": "string"
},
"guildedSocialLink": {
"title": "string",
"uri": "string"
},
"voiceChatEnabled": true,
"ageRating": "AGE_RATING_UNSPECIFIED",
"privateServerPriceRobux": "integer",
"desktopEnabled": true,
"mobileEnabled": true,
"tabletEnabled": true,
"consoleEnabled": true,
"vrEnabled": true
}

Universe

Ottieni Universo

GET /cloud/v2/universes/{universe_id}

Ottiene l'universo specificato.

RichiestaParametri percorso
universe_idstring
Necessario

L'ID dell'universo.

RispostaUniverse
GET /cloud/v2/universes/{universe_id}

curl -L -X GET 'https://apis.roblox.com/cloud/v2/universes/{universe_id}' \
-H 'x-api-key: {your-api-key}'
Risposta

{
"path": "universes/123",
"createTime": "2023-07-05T12:34:56Z",
"updateTime": "2023-07-05T12:34:56Z",
"displayName": "ROBLOX Battle [OPEN]",
"description": "OPEN SOURCE! \n Feel free to check out how we made this game and ask us about it!",
"user": "string",
"visibility": "VISIBILITY_UNSPECIFIED",
"facebookSocialLink": {
"title": "string",
"uri": "string"
},
"twitterSocialLink": {
"title": "string",
"uri": "string"
},
"youtubeSocialLink": {
"title": "string",
"uri": "string"
},
"twitchSocialLink": {
"title": "string",
"uri": "string"
},
"discordSocialLink": {
"title": "string",
"uri": "string"
},
"robloxGroupSocialLink": {
"title": "string",
"uri": "string"
},
"guildedSocialLink": {
"title": "string",
"uri": "string"
},
"voiceChatEnabled": true,
"ageRating": "AGE_RATING_UNSPECIFIED",
"privateServerPriceRobux": "integer",
"desktopEnabled": true,
"mobileEnabled": true,
"tabletEnabled": true,
"consoleEnabled": true,
"vrEnabled": true
}

Universe

Aggiorna Universo

PATCH /cloud/v2/universes/{universe_id}

Aggiorna l'universo specificato.

Questo metodo è garantito per restituire tutti i campi aggiornati. Questo metodo può inoltre restituire la risorsa completa.

Campi
universe:write
RichiestaParametri percorso
universe_idstring
Necessario

L'ID dell'universo.

Parametri query
updateMaskstring

L'elenco dei campi da aggiornare. Questa stringa è formattata come Timestamp.

Corpo della richiestaUniverse
RispostaUniverse
PATCH /cloud/v2/universes/{universe_id}

curl -L -X PATCH 'https://apis.roblox.com/cloud/v2/universes/{universe_id}?updateMask={string}' \
-H 'x-api-key: {your-api-key}' \
-H 'Content-Type: application/json' \
--data '{
"facebookSocialLink": {
"title": "string",
"uri": "string"
},
"twitterSocialLink": {
"title": "string",
"uri": "string"
},
"youtubeSocialLink": {
"title": "string",
"uri": "string"
},
"twitchSocialLink": {
"title": "string",
"uri": "string"
},
"discordSocialLink": {
"title": "string",
"uri": "string"
},
"robloxGroupSocialLink": {
"title": "string",
"uri": "string"
},
"guildedSocialLink": {
"title": "string",
"uri": "string"
},
"voiceChatEnabled": true,
"privateServerPriceRobux": "integer",
"desktopEnabled": true,
"mobileEnabled": true,
"tabletEnabled": true,
"consoleEnabled": true,
"vrEnabled": true
}'
Risposta

{
"path": "universes/123",
"createTime": "2023-07-05T12:34:56Z",
"updateTime": "2023-07-05T12:34:56Z",
"displayName": "ROBLOX Battle [OPEN]",
"description": "OPEN SOURCE! \n Feel free to check out how we made this game and ask us about it!",
"user": "string",
"visibility": "VISIBILITY_UNSPECIFIED",
"facebookSocialLink": {
"title": "string",
"uri": "string"
},
"twitterSocialLink": {
"title": "string",
"uri": "string"
},
"youtubeSocialLink": {
"title": "string",
"uri": "string"
},
"twitchSocialLink": {
"title": "string",
"uri": "string"
},
"discordSocialLink": {
"title": "string",
"uri": "string"
},
"robloxGroupSocialLink": {
"title": "string",
"uri": "string"
},
"guildedSocialLink": {
"title": "string",
"uri": "string"
},
"voiceChatEnabled": true,
"ageRating": "AGE_RATING_UNSPECIFIED",
"privateServerPriceRobux": "integer",
"desktopEnabled": true,
"mobileEnabled": true,
"tabletEnabled": true,
"consoleEnabled": true,
"vrEnabled": true
}

Universe

Pubblica il messaggio dell'universo
Beta

POST /cloud/v2/universes/{universe_id}:publishMessage

Pubblica un messaggio ai server live dell'universo.

I server possono consumare messaggi attraverso MessagingService.

Campi
universe-messaging-service:publish
RichiestaParametri percorso
universe_idstring
Necessario

L'ID dell'universo.

Corpo della richiesta
topicstring

L'argomento su cui pubblicare il messaggio.

messagestring

Il messaggio da pubblicare.

POST /cloud/v2/universes/{universe_id}:publishMessage

curl -L -X POST 'https://apis.roblox.com/cloud/v2/universes/{universe_id}:publishMessage' \
-H 'x-api-key: {your-api-key}' \
-H 'Content-Type: application/json' \
--data '{
"topic": "my-topic",
"message": "Hello, world!"
}'

Universe

Riavvia i server dell'universo

POST /cloud/v2/universes/{universe_id}:restartServers

Riavvia tutti i server attivi per un universo specifico se e solo se una nuova versione dell'esperienza è stata pubblicata.Utilizzato per rilasciare aggiornamenti dell'esperienza.

Campi
universe:write
RichiestaParametri percorso
universe_idstring
Necessario

L'ID dell'universo.

Corpo della richiesta
Risposta
POST /cloud/v2/universes/{universe_id}:restartServers

curl -L -X POST 'https://apis.roblox.com/cloud/v2/universes/{universe_id}:restartServers' \
-H 'x-api-key: {your-api-key}' \
-H 'Content-Type: application/json' \
--data '{}'
Risposta

{}