rr, err := client.Data.ReadAttributes(context.Background(), &v1.Data.AttributeReadRequest{
TenantId: "t1",
Metadata: &v1.Data.AttributeReadRequestMetadata{
SnapToken: "",
},
Filter: &v1.AttributeFilter{
Entity: &v1.EntityFilter{
Type: "organization",
Ids: []string{"1"},
},
Attributes: []string{"private"},
},
})client.data.readAttributes({
tenantId: "t1",
metadata: {
snap_token: "",
},
filter: {
entity: {
type: "organization",
ids: [
"1"
]
},
attributes: [
"private"
],
}
}).then((response) => {
// handle response
})curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/data/attributes/read' \
--header 'Content-Type: application/json' \
--data-raw '{
metadata: {
snap_token: "",
},
filter: {
entity: {
type: "organization",
ids: [
"1"
]
},
attributes: [
"private"
],
}
}'{
"attributes": [
{
"entity": {
"type": "<string>",
"id": "<string>"
},
"attribute": "<string>",
"value": {
"@type": "<string>"
}
}
],
"continuous_token": "<string>"
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Read Attributes
rr, err := client.Data.ReadAttributes(context.Background(), &v1.Data.AttributeReadRequest{
TenantId: "t1",
Metadata: &v1.Data.AttributeReadRequestMetadata{
SnapToken: "",
},
Filter: &v1.AttributeFilter{
Entity: &v1.EntityFilter{
Type: "organization",
Ids: []string{"1"},
},
Attributes: []string{"private"},
},
})client.data.readAttributes({
tenantId: "t1",
metadata: {
snap_token: "",
},
filter: {
entity: {
type: "organization",
ids: [
"1"
]
},
attributes: [
"private"
],
}
}).then((response) => {
// handle response
})curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/data/attributes/read' \
--header 'Content-Type: application/json' \
--data-raw '{
metadata: {
snap_token: "",
},
filter: {
entity: {
type: "organization",
ids: [
"1"
]
},
attributes: [
"private"
],
}
}'{
"attributes": [
{
"entity": {
"type": "<string>",
"id": "<string>"
},
"attribute": "<string>",
"value": {
"@type": "<string>"
}
}
],
"continuous_token": "<string>"
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Path Parameters
Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant t1 for this field. Required, and must match the pattern \“[a-zA-Z0-9-,]+\“, max 64 bytes.
Body
AttributeReadRequest defines the structure of a request for reading attributes. It includes the tenant_id, metadata, attribute filter, page size for pagination, and a continuous token for multi-page results.
AttributeReadRequestMetadata defines the structure for the metadata of an attribute read request. It includes the snap_token associated with a particular state of the database.
Show child attributes
Show child attributes
AttributeFilter is used to filter attributes based on the entity and attribute names.
Show child attributes
Show child attributes
page_size specifies the number of results to return in a single page. If more results are available, a continuous_token is included in the response.
continuous_token is used in case of paginated reads to get the next page of results.
Response
A successful response.
AttributeReadResponse defines the structure of the response to an attribute read request. It includes the attributes retrieved and a continuous token for handling result pagination.