Sign inGet started

Get attribute definition

GET
/workspaces/{workspaceId}/attribute-definitions/{attributeDefinitionKey}
Get the specified attribute definition from the schema given its key.
响应载荷
id
string
The UUID, primarily for internal reference
key
string
A user-specified key, primarily for client reference.
displayName
string
A human-readable name of the attribute.
description
string
A user-friendly description of the attribute.
cardinality
string
The cardinality configures how many values belong to the single key.
Possible values: one, many
type
string
The data type of the attribute.
Possible values: boolean, datetime, number, string
format
object
显示子属性
format.type
string
必填
Possible values: emailAddress
pii
boolean
A flag to indicate whether this attribute is considered personally identifiable information.
readOnly
boolean
A flag to indicate whether this attribute may be updated after creation.
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.
archived
boolean
A flag to indicate whether this attribute is archived.
indexMapping
object
显示子属性
indexMapping.fields
array of object
显示子属性
indexMapping.fields.name
string
indexMapping.fields.analyzer
string
Possible values: simple, standard, web, keyword, en, emailDomain, dayOfYear
indexMapping.fields.type
string
Possible values: string
createdAt
string
updatedAt
string
version
number
The version number of the attribute definition.
acl
array of object
An array of ACLs that define the access control for this attribute
显示子属性
acl.roleId
string
The UUID role ID
acl.read
boolean
A flag to indicate role read access
acl.write
boolean
A flag to indicate role write access
代码示例
curl -X GET 'https://api.bird.com/workspaces/{workspaceId}/attribute-definitions/{attributeDefinitionKey}' \
  -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
  • Attribute Definition Key: countryCode

Get an attribute definition

In this example, we're fetching the attribute definition by its key.
代码示例
curl -X GET "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/attribute-definitions/countryCode" \
-H "Authorization: AccessKey abcd" \
-H "Content-Type: application/json" \