Skip to main content

Pentaho+ documentation has moved!

The new product documentation portal is here. Check it out now at docs.hitachivantara.com

 

Hitachi Vantara Lumada and Pentaho Documentation

Metadata Resource

Overview

This service allows for listing, download, and removal of Metadata data sources in the BA Platform.

Overview

This service allows for listing, download, and removal of Metadata data sources in the BA Platform.

The following resources are applicable:

/data-access/api/datasource/metadata/domain

GET

Get the Metadata datasource IDs.

Example Request:
GET pentaho/plugin/data-access/api/datasource/metadata/domain

Response Body

element: List
media types: application/xml
application/json

JaxbList<string> of Metadata datasource IDs.

Example Response:

{"Item":[{"@type":"xs:string","$":"steel-wheels"},{"@type":"xs:string","$":"ba-pom"},{"@type":"xs:string","$":"PDI Operations Mart Sample Reports/metadata.xmi"},{"@type":"xs:string","$":"SampleData2"}]}

Status Codes

code description
200 Successfully retrieved the list of existing metadata IDs

/data-access/api/datasource/metadata/domain/{domainId }

The following operations are supported on this resource:

GET

Export a metadata datasource.

Example Request:
GET pentaho/plugin/data-access/api/datasource/metadata/domain/SampleData2

Parameters

name description type
domainId The id of the Metadata datasource to export path

Response Body

element: (custom)
media types: */*
application/xml
application/octet-stream

A Response object containing the metadata xmi file.

Example Response:

<?xml version = '1.0' encoding = 'UTF-8' ?>    <XMI xmi.version = '1.2' xmlns:CWM = 'org.omg.xmi.namespace.CWM' xmlns:CWMTFM = 'org.omg.xmi.namespace.CWMTFM'  xmlns:CWMMDB = 'org.omg.xmi.namespace.CWMMDB' xmlns:CWMRDB = 'org.omg.xmi.namespace.CWMRDB'  xmlns:CWMOLAP = 'org.omg.xmi.namespace.CWMOLAP' timestamp = 'Thu Jul 25 15:04:46 EDT 2013'>
<XMI.header>    <XMI.documentation>      <XMI.exporter>Netbeans XMI Writer</XMI.exporter>  
<**SOME OUTPUT OMITTED**>
<CWM:TaggedValue xmi.id = 'a1781' tag = 'LOCALE_IS_DEFAULT' value = 'Y'/>      </CWM:ModelElement.taggedValue>    </CWM:Parameter>    <CWM:Parameter xmi.id = 'a1782' name = 'es'>      <CWM:ModelElement.taggedValue>        <CWM:TaggedValue xmi.id = 'a1783' tag = 'LOCALE_DESCRIPTION' value = 'Spanish'/>        <CWM:TaggedValue xmi.id = 'a1784' tag = 'LOCALE_ORDER' value = '2'/>        <CWM:TaggedValue xmi.id = 'a1785' tag = 'LOCALE_IS_DEFAULT' value = 'N'/>      </CWM:ModelElement.taggedValue>    </CWM:Parameter>  </XMI.content></XMI>

Status Codes

code description
200 Metadata datasource export succeeded.
401 User is not authorized to export Metadata datasource.
500 Failure to export Metadata datasource.

DELETE

Remove the metadata for a given metadata ID.

Example Request:
DELETE pentaho/plugin/data-access/api/datasource/metadata/domain/SampleData2

Parameters

name description type
domainId The id of the Metadata datasource to remove path

Response Body

element: (custom)
media types: */*
application/xml
application/octet-stream

A 200 response code representing the successful removal of the Metadata datasource.

Example Response:

This response does not contain data.

Status Codes

code description
200 Metadata datasource removed.
401 User is not authorized to delete the Metadata datasource.

PUT

Import a Metadata datasource.

Example Request:
PUT pentaho/plugin/data-access/api/datasource/metadata/domain/SampleData
PUT data:

<?xml version = '1.0' encoding = 'UTF-8' ?><XMI xmi.version = '1.2' xmlns:CWM = 'org.omg.xmi.namespace.CWM' xmlns:CWMTFM = 'org.omg.xmi.namespace.CWMTFM'  xmlns:CWMMDB = 'org.omg.xmi.namespace.CWMMDB' xmlns:CWMRDB = 'org.omg.xmi.namespace.CWMRDB'  xmlns:CWMOLAP = 'org.omg.xmi.namespace.CWMOLAP' timestamp = 'Thu Jul 25 15:04:46 EDT 2013'>  <XMI.header>    <XMI.documentation>      <XMI.exporter>Netbeans XMI Writer</XMI.exporter>      <XMI.exporterVersion>1.0</XMI.exporterVersion>    </XMI.documentation>  </XMI.header>  <XMI.content>   
<**SOME OUTPUT OMITTED**>
<CWM:TaggedValue xmi.id = 'a1779' tag = 'LOCALE_DESCRIPTION' value = 'English (American)'/>        <CWM:TaggedValue xmi.id = 'a1780' tag = 'LOCALE_ORDER' value = '1'/>        <CWM:TaggedValue xmi.id = 'a1781' tag = 'LOCALE_IS_DEFAULT' value = 'Y'/>      </CWM:ModelElement.taggedValue>    </CWM:Parameter>    <CWM:Parameter xmi.id = 'a1782' name = 'es'>      <CWM:ModelElement.taggedValue>        <CWM:TaggedValue xmi.id = 'a1783' tag = 'LOCALE_DESCRIPTION' value = 'Spanish'/>        <CWM:TaggedValue xmi.id = 'a1784' tag = 'LOCALE_ORDER' value = '2'/>        <CWM:TaggedValue xmi.id = 'a1785' tag = 'LOCALE_IS_DEFAULT' value = 'N'/>      </CWM:ModelElement.taggedValue>    </CWM:Parameter>  </XMI.content></XMI>

Parameters

name description type
domainId Unique identifier for the metadata datasource path
metadataFile Input stream for the metadata.xmi formdata
metadataFileInfo User selected name for the file formdata
overwrite Flag for overwriting existing version of the file formdata
localeFiles List of local files formdata
localeFilesInfo List of information for each local file formdata

Response Body

element: (custom)
media types: text/plain

Text response containing the status of the call.

Example Response:

200

Status Codes

code description
409 Content already exists (use overwrite flag to force)
401 Import failed because publish is prohibited
500 Unspecified general error has occurred
412 Metadata datasource import failed. Error code or message included in response entity
403 Access Control Forbidden
201 Indicates successful import

Copyright © Pentaho.com