Replace datasource and either remove or replace attributes and metrics on report instance.

PUT {{baseUrl}}/api/reports/:reportId/instances/:instanceId/dataset?clearAlias=true&clearFormat=true&clearFilterSelection=true&offset=0&limit=1000&fields=Excepteur Lorem

Replace datasource and either remove or replace attributes and metrics on report instance. You obtain the authorization token needed to execute the request using POST /auth/login; you obtain the project ID using GET /projects. You pass the authorization token and the project ID in the request header. You specify the report ID in the path of the request.

Request Params

KeyDatatypeRequiredDescription
clearAliasbooleanClear the alias. Default value is false
clearFormatbooleanClear the formats. Default value is false
clearFilterSelectionbooleanClear the filter selections. Default value is true.
offsetnumberStarting point within the collection of returned results. Used to control paging behavior.
limitnumberMaximum number of items returned for a single request. Used to control paging behavior. Use -1 for no limit.
fieldsstringComma separated top-level field whitelist. This allows client to selectively retrieve part of the response model. If specified, extra filtering will be applied, and for top-level object (if root model is an array, each array element), only the listed fields will be kept in the response. e.g. "id,elements" means to keep only the "id" field and the whole "elements" array field, omitting all other fields of top-level response model.

Request Body

{"source"=>{"sourceId"=>"sit consequat Excepteur", "targetId"=>"sed officia"}, "replacedTemplateUnits"=>[{"sourceId"=>"elit tempor", "targetId"=>"ut sed labore tempor", "sourceType"=>"customgroup", "targetType"=>"customgroup"}, {"sourceId"=>"anim dolore", "targetId"=>"reprehenderit Duis", "sourceType"=>"customgroup", "targetType"=>"attribute"}], "replacedMetrics"=>[{"sourceId"=>"anim culpa non", "targetId"=>"laboris in labore adipisicing"}, {"sourceId"=>"ut voluptate deserunt mollit est", "targetId"=>"id et exercitation"}], "removedObjects"=>[{"id"=>"s"}, {"id"=>"Ut ex"}]}

HEADERS

KeyDatatypeRequiredDescription
X-MSTR-AuthTokenstring(Required) Authorization token
X-MSTR-ProjectIDstring(Required) Project ID
Content-Typestring

RESPONSES

status: OK

{"id":"quis culpa qui","name":"in nostrud adipisicing ullamco","status":11973322,"instanceId":"magna officia pariatur dolor","source":{"id":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"name":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"cacheId":"ut Duis do","result":{}}