API referenceV2Analyzer tests
Assign analyzer test templates to an attribute
Assigns one or more analyzer test templates to an attribute (export field). Each assignment includes a template ID and its configuration parameters.
Authorization
bearerAuth AuthorizationBearer <token>
ProductsUp Keycloak JWT bearer token.
In: header
Path Parameters
attributeId*integer
Attribute (export field) ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://export-template-api.productsup.com/V2/attributes/0/analyzer-tests" \ -H "Content-Type: application/json" \ -d '[ { "templateId": "length_check", "configuration": { "value": 1, "operator": ">" } }, { "templateId": "length_check", "configuration": { "value": 100, "operator": "<" } } ]'{
"data": [
{
"id": 1,
"attributeId": 123,
"templateId": "length_check",
"templateName": "Length Validation",
"configuration": {
"value": 100,
"operator": ">"
},
"createdAt": "2024-06-10T14:00:00Z",
"updatedAt": "2024-06-10T14:00:00Z",
"name": "Price must be positive",
"color": "#ff0000",
"caption": "Invalid price",
"group": "Pricing",
"hint": "Check the price column for negative values",
"errorId": 10059,
"requiredColumns": [
"price",
"currency"
]
}
]
}{
"errors": {
"message": "Request validation has encountered constraint violations.",
"errors": {
"templateId": [
"This field is missing."
],
"configuration": [
"This field is missing."
]
}
}
}{
"errors": {
"message": "Resource access denied."
}
}{
"errors": {
"message": "Resource access denied."
}
}How is this guide?
List all analyzer test templates GET
Retrieves a paginated list of all available analyzer test templates. Templates are reusable validators that can be assigned to attributes with specific configurations.
Unassign analyzer test template from an attribute DELETE
Removes an analyzer test template assignment from an attribute (export field).