MENU
      create

        create


        기사 요약

        VPC 환경에서 이용 가능합니다.

        AI 워크스페이스를 생성합니다.

        요청

        요청 파라미터

        파라미터명필수 여부타입제약 사항설명
        accountIdYESString최대 22자까지 입력- 계정 식별자 UUID(base62)
        - accountId는 Accounts의 getList API를 통해서 획득 가능
        nameYESString- 최대 15자까지 입력
        - 첫 글자는 영어소문자, 그 외에는 영어소문자 / 숫자 / 하이픈(-) 으로 구성
        - 하이픈은 연속해서 사용할 수 없고, 마지막 글자는 하이픈(-) 불가
        AI 워크스페이스 이름
        descriptionNOString최대 255자까지 입력AI 워크스페이스 설명
        configurationYESAiAppTypeSpecAiAppTypeSpec 데이터 타입
        - AI Workspaces의 getConfigurationList API를 통해서 참고 가능

        요청 헤더

        공통 가이드 참조

        요청 바디

        • 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"
          }
          JSON
        • 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>
          XML

        응답

        응답 바디

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

        오류코드

        DataForest 개요 참조

        예시

        요청 예시

        • 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"
          }
          HTTP
        • 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\"}"
          Bash

        응답 예시

        • HTTP

          HTTP StatusDescription
          200OK
        • BASH

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

        오류 코드 예시

        • BASH
          {
              "message": "invalid request parameter (configuration.docker.image, 'tensorflow/r2.3.1-py3'). \"^(dataforest/)?([a-z0-9._-]{1,30}):([a-z0-9._-]{1,20})$\"와 일치해야 합니다",
              "success": false
          }
          JSON

        이 문서가 도움이 되었습니까?

        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.