submit
    • PDF

    submit

    • PDF

    記事の要約

    VPC環境で利用できます。

    AIアプリを実行します。

    リクエスト

    リクエストパラメータ

    パラメータ名要否タイプ制約事項説明
    aiWorkspaceIdYESString最大22文字まで入力- AIワークスペース識別子の UUID(base62)
    - aiWorkspaceIdは AI Workspacesの getList APIを通じて取得可能
    namePrefixYESString最小2文字から最大8文字まで入力AIアプリ名の設定時に必要な接頭辞
    queueNameYESString- YARNキュー名
    - デフォルト値: gpu
    dataYESAiAppDataAiAppDataのデータタイプ
    dockerYESAiAppDockerAiAppDockerのデータタイプ
    resourceYESAiAppResourceAiAppResourceのデータタイプ

    リクエストヘッダ

    共通ガイド参照

    リクエストボディ

    • JSON
        {
            "aiWorkspaceId": "string",
            "data": {
                "input": [
                {
                    "hdfs": "string",
                    "path": "string"
                }
                ],
                "output": [
                {
                    "hdfs": "string",
                    "overwrite": true,
                    "path": "string"
                }
                ]
            },
            "docker": {
                "args": "string",
                "command": "string",
                "env": {
                "additionalProp1": "string",
                "additionalProp2": "string",
                "additionalProp3": "string"
                },
                "exposeTcpPorts": [
                0
                ],
                "image": "string",
                "workdir": "string"
            },
            "namePrefix": "string",
            "queueName": "gpu",
            "resource": {
                "cpuCount": 0,
                "gpuCount": 0,
                "gpuModel": "T4",
                "memoryMb": 0
            }
        }
      
    • XML
        <?xml version="1.0" encoding="UTF-8"?>
        <SubmitAiAppRequest>
            <aiWorkspaceId>string</aiWorkspaceId>
            <data>
                <input>
                    <hdfs>string</hdfs>
                    <path>string</path>
                </input>
                <output>
                    <hdfs>string</hdfs>
                    <overwrite>true</overwrite>
                    <path>string</path>
                </output>
            </data>
            <docker>
                <args>string</args>
                <command>string</command>
                <env>
                    <additionalProp>string</additionalProp>
                </env>
                <exposeTcpPorts>0</exposeTcpPorts>
                <image>string</image>
                <workdir>string</workdir>
            </docker>
            <namePrefix>string</namePrefix>
            <queueName>gpu</queueName>
            <resource>
                <cpuCount>0</cpuCount>
                <gpuCount>0</gpuCount>
                <gpuModel>T4</gpuModel>
                <memoryMb>0</memoryMb>
            </resource>
        </SubmitAiAppRequest>
      

    レスポンス

    レスポンスボディ

    SubmitAiAppResponse

    • JSON
        {
            "accountName": "string",
            "elapsedMillis": 0,
            "finalStatus": "string",
            "finishedAt": "2023-05-17T01:14:15.647Z",
            "id": "string",
            "message": "string",
            "name": "string",
            "queueName": "gpu",
            "startedAt": "2023-05-17T01:14:15.647Z",
            "state": "string",
            "success": true
        }
      
    • XML
        <?xml version="1.0" encoding="UTF-8"?>
        <SubmitAiAppResponse>
            <accountName>string</accountName>
            <elapsedMillis>0</elapsedMillis>
            <finalStatus>string</finalStatus>
            <finishedAt>2023-05-17T01:17:12.603Z</finishedAt>
            <id>string</id>
            <message>string</message>
            <name>string</name>
            <queueName>gpu</queueName>
            <startedAt>2023-05-17T01:17:12.603Z</startedAt>
            <state>string</state>
            <success>true</success>
        </SubmitAiAppResponse>
      

    エラーコード

    DataForest概要参照

    リクエスト例

    POST https://df.apigw.ntruss.com/api/v2/aiapps/submit
    HOST: df.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-signature-v2: Azm1WBMWDgEONUCUbsVkB4tRIpc053uOHU8bitbQRtU=
    x-ncp-apigw-timestamp: 1658898041497
    x-ncp-iam-access-key: 17F9A6E9F72BD92ED94B
    
    {
      "aiWorkspaceId": "6ZKSGoSJMMwctK257nxgiL",
      "data": {
        "input": [
          {
            "hdfs": "/user/<アカウント-名>/data_in",
            "path": "data_in"
          }
        ],
        "output": [
          {
            "hdfs": "/user/<アカウント-名>/data_out",
            "overwrite": false,
            "path": "data_out"
          }
        ]
      },
      "docker": {
        "command": "<実行するスクリプトまたはコマンド>",
        "image": "<Docker画像>:<Docker画像バージョン>",
        "workdir": "<AIワークスペース-名>"
      },
      "namePrefix": "****",
      "queueName": "gpu",
      "resource": {
        "cpuCount": 1,
        "gpuCount": 1,
        "gpuModel": "<GPU-モデル>",
        "memoryMb": integer
      }
    }
    
    curl -X POST "https://df.apigw.ntruss.com/api/v2/aiapps/submit" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "x-ncp-apigw-timestamp:1505290625682" \
    -H "x-ncp-iam-access-key:D78BB444D6D3C84CA38A" \
    -H "x-ncp-apigw-signature-v2:WTPItrmMIfLUk/UyUIyoQbA/z5hq9o3G8eQMolUzTEo=" \
    -d "{ \"aiWorkspaceId\": \"6ZKSGoSJMMwctK257nxgiL\", \"data\": { \"input\": [ { \"hdfs\": \"/user/<アカウント-名>/data_in\", \"path\": \"data_in\" } ], \"output\": [ { \"hdfs\": \"/user/<アカウント-名>/data_out\", \"overwrite\": false, \"path\": \"data_out\" } ] }, \"docker\": { \"args\": \"string\", \"command\": \"<実行するスクリプトまたはコマンド>\", \"env\": {  }, \"exposeTcpPorts\": [ 0 ], \"image\": \"<Docker画像>:<Docker画像バージョン>\", \"workdir\": \"<AIワークスペース-名>\" }, \"namePrefix\": \"****\", \"queueName\": \"gpu\", \"resource\": { \"cpuCount\": 1, \"gpuCount\": 1, \"gpuModel\": \"<GPU-モデル>\", \"memoryMb\": integer }}" \
    

    レスポンス例

    • HTTP

      HTTP StatusDescription
      200OK
    • BASH

      {
          "success": true,
          "id": "dN2vdAwrCMZdUzGKKiFy6Z",
          "accountName": "<アカウント-名>",
          "name": "****-cvbp-1zqz",
          "queueName": "gpu",
          "startedAt": "2022-08-01T11:08:33.086+09:00",
          "finishedAt": "1970-01-01T09:00:00+09:00",
          "elapsedMillis": integer,
          "state": "ACCEPTED",
          "finalStatus": "UNDEFINED"
      }
      

    この記事は役に立ちましたか?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.