Requests to Open Cloud Get entry always return 404

I was making my DataStore manager and i used to make a js library to interact with Open cloud, when i tested it a few weeks ago it was working perfectly. Now i am building this DataStore manager in a Windows forms app in C# but the problem is that requests to the endpoint always return 404.

string path = $"https://apis.roblox.com/datastores/v1/{universe_id.Text}/standard-datastores/datastore/entries/entry?datastoreName={datastoreName}&entryKey=key";

That variable turns into this url which to me seems completely fine but requests always return false.

https://apis.roblox.com/datastores/v1/2606675525/standard-datastores/datastore/entries/entry?datastoreName=NewDS-C#Test&entryKey=key

Result:

The API key is correct and has all the permissions for datastores and is also correctly added to the request’s headers

I also tried logging the headers to see if the parameters were correct. The api key is also set to accept requests from every ip

Reading the docs i found that 404 is returned when the entry or the datastore doesn’t exist but both do. I executed this code in the commands bar and the result was 1

game.DataStoreService:GetDataStore("NewDS-C#Test"):GetAsync("key", 1)

I would like to know what if i am doing something wrong. Help is appreciated

1 Like

this is your code:

string path = $"https://apis.roblox.com/datastores/v1/{universe_id.Text}/standard-datastores/datastore/entries/entry?datastoreName={datastoreName}&entryKey=key";

maybe this is could work or not…

string path = "https://apis.roblox.com/datastores/v1/{universe_id.Text}/standard-datastores/datastore/entries/entry?datastoreName={datastoreName}&entryKey=key";

maybe make it without plus? i dont learn C# but C++ yes

No that code is correct and the dollar sign is required to make string interpolation. Also as i said that part is working because it becomes

https://apis.roblox.com/datastores/v1/2606675525/standard-datastores/datastore/entries/entry?datastoreName=NewDS-C#Test&entryKey=key

oh, i make some short project and it working with a dollar to make a string… sorry, i looking idiot :slight_smile:

No problem but could you please try instead to see if that url works for you obiously by using your own properties and api key

The cURL examples in the reference use the legacy endpoints (which have now been removed). Use

string path = $"https://apis.roblox.com/datastores/v1/universes/{universe_id.Text}/standard-datastores/datastore/entries/entry?datastoreName={datastoreName}&entryKey=key";

instead. (prepend universes/ before the universeId)

Oh well i dindn’t know that because the docs published in the announcements are outdated, where did you find this information?

Since you have found the updated docs can you please explain why this is now returning error 400?

curl \
	--include \
	--location \
	--request GET \
	"https://apis.roblox.com/datastores/v1/3310576216/standard-datastores/datastore/entries/entry" \
	--header "x-api-key: ${API_KEY}" \
	--get \
	-d "datastoreName=Coins" \
	-d "entryKey=269323"

This is the curl example of the docs linked in the announcement and i send all those parameters in the request

The same post under the “Endpoints” heading. The examples are just outdated from when it was in the private beta.

Ok thanks for letting me know but since the examples are outdated and parameters except for datastoreName don’t say if they are required or not then do you know why that is returning error 400 because before they changed the endpoints it was working fine with just these parameters?

Ok i solved it