Uploadcare PHP API only shows empty groups?

When I retrieve groups using the Uploadcare PHP API all the returned groups are empty (the file list array is empty).

$groupListResponse = $api->group()->listGroups(100, $asc=false);
$groupCollection = $groupListResponse->getResults();

All results show:

[files:Uploadcare\File\Group:private] => Uploadcare\File\FileCollection Object
    (
    [elements:protected] => Array
        (
        )
    )

Also, if I upload a group of files, that group is not shown in the list :confused:

Hi @Picto, we couldn’t reproduce this. Which exact version of uploadcare-php are you using? Can you triple-check that the target project contains groups?

composer.json shows:
"uploadcare/uploadcare-php": "^4.0",

The query:

$groupListResponse = $api->group()->listGroups(100, $asc=false);
$groupCollection = $groupListResponse->getResults();
print_r($groupCollection);

Part of the results (I redacted the UUID). All other results are older and show empty [elements:protected].

Uploadcare\GroupCollection Object
(
    [inner:Uploadcare\GroupCollection:private] => Uploadcare\File\GroupCollection Object
        (
            [elements:protected] => Array
                (
                    [0] => Uploadcare\File\Group Object
                        (
                            [id:Uploadcare\File\Group:private] => 594d769c-ef7d-4c30-ab32-9ba27cdc33ba~41
                            [datetimeCreated:Uploadcare\File\Group:private] => DateTime Object
                                (
                                    [date] => 2022-10-15 20:36:41.067858
                                    [timezone_type] => 3
                                    [timezone] => UTC
                                )

                            [datetimeStored:Uploadcare\File\Group:private] => 
                            [filesCount:Uploadcare\File\Group:private] => 41
                            [cdnUrl:Uploadcare\File\Group:private] => https://ucarecdn.com/594d769c-ef7d-4c30-ab32-9ba27cdc33ba~41/
                            [url:Uploadcare\File\Group:private] => https://api.uploadcare.com/groups/594d769c-ef7d-4c30-ab32-9ba27cdc33ba~41/
                            [files:Uploadcare\File\Group:private] => Uploadcare\File\FileCollection Object
                                (
                                    [elements:protected] => Array
                                        (
                                        )

                                )

                        )

Interestingly, this result shows 2022-10-15 as the most recent group, but I’ve been uploading a lot of other batches since…

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