live_help Notes

assignment This action requires one of theses roles: Advanced staff
group_work Requires following application scopes: tig

settings Params

Param name Description
id required . Must be String

The requested id

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

The closed user

close[closer_id] optional . Must be Fixnum

The closer, defaults to the token owner if there is one

close[kind] optional . Must be one of: agu, other, deserter, black_hole, serious_misconduct, social_security, non_admitted, pace_unknown.

The close kind

close[reason] optional . Must be String

The reason of this close

close[end_at] optional , nil allowed . Must be DateTime

When the close will be end

close[community_services_attributes] optional , nil allowed . Must be an Array of nested elements

The linked community service(s)

close[community_services_attributes][duration] optional . Must be one of: 7200, 14400, 28800.

The community service duration in seconds. Must be 2 hours, 4 hours or 8 hours.

close[community_services_attributes][occupation] optional , nil allowed . Must be String

The community service occupation

DELETE /v2/closes/2
204
curl  -X DELETE -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/closes/2"
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

response = token.delete("/v2/closes/2")
response.status
# => 204
response.parsed
# =>