create
    • PDF

    create

    • PDF

    Article summary

    Available in VPC

    Creates AI workspace.

    Requests

    Request parameters

    Parameter nameRequirement statusTypeRestrictionsDescription
    accountIdYESStringEnter up to 22 characters- Account identifier UUID (base62)
    - accountId can be acquired through Accounts' getList API
    nameYESString- Enter up to 15 characters
    - It should start with a lowercase English letter. For the rest, lowercase English letters, numbers, and hyphens (-) are allowed
    - You can't use hyphens consecutively and it must not end with a hyphen
    AI workspace name
    descriptionNOStringEnter up to 255 charactersAI workspace description
    configurationYESAiAppTypeSpecAiAppTypeSpec data type
    - It can be referred to through AI Workspaces’ getConfigurationList API

    Request headers

    See common guide

    Request bodies

    • JSON
        {
            "accountId": "string",
            "configuration": {
                "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"
                },
                "name": "string",
                "queueName": "gpu",
                "resource": {
                "cpuCount": 0,
                "gpuCount": 0,
                "gpuModel": "T4",
                "memoryMb": 0
                },
                "userPackageUri": "string"
            },
            "description": "string",
            "name": "string"
        }
      
    • XML
        <?xml version="1.0" encoding="UTF-8"?>
        <CreateAiWorkspaceRequest>
            <accountId>string</accountId>
            <configuration>
                <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>
                <name>string</name>
                <queueName>gpu</queueName>
                <resource>
                    <cpuCount>0</cpuCount>
                    <gpuCount>0</gpuCount>
                    <gpuModel>T4</gpuModel>
                    <memoryMb>0</memoryMb>
                </resource>
                <userPackageUri>string</userPackageUri>
            </configuration>
            <description>string</description>
            <name>string</name>
        </CreateAiWorkspaceRequest>
      

    Responses

    Response bodies

    • JSON
        {
            "id": "string",
            "message": "string",
            "success": true
        }
      
    • XML
        <?xml version="1.0" encoding="UTF-8"?>
        <CreateAiWorkspaceResponse>
            <id>string</id>
            <message>string</message>
            <success>true</success>
        </CreateAiWorkspaceResponse>
      

    Error codes

    See DataForest overview

    Examples

    Request examples

    • HTTP
      POST https://df.apigw.ntruss.com/api/v2/aiworkspaces/create
      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
      
      {
          "accountId": "6COytUeFj7b8eOhq2L5zL",
          "configuration": {
          "data": {
          "input": [
              {
          "hdfs": "string",
          "path": "string"
              }
          ],
          "output": [
              {
          "hdfs": "string",
          "overwrite": true,
          "path": "string"
              }
          ]
         },
          "docker": {
              "command": "ls",
              "image": "tensorflow:r2.3.1-py3",
              "workdir": "/root/"
          },
          "name": "test",
          "queueName": "gpu",
          "resource": {
          "cpuCount": 1,
          "gpuCount": 1,
          "gpuModel": "T4",
          "memoryMb": 1024
          },
          "userPackageUri": "string"
      },
          "description":"test",
          "name": "api-test"
      }
      
    • BASH
      curl -X POST "https://df.apigw.ntruss.com/api/v2/aiworkspaces/create"
      -H "accept: application/json" 
      -H "Content-Type: application/json"
      -H "x-ncp-iam-access-key: F5O55GOTR4CqYJqPDnCu" 
      -H "x-ncp-apigw-timestamp: 1685670008615" 
      -H "x-ncp-apigw-signature-v2: uirGHd38qFol18U2cS+oM8USE9GAvOqBoixLrUv8ePw=" 
      -d "{ \"accountId\": \"2mUVZaHseGadiNFAg5MHjk\", \"configuration\": { \"data\": {\"input\": [\{\"hdfs\": \"string\",\"path\": \"string\"\}\],\"output\": [\{\"hdfs\": \"string\",\"overwrite\": true,\"path\": \"string\"\}\] }, \"docker\": {\"command\": \"ls\",\"image\": \"tensorflow:r2.3.1-py3\",\"workdir\": \"/root/\" }, \"name\": \"test\", \"queueName\": \"gpu\", \"resource\": {\"cpuCount\": 1,\"gpuCount\": 1,\"gpuModel\": \"T4\",\"memoryMb\": 1024 }, \"userPackageUri\": \"string\" },\t\"description\":\"test\", \"name\": \"api-test\"}"
      

    Response examples

    • HTTP

      HTTP StatusDescription
      200OK
    • BASH

      {
      "success": true,
      "id": "YPIolVXWcPTcCs9dNi89Gn"
      }
      

    Error codes examples

    • BASH
      {
          "message": "invalid request parameter (configuration.docker.image, 'tensorflow/r2.3.1-py3'). Must match \"^(dataforest/)?([a-z0-9._-]{1,30}):([a-z0-9._-]{1,20})$\"",
          "success": false
      }
      

    Was this article helpful?

    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.