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

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

The name.

group[color] optional . Must be String

The color.

group[kind] optional , nil allowed . Must be one of: important, normal, hidden.

The kind. Default to important.

PUT /v2/groups/1
{
  "group": {
    "color": "#ed5462",
    "kind": "important",
    "name": "tigers"
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"group":{"color":"#ed5462","kind":"important","name":"tigers"}}' "https://api.intra.42.fr/v2/groups/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 = {group: {color: "#ed5462", kind: "important", name: "tigers"}}
response = token.put("/v2/groups/1", params: params)
response.status
# => 204
response.parsed
# =>