# cmd.GetApiClient undefiend, there is no function GetApiClient

**URL:** <https://forum.pydio.com/t/cmd-getapiclient-undefiend-there-is-no-function-getapiclient/5314>\
**Category:** Pydio Cells\
**Tags:** api\
**Created:** [June 2, 2023, 6:41am UTC](https://forum.pydio.com/t/cmd-getapiclient-undefiend-there-is-no-function-getapiclient/5314 "2023-06-02T06:41:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hero](https://avatars.discourse-cdn.com/v4/letter/h/e47774/32.png) [@Hero](https://forum.pydio.com/u/Hero)\
**Post date:** [June 2, 2023, 6:41am UTC](https://forum.pydio.com/t/cmd-getapiclient-undefiend-there-is-no-function-getapiclient/5314/1 "2023-06-02T06:41:25Z")

</div>

Hi folks,

I use cells v3 community version but I think it is not important for my issue.  
I want to delete files older than x days.  
I tried to use the go snippet from Zayn in the post [Cells purging question - #8 by scott.bentley](https://forum.pydio.com/t/cells-purging-question/3087/8)  
from Jun 2020. I get a compile error using cmd.GetApiClient that there is no GetApiClient defined.  
In the descriptions from pkg.go.dev and github I can’t see any defenition from GetApiClient.  
How can I get an connect to the cells service to delete files. Better, how can I delete files older than …  
Any help or hints for me?  
An advance thank you very much.  
Best regards  
Gregor

---

<div class="post-metadata">

**Author:** ![Hero](https://avatars.discourse-cdn.com/v4/letter/h/e47774/32.png) [@Hero](https://forum.pydio.com/u/Hero)\
**Post date:** [June 9, 2023, 7:12am UTC](https://forum.pydio.com/t/cmd-getapiclient-undefiend-there-is-no-function-getapiclient/5314/2 "2023-06-09T07:12:46Z")

</div>

Good morning,

is there any help for me?  
BR  
Gregor

---

<div class="post-metadata">

**Author:** ![charles](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/charles/32/3_2.png) [@charles](https://forum.pydio.com/u/charles)\
**Post date:** [June 9, 2023, 7:56am UTC](https://forum.pydio.com/t/cmd-getapiclient-undefiend-there-is-no-function-getapiclient/5314/3 "2023-06-09T07:56:37Z")

</div>

hi Gregor  
you should have a look at [cells-sdk-go/ls.go at main · pydio/cells-sdk-go · GitHub](https://github.com/pydio/cells-sdk-go/blob/main/example/cmd/ls.go)  
the SDK slight changed since the 2020 post…

---

<div class="post-metadata">

**Author:** ![Hero](https://avatars.discourse-cdn.com/v4/letter/h/e47774/32.png) [@Hero](https://forum.pydio.com/u/Hero)\
**Post date:** [June 9, 2023, 2:42pm UTC](https://forum.pydio.com/t/cmd-getapiclient-undefiend-there-is-no-function-getapiclient/5314/4 "2023-06-09T14:42:02Z")

</div>

Hello Charles,

thank you for your answer. But I can not find this package path [GitHub - pydio/cells-sdk-go: Golang client for Pydio Cells rest API.](http://github.com/pydio/cells-sdk-go/) **v4/**

What is my misunderstanding?

In advance thank you very much  
Gregor

---

<div class="post-metadata">

**Author:** ![bsinou](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/bsinou/32/476_2.png) [@bsinou](https://forum.pydio.com/u/bsinou)\
**Post date:** [June 12, 2023, 9:05am UTC](https://forum.pydio.com/t/cmd-getapiclient-undefiend-there-is-no-function-getapiclient/5314/5 "2023-06-12T09:05:34Z")

</div>

To ease our maintenance processes, we recently “moved” back the v4 at the root of the github repository.

Yet, it is still referenced as `github.com/pydio/cells-sdk-go/v4` in go thanks to the `go.mod` file.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex032/uploads/pydio/original/2X/6/61f19fa52ec15fd4250db51aea351adba0e831fd.png) [@system](https://forum.pydio.com/u/system)\
**Post date:** [August 11, 2023, 9:05am UTC](https://forum.pydio.com/t/cmd-getapiclient-undefiend-there-is-no-function-getapiclient/5314/6 "2023-08-11T09:05:52Z")

</div>

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