Data Source APIs Metadata Resource
This service allows for listing, download, and removal of Metadata data sources in the BA Platform.
Get the Metadata datasource IDs.
Example Request:
GET pentaho/plugin/data-access/api/datasource/metadata/domaincURL Example:
curl -X GET \
"http://localhost:8080/pentaho/plugin/data-access/api/datasource/metadata/domain" \
-H "Authorization: Basic YWRtaW46cGFzc3dvcmQ=" \
-H "Accept: application/json"Successfully retrieved the list of existing metadata IDs
List of metadata IDs in XML format
GET /data-access/api/datasource/metadata/domain HTTP/1.1
Host:
Authorization: Basic username:password
Accept: */*
Successfully retrieved the list of existing metadata IDs
<jaxbList>
<type>java.lang.String</type>
<item>steel-wheels</item>
<item>ba-pom</item>
<item>PDI Operations Mart Sample Reports/metadata.xmi</item>
<item>SampleData2</item>
</jaxbList>
Export a metadata datasource.
Example Request:
GET pentaho/plugin/data-access/api/datasource/metadata/domain/SampleData2cURL Example:
curl -X GET \
"http://localhost:8080/pentaho/plugin/data-access/api/datasource/metadata/domain/SampleData2" \
-H "Authorization: Basic YWRtaW46cGFzc3dvcmQ=" \
-H "Accept: application/octet-stream"The ID of the Metadata datasource to export
SampleData2Metadata datasource export succeeded
The metadata XMI file
User is not authorized to export the Metadata datasource
Failure to export Metadata datasource
GET /data-access/api/datasource/metadata/domain/{domainId} HTTP/1.1
Host:
Authorization: Basic username:password
Accept: */*
<?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'/>
</XMI.documentation>
</XMI.header>
<XMI.content>
<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>
Import a Metadata datasource.
Example Request:
PUT pentaho/plugin/data-access/api/datasource/metadata/domain/SampleDatacURL Example:
curl -X PUT \
"http://localhost:8080/pentaho/plugin/data-access/api/datasource/metadata/domain/SampleData" \
-H "Authorization: Basic YWRtaW46cGFzc3dvcmQ=" \
-H "Content-Type: multipart/form-data" \
-F "[email protected];type=text/xml" \
-F "domainId=SampleData2" \
-F "overwrite=true"Unique identifier for the metadata datasource
SampleDataDomain identifier for the metadata datasource
Input stream for the metadata.xmi file
User selected name for the file (FormDataContentDisposition)
List of locale files
List of FormDataContentDisposition for locale files
Flag for overwriting existing version of the file
falseAccess control list data
Indicates successful import
Success message
Import failed because publish is prohibited
Access Control Forbidden
Content already exists (use overwrite flag to force)
Metadata datasource import failed. Error code or message included in response entity
Unspecified general error has occurred
PUT /data-access/api/datasource/metadata/domain/{domainId} HTTP/1.1
Host:
Authorization: Basic username:password
Content-Type: multipart/form-data
Accept: */*
Content-Length: 515
"------WebKitFormBoundaryNLNb246RTFIn1elY\nContent-Disposition: form-data; name=\"metadataFile\"; filename=\"SampleData2.xmi\"\nContent-Type: text/xml\n\n<?xml version='1.0' encoding='UTF-8'?>\n<XMI xmi.version='1.2' xmlns:CWM='org.omg.xmi.namespace.CWM'...>\n------WebKitFormBoundaryNLNb246RTFIn1elY\nContent-Disposition: form-data; name=\"domainId\"\n\nSampleData2\n------WebKitFormBoundaryNLNb246RTFIn1elY\nContent-Disposition: form-data; name=\"overwrite\"\n\ntrue\n------WebKitFormBoundaryNLNb246RTFIn1elY--\n"textRemove the metadata for a given metadata ID.
Example Request:
DELETE pentaho/plugin/data-access/api/datasource/metadata/domain/SampleData2cURL Example:
curl -X DELETE \
"http://localhost:8080/pentaho/plugin/data-access/api/datasource/metadata/domain/SampleData2" \
-H "Authorization: Basic YWRtaW46cGFzc3dvcmQ="The ID of the Metadata datasource to remove
SampleData2Metadata datasource removed.
No content
User is not authorized to delete the Metadata datasource.
DELETE /data-access/api/datasource/metadata/domain/{domainId} HTTP/1.1
Host:
Authorization: Basic username:password
Accept: */*
No content
Was this helpful?

