Create index attributes
post
/gsadmin/v1/{appName}/attributes
Creates one or more index attributes in the specified application.
Request
Supported Media Types
- application/json
- application/zip
Path Parameters
- appName
-
Type:
stringRequired:trueSpecifies the name of your application, for example, Discover.
Body Parameter
The index attributes to create in the specified application.
Root Schema : IndexAttributes
Type:
objectRepresents index attributes of an application. Child nodes represent the config owner attributes conforming to ConfigOwnerAttributes JSON schema.
- ecr:createDate
-
Type:
string - ecr:lastModified
-
Type:
string - ecr:lastModifiedBy
-
Type:
string - ecr:type
-
Type:
stringDefault Value:attributes-folder
Security
- basicAuth
-
Type:
basicDescription:Basic username/password authentication.
Response
Supported Media Types
- application/json
201 Response
Index attributes successfully created.
Body
Root Schema : Response
Type:
object- message
-
Type:
string - status
-
Type:
integer(int32)
Examples
Request Body Example
The following shows a sample request body to create index attributes.
:content = {
"ecr:lastModifiedBy": "admin",
"ecr:lastModified": "2016-03-01T18:36:14.663+05:30",
"ecr:createDate": "2016-03-01T18:36:14.441+05:30",
"ecr:type": "attributes-folder",
"system":
{
"ecr:lastModifiedBy": "admin",
"ecr:lastModified": "2016-03-01T18:36:14.663+05:30",
"ecr:createDate": "2016-03-01T18:36:14.441+05:30",
"ecr:type": "attributes-owner-folder",
"camera.35_mm_camera_lens_equivalent": {
"propertyDataType": "ALPHA",
"sourcePropertyNames": ["camera.35 mm camera lens equivalent"],
"ecr:type": "property"
},
"camera.color": {
"isWildcardEnabledInRecordSearch": true,
"displayOrder": 4,
"sourcePropertyNames": ["camera.Colour of product"],
"isAutogen": true,
"isRecordSearchEnabled": true,
"ecr:type": "dimension"
},
"product.max_price": {
"derivedPropertySource": "product.price",
"derivedPropertyFunction": "MAX",
"ecr:type": "derived-property"
}
}
}