live_help Notes

assignment This action requires one of theses roles: Advanced tutor

settings Params

Param name Description
id required . Must be String

The requested id

scale optional , nil allowed . Must be a Hash
scale[name] optional . Must be String

The name. Must be unique in the scope of a given evaluation.

scale[lg] optional , nil allowed . Must be String

The language id.

scale[is_primary] optional , nil allowed . Must be one of: true, false.

Is it is primary ? Default to false.

scale[is_external] optional , nil allowed . Must be one of: true, false.

Is it is external ? Default to false.

scale[manual_subscription] optional , nil allowed . Must be one of: true, false.

Is it manual subscription ? Default to false.

scale[comment] optional , nil allowed . Must be String

The comment.

scale[introduction_md] optional , nil allowed . Must be String

The introduction md.

scale[disclaimer_md] optional , nil allowed . Must be String

The disclaimer md.

scale[guidelines_md] optional . Must be String

The guidelines md.

scale[correction_number] optional . Must be Fixnum

The correction number.

scale[duration] optional . Must be Fixnum

The duration.

scale[evaluation_id] optional , nil allowed . Must be Fixnum

The evaluation id.

scale[flag_ids] optional , nil allowed . Must be an array of Integer

The flag ids.

scale[attachments_attributes] optional , nil allowed . Must be an Array of nested elements

The attachments attributes.

scale[attachments_attributes][id] optional , nil allowed . Must be Fixnum

The id.

scale[attachments_attributes][kind] optional , nil allowed . Must be one of: code, pdf, link, document, video.

The kind.

scale[attachments_attributes][language_id] optional . Must be Fixnum

The language id.

scale[attachments_attributes][_destroy] optional , nil allowed . Must be String

The destroy.

scale[attachments_attributes][untranslatable] optional , nil allowed . Must be one of: true, false.

Is it untranslatable ? Default to false.

scale[attachments_attributes][attachable_attributes] optional , nil allowed . Must be an Array of nested elements

The attachable attributes.

scale[sections_attributes] optional , nil allowed . Must be an Array of nested elements

The sections attributes.

scale[sections_attributes][id] optional , nil allowed . Must be Fixnum

The id.

scale[sections_attributes][description] optional , nil allowed . Must be String

The description.

scale[sections_attributes][questions_attributes] optional , nil allowed . Must be an Array of nested elements

The questions attributes.

scale[sections_attributes][questions_attributes][id] optional , nil allowed . Must be Fixnum

The id.

scale[sections_attributes][questions_attributes][name] optional . Must be String

The name. Must be unique in the scope of a given section.

scale[sections_attributes][questions_attributes][kind] optional . Must be one of: standard, bonus.

The kind.

scale[sections_attributes][questions_attributes][rating] optional . Must be one of: bool, multi, text.

The rating.

scale[sections_attributes][questions_attributes][guidelines] optional . Must be String

The guidelines.

scale[sections_attributes][questions_attributes][_destroy] optional , nil allowed . Must be String

The destroy.

scale[sections_attributes][questions_attributes][questions_skills_attributes] optional , nil allowed . Must be an Array of nested elements

The questions skills attributes.

scale[sections_attributes][questions_attributes][questions_skills_attributes][id] optional , nil allowed . Must be Fixnum

The id.

scale[sections_attributes][questions_attributes][questions_skills_attributes][skill_id] optional . Must be Fixnum

The skill id.

scale[sections_attributes][questions_attributes][questions_skills_attributes][percentage] optional . Must be Fixnum

The percentage.

scale[sections_attributes][questions_attributes][questions_skills_attributes][_destroy] optional , nil allowed . Must be String

The destroy.

scale[sections_attributes][name] optional . Must be String

The name. Must be unique in the scope of a given scalable.

scale[sections_attributes][_destroy] optional , nil allowed . Must be String

The destroy.

comments powered by <span class='logo-disqus'>Disqus</span>
PUT /v2/scales/1
{
  "scale": {
    "comment": "Ut magnam migas everyday eaque. Shoreditch fingerstache est voluptatem est kogi readymade.",
    "disclaimer_md": "Et sed quas kitsch. Aspernatur temporibus reiciendis. Consequatur aut humblebrag libero et quam temporibus. Qui rerum autem distillery pinterest enim aspernatur mumblecore. Kitsch goth saepe tempora butcher vhs organic quam.",
    "guidelines_md": "Incidunt et you probably haven't heard of them master inventore et +1. Vel eum libero messenger bag non freegan sartorial. Raw denim optio qui est. Quia post-ironic possimus chicharrones.",
    "introduction_md": "Etsy soluta chia amet knausgaard hic kitsch portland. Rerum vegan sapiente odit aesthetic poutine five dollar toast. Dolor aliquid tofu. Similique libero drinking."
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"scale":{"comment":"Ut magnam migas everyday eaque. Shoreditch fingerstache est voluptatem est kogi readymade.","disclaimer_md":"Et sed quas kitsch. Aspernatur temporibus reiciendis. Consequatur aut humblebrag libero et quam temporibus. Qui rerum autem distillery pinterest enim aspernatur mumblecore. Kitsch goth saepe tempora butcher vhs organic quam.","guidelines_md":"Incidunt et you probably haven't heard of them master inventore et +1. Vel eum libero messenger bag non freegan sartorial. Raw denim optio qui est. Quia post-ironic possimus chicharrones.","introduction_md":"Etsy soluta chia amet knausgaard hic kitsch portland. Rerum vegan sapiente odit aesthetic poutine five dollar toast. Dolor aliquid tofu. Similique libero drinking."}}' "https://api.intra.42.fr/v2/scales/1"
require "oauth2"
UID = "Your application uid"
SECRET = "Your application secret"
client = OAuth2::Client.new(UID, SECRET, site: "https://api.intra.42.fr")
token = client.client_credentials.get_token

params = {scale: {comment: "Ut magnam migas everyday eaque. Shoreditch fingerstache est voluptatem est kogi readymade.", disclaimer_md: "Et sed quas kitsch. Aspernatur temporibus reiciendis. Consequatur aut humblebrag libero et quam temporibus. Qui rerum autem distillery pinterest enim aspernatur mumblecore. Kitsch goth saepe tempora butcher vhs organic quam.", guidelines_md: "Incidunt et you probably haven't heard of them master inventore et +1. Vel eum libero messenger bag non freegan sartorial. Raw denim optio qui est. Quia post-ironic possimus chicharrones.", introduction_md: "Etsy soluta chia amet knausgaard hic kitsch portland. Rerum vegan sapiente odit aesthetic poutine five dollar toast. Dolor aliquid tofu. Similique libero drinking."}}
response = token.put("/v2/scales/1", params: params)
response.status
# => 204
response.parsed
# =>