Create a new custom trait definition
POST {{baseUrl}}/trait-definitions?default_locale=en
Creates a new trait definition
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
default_locale | string |
Request Body
{"name"=>"approval_trait", "description"=>"approval trait", "display_name"=>"approval_trait", "permission"=>[{"identity"=>"application_admin", "identity_type"=>"role", "permissions"=>["browse", "download"]}], "instance_permission"=>[{"identity"=>"application_admin", "identity_type"=>"role", "permissions"=>["browse", "download"]}], "default_locale"=>"en", "acl_id"=>"3fa85f64-5717-4562-b3fc-2c963f66afa6", "instance_acl_id"=>"3fa85f64-5717-4562-b3fc-2c963f66afa6", "owner"=>"3fa85f64-5717-4562-b3fc-2c963f66afa6", "attributes"=>[{"name"=>"approved_by", "display_name"=>"Approved by", "data_type"=>"string", "size"=>100, "default_value"=>"approver", "repeating"=>true, "searchable"=>true, "sortable"=>true, "read_only"=>true, "auditable"=>true, "required"=>true, "unique"=>true, "description"=>"Approved by the user", "localizable"=>true, "validators"=>[{"type"=>"length_validator", "operation"=>"Create", "params"=>[{"name"=>"min", "value"=>"1"}]}]}, {"name"=>"approved_role", "display_name"=>"Approver Role", "data_type"=>"string", "size"=>50}, {"name"=>"subscription_id", "display_name"=>"Subscription", "data_type"=>"string", "size"=>100}], "datatype_definitions"=>[{"name"=>"currency_pl", "data_type"=>"string", "picklist"=>[{"value"=>"indian", "display_name"=>"Indian"}, {"value"=>"us", "display_name"=>"US"}]}], "indexes"=>[{"name"=>"subscription_index", "columns"=>["subscription_id"]}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: Created
{"name":"d","system_name":"28lwplku9m5","display_name":"exercitation velit","description":"eu in","namespace":"proident tempor sunt Lorem","namespace_prefix":"anim adipisicing","created_by":{"id":"ae53e4ef-ac36-9ad6-11c8-e22952bc3171","identity_type":"sint commodo","user_profile":{"first_name":"in irure ullamco","last_name":"Excepteur Duis nisi occaecat ad","email":"KokV6@tmnMyQeEIpVVJy.znq"}},"updated_by":{"id":"urn:uuid:1cb555e0-0524-9b86-dfef-a9d61ea0f37b","identity_type":"aliqua Ut","user_profile":{"first_name":"nostrud consequat","last_name":"fugiat labore consequat aliqua","email":"XpZB93C55rCIe@oEjGicW.yuh"}},"create_time":"2004-04-04T19:45:34.046Z","update_time":"1982-07-09T08:16:27.449Z","owner":{"id":"8cc40aaf-8bb7-4dae-84ea-34a206befd73","identity_type":"nisi","user_profile":{"first_name":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"last_name":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"email":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}}},"default_locale":"sunt esse id aliqua","etag":7593340,"active":true,"id":"3d4cace0-4385-7f0f-7aac-27ea225be06f","acl_id":"5fb440be-0da0-889b-2293-68b88c554baa","_links":{"urn:eim:linkrel:history":{"href":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"urn:eim:linkrel:datatype-definitions":{"href":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"self":{"href":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"edit":{"href":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"urn:eim:linkrel:namespace":{"href":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"urn:eim:linkrel:attributes":{"href":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"urn:eim:linkrel:index_definitions":{"href":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"urn:eim:linkrel:has-instance":{"href":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"urn:eim:linkrel:acl":{"href":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"urn:eim:linkrel:instance-acl":{"href":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"urn:eim:linkrel:delete":{"href":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}}}}