The Open Cloud Universes API is not functional at all for me. I’m not sure what’s going on and if it’s a me problem, but I have been unable to get it to work at all.
I already use Open Cloud for other systems such as MessagingService and Datastores, and they work. I have experimented with the assets API and it also works.
The Universes API does not.
I am trying to use the Universes API to restart servers and change a place’s visibility remotely.
I’m not super experienced with JS so I might be doing it wrong, but the responses right now seem to be the ones provided in the documentation.
This is what I am currently doing:
let QAStream = Https.request({
"hostname": 'apis.roblox.com', path: `/cloud/v2/universes/${universe}?updateMask=visibility`, "method": 'PATCH', "protocol": 'https:', "headers": {
"api-key": Key,
"x-api-key": Key,
"Content-Type": "application/json"
}
}, (Response) => {
console.log(`${chunk}`);
}
Response.on('data', commandResponseProvider)
Response.on('end', (chunk) => {
commandResponseProvider(chunk || 'end')
})
});
QAStream.write(JSON.stringify({ 'visibility': visibility }));
QAStream.end();
let RestartStream = Https.request({"hostname": 'apis.roblox.com', path: `/cloud/v2/universes/${universe}:restartServers`, "method": 'POST', "protocol": 'https:', "headers": {
"api-key": Key,
"x-api-key": Key,
"Content-Type": "application/json"
}}, (Response) => {
function commandResponseProvider(chunk) {
console.log("RETURNED:");
console.log(`${chunk}`)
}
Response.on('data', commandResponseProvider)
Response.on('end', (chunk) => {
commandResponseProvider(chunk || 'end')
})
});
RestartStream.write(JSON.stringify({ 'path': `universes/${universe}` })); // I understand this is most likely not needed but I was trying anything at this point
RestartStream.end();
The API keys are retrieved correctly, are valid and have the necessary permissions.