Create or update org custom attributes
PUT
/api/v1/extraction/attributes/{domain}
const url = 'https://dashboard.justcrawl.io/api/v1/extraction/attributes/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"pageType":"example","attributes":[{"name":"example","xpaths":["example"],"type":"text","description":"example","antiPatterns":["example"],"semanticType":"brand_name","validation":{"minLength":1,"maxLength":1,"min":1,"max":1,"pattern":"example"}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://dashboard.justcrawl.io/api/v1/extraction/attributes/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "pageType": "example", "attributes": [ { "name": "example", "xpaths": [ "example" ], "type": "text", "description": "example", "antiPatterns": [ "example" ], "semanticType": "brand_name", "validation": { "minLength": 1, "maxLength": 1, "min": 1, "max": 1, "pattern": "example" } } ] }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” domain
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
pageType
required
string
attributes
required
Array<object>
object
name
required
string
xpaths
required
Array<string>
type
required
string
description
string
antiPatterns
Array<string>
semanticType
string
validation
object
minLength
integer
maxLength
integer
min
number
max
number
pattern
string
Responses
Section titled “ Responses ”Updated org attributes
Media type application/json
Org-scoped custom attributes. When no row exists, the API returns { attributes: [] } and other fields are omitted.
object
id
string format: uuid
orgId
string format: uuid
domain
string
pageType
string
attributes
required
Array<object>
object
name
required
string
xpaths
required
Array<string>
type
required
string
description
string
antiPatterns
Array<string>
semanticType
string
validation
object
minLength
integer
maxLength
integer
min
number
max
number
pattern
string
createdAt
string format: date-time
updatedAt
string format: date-time
Example
{ "attributes": [ { "type": "text", "semanticType": "brand_name" } ]}Validation error