List files
client.Files.List(ctx, query) (*FileList, error)
GET/files
List the files in your namespace, newest first. Keyset-paginated: when has_more is true, pass next_cursor back as cursor.
Parameters
Returns
List files
package main
import ( "context" "fmt"
"github.com/lumalabs/luma-agents-go" "github.com/lumalabs/luma-agents-go/option")
func main() { client := lumaagents.NewClient( option.WithAuthToken("My Auth Token"), ) fileList, err := client.Files.List(context.TODO(), lumaagents.FileListParams{
}) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", fileList.Data)}200 example
{ "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "mime_type": "mime_type", "purpose": "input", "size_bytes": 0, "state": "pending", "deleted_at": "2019-12-27T18:11:19.117Z", "expires_at": "2019-12-27T18:11:19.117Z", "failure_reason": "failure_reason", "filename": "filename", "user_id": "user_id" } ], "has_more": true, "next_cursor": "next_cursor"}Returns Examples
200 example
{ "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "mime_type": "mime_type", "purpose": "input", "size_bytes": 0, "state": "pending", "deleted_at": "2019-12-27T18:11:19.117Z", "expires_at": "2019-12-27T18:11:19.117Z", "failure_reason": "failure_reason", "filename": "filename", "user_id": "user_id" } ], "has_more": true, "next_cursor": "next_cursor"}