Open Cloud only showing one DataStore in API response

I have a website where I am using Roblox Open Cloud API to access DataStores. I am using PHP for the request. The initial request is working; however, it is only displaying one of the DataStores in the game when there are multiple.

PHP Code:

    $url = "https://apis.roblox.com/datastores/v1/universes/3021566345/standard-datastores";
    
    $key = array(
        "x-api-key: blablabla"
    );
    
    $curl = curl_init();  
 
    curl_setopt($curl,CURLOPT_URL,$url);
    curl_setopt($curl,CURLOPT_HTTPHEADER, $key);
    curl_setopt($curl,CURLOPT_RETURNTRANSFER,true);
 
    $output = curl_exec($curl);
 
    curl_close($curl);
    
    echo $output;

I am also sure the DataStore that I want to appear exists because I can use it within Roblox.

The response I am getting from the Open Cloud API is:

{"datastores":[{"name":"HttpRequestsCache","createdTime":"2022-11-20T21:54:48.4571971Z"}],"nextPageCursor":"secret"}

I was thinking maybe nextPageCursor may have something to do with getting the next set of data however I can’t find any documentation regarding it. Unfortunately, Open Cloud doesn’t have that many tutorials on it yet, although the documentation page is quite detailed.

Any help would be useful. Thanks in advance.

I’m not too sure if this will work but I’ve worked with catalog APIs which use next page cursor.

I would guess the usage would be the same so in your url, try adding the nextPageCursor parameter to be the next page cursor like so, replacing theNextPageCursor with the actual next page cursor:

$url = "https://apis.roblox.com/datastores/v1/universes/3021566345/standard-datastores?nextPageCursor=theNextPageCursor"

If no luck, the docs here say to specify a ?cursor parameter instead of ?nextPageCursor:

Also there are more parameters here if you want to get more than one data store per page, particularly the limit param:

1 Like

Thank you so much. The url should look like this:

$url = https://apis.roblox.com/datastores/v1/universes/3021566345/standard-datastores?cursor=theNextPageCursor

So I just have to use cursor as a parameter in the url.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.