Sample Request to Create a Custom View Template
Include the fields and filters for a custom view template within the request body. The following example shows a request to create a custom view template, but you can use similar request body syntax with the POST /viewTemplates/{viewTemplateName}/patch endpoint of the Analytical Reporting - View Management API for modification requests as well.
POST {{runtime_url}}/viewTemplates/{viewTemplateName}?realm={realm}
|
|
|
Example |
POST {{runtime_url}}/viewTemplates/ContractWorkspaceFaceViewPer1?realm=myRealm345
|
|
Request body syntax |
{
"documentType":"{document type}"
"status":"{draft | published | deactivated}"
"selectAttributes":["{field1}","{field2}"{,…}],
"filterExpressions":[
{"field":"{field name}",
"op":"{operator}",
"defaultValue":"{value}",
"name":"{name}"}
...
]
}
|
|
Request body example |
{
"documentType":"ContractWorkspaceFact"
"status":"published"
"selectAttributes":["AutoRenewalInterval", "Supplier", "AllowAdhocSpend", "AllOwners.AllOwners", "ContractId", "LoadCreateTime", "Region.Region", "ProcessStatus", "MaxAutoRenewalsAllowed", "DueDate", "IsEvergreen", "ProjectId", "OrigAmount", "Commodity.Commodity", "AclId", "EndDate", "SourceSystem", "ContainerProject", "ProposedAmount", "OrigProposedAmount", "ProjectInfo", "RelatedId", "Owner", "Organization.Organization", "State", "LoadUpdateTime", "BeginDate", "NoticePeriod", "EffectiveDate", "Description", "AgreementDate", "DependsOnProject", "Process", "AmendmentVersion", "DocumentVersion", "HierarchyType", "ProposedIncrementalAmount", "ApprovedAmount", "ContractCurrency", "Status", "ParentAgreement", "AutoRenewalCount", "ExpirationDate", "OnTimeOrLate", "AffectedParties.AffectedParties", "ExpirationTermType", "ComplexSpendAvailableAmount", "ContractStatus", "Contract", "IsTestProject", "Duration", "AmendmentReason", "Amount", "IsCombinedSpend"],
"filterExpressions" : [
{
"field" : "TimeUpdated",
"op" : "<=",
"defaultValue" : "2017-10-31T00:00:00Z",
"name" : "updatedDateTo"
},
{
"field" : "TimeUpdated",
"op" : ">",
"defaultValue" : "2017-10-06T00:00:00Z",
"name" : "updatedDateFrom"
}
]
}
|