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
Key | Datatype | Required | Description |
---|---|---|---|
clearAlias | boolean | Clear the alias. Default value is false | |
clearFormat | boolean | Clear the formats. Default value is false | |
clearFilterSelection | boolean | Clear the filter selections. Default value is true. | |
offset | number | Starting point within the collection of returned results. Used to control paging behavior. | |
limit | number | Maximum number of items returned for a single request. Used to control paging behavior. Use -1 for no limit. | |
fields | string | Comma 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
Key | Datatype | Required | Description |
---|---|---|---|
X-MSTR-AuthToken | string | (Required) Authorization token | |
X-MSTR-ProjectID | string | (Required) Project ID | |
Content-Type | string |
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":{}}