live_help Notes

assignment_ind This action requires a token resource owner or an application with one of theses role(s): Notes manager, Advanced notes manager .

settings Params

Param name Description
id required . Must be String

The requested id

note optional , nil allowed . Must be a Hash
note[user_id] optional . Must be Fixnum

The user who receives the note.

note[subject] optional , nil allowed . Must be String

The subject.

note[content] optional , nil allowed . Must be String

The content.

note[kind] optional , nil allowed . Must be one of: manual, black_hole, school_record.

The kind.

note[approved_at] optional , nil allowed . Must be DateTime

Must be an Advanced Note manager to create or edit this field.

note[approver_id] optional , nil allowed . Must be Fixnum

The id of the user approving the note. Must be an Advanced Note manager to create or edit this field.

PUT /v2/notes/9
{
  "note": {
    "content": "waistcoat sartorial cornhole dreamcatcher pop-up scenester cleanse hammock shoreditch pug iPhone freegan",
    "subject": "swag",
    "user_id": "109"
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"note":{"content":"waistcoat sartorial cornhole dreamcatcher pop-up scenester cleanse hammock shoreditch pug iPhone freegan","subject":"swag","user_id":"109"}}' "https://api.intra.42.fr/v2/notes/9"
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 = {note: {content: "waistcoat sartorial cornhole dreamcatcher pop-up scenester cleanse hammock shoreditch pug iPhone freegan", subject: "swag", user_id: "109"}}
response = token.put("/v2/notes/9", params: params)
response.status
# => 204
response.parsed
# =>