Data Source APIs Metadata Resource

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

Get Metadata datasource IDs

get

Get the Metadata datasource IDs.

Example Request:

GET pentaho/plugin/data-access/api/datasource/metadata/domain

cURL Example:

curl -X GET \
  "http://localhost:8080/pentaho/plugin/data-access/api/datasource/metadata/domain" \
  -H "Authorization: Basic YWRtaW46cGFzc3dvcmQ=" \
  -H "Accept: application/json"
Authorizations
Responses
200

Successfully retrieved the list of existing metadata IDs

Responseobject

List of metadata IDs in XML format

get
/data-access/api/datasource/metadata/domain
GET /data-access/api/datasource/metadata/domain HTTP/1.1
Host: 
Authorization: Basic username:password
Accept: */*
200

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

get

Export a metadata datasource.

Example Request:

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

cURL 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"
Authorizations
Path parameters
domainIdstringRequired

The ID of the Metadata datasource to export

Example: SampleData2
Responses
200

Metadata datasource export succeeded

application/octet-stream
Responsestring · binary

The metadata XMI file

get
/data-access/api/datasource/metadata/domain/{domainId}
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

put

Import a Metadata datasource.

Example Request:

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

cURL 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"
Authorizations
Path parameters
domainIdstringRequired

Unique identifier for the metadata datasource

Example: SampleData
Body
domainIdstringOptional

Domain identifier for the metadata datasource

metadataFilestring · binaryOptional

Input stream for the metadata.xmi file

metadataFileInfostringOptional

User selected name for the file (FormDataContentDisposition)

localeFilesstring · binary[]Optional

List of locale files

localeFilesInfostring[]Optional

List of FormDataContentDisposition for locale files

overwritebooleanOptional

Flag for overwriting existing version of the file

Default: false
aclstringOptional

Access control list data

Responses
201

Indicates successful import

text/plain
Responsestring

Success message

put
/data-access/api/datasource/metadata/domain/{domainId}
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"
text

Remove metadata datasource

delete

Remove the metadata for a given metadata ID.

Example Request:

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

cURL Example:

curl -X DELETE \
  "http://localhost:8080/pentaho/plugin/data-access/api/datasource/metadata/domain/SampleData2" \
  -H "Authorization: Basic YWRtaW46cGFzc3dvcmQ="
Authorizations
Path parameters
domainIdstringRequired

The ID of the Metadata datasource to remove

Example: SampleData2
Responses
200

Metadata datasource removed.

No content

delete
/data-access/api/datasource/metadata/domain/{domainId}
DELETE /data-access/api/datasource/metadata/domain/{domainId} HTTP/1.1
Host: 
Authorization: Basic username:password
Accept: */*

No content

Was this helpful?