List attribute definitions
GET
/workspaces/{workspaceId}/attribute-definitions
This endpoint will return a list of attribute definitions in the schema.
Parameter query
limit
integer
Limits the number of results to return.
pageToken
string
The cursor that keeps track of the current position in the results.
reverse
boolean
Reverses the order in which the results are returned.
Payload respons
results
array of object
wajib
Tampilkan atribut turunan
results.id
string
The UUID, primarily for internal reference
results.key
string
A user-specified key, primarily for client reference.
results.displayName
string
A human-readable name of the attribute.
results.description
string
A user-friendly description of the attribute.
results.cardinality
string
The cardinality configures how many values belong to the single key.
Possible values: one, many
results.type
string
The data type of the attribute.
Possible values: boolean, datetime, number, string
results.format
object
Tampilkan atribut turunan
results.format.type
string
wajib
Possible values: emailAddress
results.format.type
string
wajib
Possible values: phoneNumber
results.format.select
object
wajib
Tampilkan atribut turunan
results.format.select.options
array of object
wajib
Tampilkan atribut turunan
results.format.select.options.label
string
wajib
Human-friendly label for the option
results.format.select.options.value
string
wajib
Immutable string that will be stored in contact attributes
results.format.type
string
wajib
Possible values: select
results.format.type
string
wajib
Possible values: uuid
results.format.multiline
boolean
results.format.type
string
wajib
Possible values: text
results.format.type
string
wajib
Possible values: url
results.format.type
string
wajib
Possible values: date
results.format.scale
integer
results.format.type
string
wajib
Possible values: numberScale
results.pii
boolean
A flag to indicate whether this attribute is considered personally identifiable information.
results.readOnly
boolean
A flag to indicate whether this attribute may be updated after creation.
results.builtin
boolean
A flag to indicate whether this attribute is built-in. Built-in attributes are system-defined
and cannot be updated or deleted by end-users.
results.archived
boolean
A flag to indicate whether this attribute is archived.
results.indexMapping
object
Tampilkan atribut turunan
results.indexMapping.fields
array of object
Tampilkan atribut turunan
results.indexMapping.fields.name
string
results.indexMapping.fields.analyzer
string
Possible values: simple, standard, web, keyword, en, emailDomain, dayOfYear
results.indexMapping.fields.type
string
Possible values: string
results.createdAt
string
results.updatedAt
string
results.version
number
The version number of the attribute definition.
results.acl
array of object
An array of ACLs that define the access control for this attribute
Tampilkan atribut turunan
results.acl.roleId
string
The UUID role ID
results.acl.read
boolean
A flag to indicate role read access
results.acl.write
boolean
A flag to indicate role write access
nextPageToken
string
The token that can be passed as pageToken in URL to retrieve the next set of results. If missing, no more results to display.
Contoh kode
curl -X GET 'https://api.bird.com/workspaces/{workspaceId}/attribute-definitions' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'Examples
Let's establish some of our data that will be used in the following examples:
- Workspace ID: a1405560-c8d3-4b1a-877d-3f449ad95352
- AccessKey: abcd
List the attributes
In this example, we're listing all attribute definitions from a given workspace.
Contoh kode
curl -X GET "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/attribute-definitions" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \Contoh kode
{
"results": [
{
"key": "birthday",
"displayName": "Birthday",
"description": "",
"cardinality": "one",
"type": "datetime",
"pii": true,
"readOnly": false,
"builtin": true,
"archived": false,
"createdAt": "0001-01-01T00:00:00Z",
"updatedAt": "0001-01-01T00:00:00Z",
"group": "standard"
},
{
"key": "countryCode",
"displayName": "countryCode",
"description": "Country code",
"cardinality": "one",
"type": "string",
"pii": false,
"readOnly": false,
"builtin": false,
"archived": false,
"createdAt": "2024-11-26T15:00:00.000Z",
"updatedAt": "2024-11-26T15:00:00.000Z",
"group": "custom"
}
]
}