Return a paginated list of the account’s datasets.
Archived datasets are excluded unless include_archived is set to true. Results can be
narrowed by tags and by the standard filterable parameters; a name filter matches as a
case-insensitive substring rather than an exact match.
List datasets
package main
import (
"context"
"fmt"
"github.com/scaleapi/sgp-dev-go"
"github.com/scaleapi/sgp-dev-go/option"
)
func main() {
client := sgpdev.NewClient(
option.WithAPIKey("My API Key"),
option.WithAccountID("My Account ID"),
)
page, err := client.Datasets.List(context.TODO(), sgpdev.DatasetListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"has_more": true,
"items": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"type": "user",
"object": "identity"
},
"current_version_num": 0,
"name": "name",
"tags": [
"string"
],
"archived_at": "2019-12-27T18:11:19.117Z",
"description": "description",
"object": "dataset"
}
],
"total": 0,
"limit": 0,
"object": "list"
}Returns Examples
{
"has_more": true,
"items": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"type": "user",
"object": "identity"
},
"current_version_num": 0,
"name": "name",
"tags": [
"string"
],
"archived_at": "2019-12-27T18:11:19.117Z",
"description": "description",
"object": "dataset"
}
],
"total": 0,
"limit": 0,
"object": "list"
}