文字列形式でリソースのスキーマを取得
get
/mftapp/rest/v1/metadata-catalog/{resource}
リソース・カタログを取得します。
リクエスト
パス・パラメータ
- resource: string
スキーマが要求されるリソースの名前
レスポンス
サポートされるメディア・タイプ
- application/json
200レスポンス
500レスポンス
問題が発生
ルート・スキーマ: Error information.
型:
objectタイトル:
ソースを表示
Error information。- errorCode(optional): string
Oracle Managed File Transferから返されるエラー・コード。
- errorKey(optional): string
Oracle Managed File Transferから返されるエラー・キー。
- errorMessage(optional): string
Oracle Managed File Transferから返されるエラーを説明するメッセージ。
レスポンスの例(application/json)
{
"errorCode":"MFT-5445",
"errorKey":"MFT_REST_UNABLE_TO_LIST_RESOURCES_CATALOG",
"errorMessage":"Unable to list the resources catalog of MFT RESTful services."
}
例
次のcURLの例は、cURLを使用してRESTリソースにGETリクエストを発行して、リソースのスキーマを取得する方法を示しています。
curl -i -X GET -u <username>:<password> -H "Content-Type: application/json" http://host:port/mftapp/rest/v1/metadata-catalog/sources
レスポンス本文の例: 200レスポンス
次の例では、メタデータ・カタログの正常終了したリクエストのレスポンス本文のコンテンツを示しています(JSON形式):
#%RAML 0.8
title: REST API for Application Metadata of Oracle Managed File Transfer
version: v1
securitySchemes:
- basicAuthentication:
description: |
Basic Authentication required
type: Basic Authentication
securedBy: [basicAuthentication]
schemas:
- source-xml: '{}'
- source: '{ "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "sources": { "type": "array", "description": "Sources discovered", "items":[ { "type":"object", "properties":{ "name":{ "description":"Name of the source.", "type":"string" }, "url":{ "description":"URL of the source.", "type":"string" }, "bindingType":{ "description":"Binding type of the source.", "type":"string" }, "eventInvokeUrl":{ "description":"URL at which to invoke the event.", "type":"string" } } } ] } } }'
- error-xml: '{}'
- error: '{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "title": "Error information.", "properties": { "errorCode": { "type": "string", "description": "The error code that Oracle Managed File Transfer returns." }, "errorKey": { "type": "string", "description": "The error key that Oracle Managed File Transfer returns." }, "errorMessage": { "type": "string", "description": "A message describing the error that Oracle Managed File Transfer returns." } } }'
/sources:
displayName: Sources
get:
description: Get available active sources. Gets the list of sources active in MFT based on the criteria like application type, binding type, etc. The response contains the list of sources with URLs.
queryParameters:
searchFilter:
displayName: search filter
description: Full/partial Name of source(s) to be discovered
type: string
required: false
example: file_src
application:
displayName: application type
description: Type of the application binding you want to discover
type: string
required: false
example: ODI
bindingType:
displayName: binding type
description: Binding type of source you want to discover
type: string
required: false
example: file
onlyEventEnabled:
displayName: only event enabled
description: Discover only event enabled sources
type: boolean
required: false
example: true
responses:
200:
body:
application/json:
schema: source
example: '{ "sources": [ { "name": "src1", "url": "/scratch/demo", "bindingType": "File", "eventInvokeUrl": "/mftapp/rest/v1/events" }, { "name": "src2", "url": "/scratch/username", "bindingType": "File", "eventInvokeUrl": "/mftapp/rest/v1/events" } ] }'
500:
description: Something went wrong
body:
application/json:
schema: error
example: '{ "errorCode":"MFT-5403" "errorKey":"MFT_WS_DISCOVERY_COULD_NOT_QUERY_MFT_SOURCES" "errorMessage":"Discovery service is unable to query MFT Sources for the given application ODI and search Filter file1." }'