云服务器内容精选

  • 请求示例 创建一个地域在北京,用户名为“name”,邮箱为“email@codeartssnap.com”,组织为“huawei”的用户。 POST https://{endpoint}/v2/aims/codemodelserver/join-request { "region" : "北京", "name" : "name", "email" : "email@codeartssnap.com", "organization" : "huawei", "phone_number" : "13666666666", "invitation_code" : "gouliguojiashengsiyi" }
  • 请求参数 表1 请求Header参数 参数 是否必选 参数类型 描述 x-auth-token 是 String iam x-auth-token 表2 请求Body参数 参数 是否必选 参数类型 描述 region 否 String the region of user name 否 String the name of user email 否 String the email of user organization 否 String the organization of user phone_number 否 String the phone_number of user invitation_code 否 String the invitation_code
  • 响应示例 状态码: 200 Successful Response { "tasks" : [ { "request_id" : "d980c2b5242eb97aa07a1f6645a6793a", "task_id" : 0, "language" : "python", "snippet" : "def add(x, y):\n return x + y", "generated_snippet" : "", "docker_id" : "02:55:ac:10:00:36", "start_time" : "2022-11-21T19:48:30", "record_time" : "2022-11-21T19:48:30", "time_consuming" : 0.022447, "status" : "success", "exception" : null, "model_id" : "300M" } ], "request_status" : "completed", "request_type" : "function"}
  • 响应参数 状态码: 200 表2 响应Body参数 参数 参数类型 描述 request_status String the status of the request 枚举值: created dispatched completed timeout unknown tasks Array of TaskModel objects task list request_type String the type of the request 表3 TaskModel 参数 参数类型 描述 docker_id String the docker_id exception String exception generated_snippet String the generated_snippet language String code language model_id String model_id record_time String record_time request_id String the unique id of request snippet String the snippet of code start_time String start_time status String status task_id Integer task_id time_consuming Number the time_consuming