{"base_path":"/","components":null,"consumes":"[\"application/json;charset=UTF-8\"]","definitions":{"Error":{"description":"接口返回异常信息","properties":{"error_code":{"description":"异常错误码","type":"string"},"error_msg":{"description":"异常错误描述","type":"string"}},"required":["error_code","error_msg"]},"UpdateScoreRequestModel":{"properties":{"message":{"description":"作品描述信息","example":"这是一条描述信息","maxLength":500,"minLength":1,"type":"string"},"score":{"description":"作品分数,作品状态为failed时传-1,计算长度时包括小数点,小数点后面最多保留四位","example":66.66,"format":"double","maximum":99999999999,"minimum":-1,"type":"number"},"status":{"description":"作品状态success|failed。判题时,需要对上传作品进行检查,当作品不符合要求时,应该返回failed,并将提示信息通过 message显示出来","enum":["success","failed"],"example":"success","maxLength":7,"minLength":6,"type":"string"},"works_id":{"description":"作品ID,大赛平台提供,可以通过接口[ListCompetitionWorks](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=CodeCraft&api=ListCompetitionWorks)查询作品ID","example":4056012,"format":"int32","maximum":2147483647,"minimum":1,"type":"integer"}},"required":["works_id","score","status"],"title":"UpdateScoreRequestModel","type":"object"}},"description":null,"group_id":"af68f2651886492cad04cddb8f2f3129","host":"codecraft.cn-north-4.myhuaweicloud.com","id":"cfb7eb7e335c413e88285855ebf7752f","info_version":"v5","method":"put","name":"UpdateCompetitionScore","parameters":{},"paths":{"/v5/competitions/scores":{"put":{"consumes":["application/json;charset=UTF-8"],"deprecated":false,"description":"针对在大赛平台提交作品的场景:第三方服务对作品完成判分后,根据作品ID调用该接口将作品分数、作品状态等信息返回给大赛平台","operationId":"UpdateCompetitionScore","parameters":[{"description":"第三方服务token,需要平台配置账号权限","in":"header","maxLength":99999,"minLength":1,"name":"x-auth-token","required":true,"type":"string","x-example":"MIIDkgYJKoZIhvIIDgzCCXXXXXX..."},{"description":"UpdateScoreRequestModel","in":"body","name":"UpdateCompetitionScoreRequestBody","required":true,"schema":{"$ref":"#/definitions/UpdateScoreRequestModel"}}],"produces":["application/json;charset=UTF-8"],"responses":{"200":{"description":"分数设置成功"},"400":{"description":"作品不存在","examples":{"application/json":{"error_code":"CC.0002","error_msg":"作品不存在"}},"schema":{"$ref":"#/definitions/Error"}},"403":{"description":"用户无权操作","examples":{"application/json":{"error_code":"CC.0001","error_msg":"用户无权操作"}},"schema":{"$ref":"#/definitions/Error"}},"500":{"description":"系统繁忙","examples":{"application/json":{"error_code":"CC.0011","error_msg":"系统繁忙"}},"schema":{"$ref":"#/definitions/Error"}}},"summary":"修改平台提交的作品分数(得分回调)","tags":["作品管理"],"x-apigateway-backend":{"httpEndpoints":{"address":"#address#","method":"PUT","path":"/CompetitionService/v5/competitions/scores","scheme":"https","timeout":30000}},"x-apigateway-cors":false,"x-apigateway-match-mode":"NORMAL","x-apigateway-request-type":"public","x-is-registered":"Y","x-name":"作品得分回调接口","x-request-examples-description-1":"请求成功示例,能够正常保存分数","x-request-examples-description-2":"请求失败示例,返回错误码error_code=CC.0002,作品不存在","x-request-examples-description-3":"请求失败示例,返回错误码error_code=CC.0003,作品已作废","x-request-examples-text-1":{"message":"对外接口测试用例","score":77.77,"status":"success","works_id":4056012},"x-request-examples-text-2":{"message":"测试对外接口","score":66.66,"status":"success","works_id":9999999},"x-request-examples-text-3":{"message":"测试对外接口","score":66.66,"status":"success","works_id":26880},"x-request-examples-url-1":"PUT https://{endpoint}/v5/competitions/scores","x-request-examples-url-2":"PUT https://{endpoint}/v5/competitions/scores","x-request-examples-url-3":"PUT https://{endpoint}/v5/competitions/scores","x-support-sdk":"Y","x-version":"v5"}}},"product_short":"CodeCraft","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"修改平台提交的作品分数(得分回调)","tags":"作品管理","uri":null,"version":"2.0"}