List workspace secrets
client.WorkspaceSecrets.List(ctx, query) (*CursorPagination[WorkspaceSecret], error)
GET/v1/workspace_secrets
List workspace secrets
package main
import (
"context"
"fmt"
"github.com/cadenya/cadenya-go"
"github.com/cadenya/cadenya-go/option"
)
func main() {
client := cadenya.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.WorkspaceSecrets.List(context.TODO(), cadenya.WorkspaceSecretListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"items": [
{
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"value": "value"
},
"info": {
"createdBy": {
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "PROFILE_TYPE_USER",
"email": "email",
"name": "name"
}
},
"lastUsedAt": "2019-12-27T18:11:19.117Z"
}
}
],
"pagination": {
"nextCursor": "nextCursor",
"total": 0
}
}Returns Examples
{
"items": [
{
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"value": "value"
},
"info": {
"createdBy": {
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "PROFILE_TYPE_USER",
"email": "email",
"name": "name"
}
},
"lastUsedAt": "2019-12-27T18:11:19.117Z"
}
}
],
"pagination": {
"nextCursor": "nextCursor",
"total": 0
}
}