List attribute definitions
GET
/workspaces/{workspaceId}/attribute-definitions
This endpoint will return a list of attribute definitions in the schema.
Abfrageparameter
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.
Antwort-Payload
results
array of object
erforderlich
Untergeordnete Attribute anzeigen
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
Untergeordnete Attribute anzeigen
results.format.type
string
erforderlich
Possible values: emailAddress
results.format.type
string
erforderlich
Possible values: phoneNumber
results.format.select
object
erforderlich
Untergeordnete Attribute anzeigen
results.format.select.options
array of object
erforderlich
Untergeordnete Attribute anzeigen
results.format.select.options.label
string
erforderlich
Human-friendly label for the option
results.format.select.options.value
string
erforderlich
Immutable string that will be stored in contact attributes
results.format.type
string
erforderlich
Possible values: select
results.format.type
string
erforderlich
Possible values: uuid
results.format.multiline
boolean
results.format.type
string
erforderlich
Possible values: text
results.format.type
string
erforderlich
Possible values: url
results.format.type
string
erforderlich
Possible values: date
results.format.scale
integer
results.format.type
string
erforderlich
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
Untergeordnete Attribute anzeigen
results.indexMapping.fields
array of object
Untergeordnete Attribute anzeigen
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
Untergeordnete Attribute anzeigen
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.
Codebeispiel
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.
Codebeispiel
curl -X GET "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/attribute-definitions" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \Codebeispiel
{
"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"
}
]
}