Retrieves a single file by its ID.
This works for any file id you already hold, including ones returned in a CRM record’s $files relationship — not only files created through POST /v1/files. See File uploads for which document classes are retrievable by id versus enumerable through GET /v1/files.
Required scope: files:read
Rate limit category: Read
Retrieve a file
package main
import (
"context"
"fmt"
"github.com/Lightfld/lightfield-go"
"github.com/Lightfld/lightfield-go/option"
)
func main() {
client := githubcomlightfldlightfieldgo.NewClient(
option.WithAPIKey("My API Key"),
)
fileRetrieveResponse, err := client.File.Get(context.TODO(), "id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", fileRetrieveResponse.ID)
}
{
"id": "id",
"completedAt": "completedAt",
"createdAt": "createdAt",
"expiresAt": "expiresAt",
"filename": "filename",
"mimeType": "mimeType",
"sizeBytes": -9007199254740991,
"status": "PENDING"
}Returns Examples
{
"id": "id",
"completedAt": "completedAt",
"createdAt": "createdAt",
"expiresAt": "expiresAt",
"filename": "filename",
"mimeType": "mimeType",
"sizeBytes": -9007199254740991,
"status": "PENDING"
}