{ "docs": { "name": "42 Api", "info": "\n

This is the second version of the 42\u2018s API.

\n", "copyright": "", "doc_url": "/apidoc/2.0", "api_url": "/api", "base_url": "https://api.intra.42.fr/v2", "resources": { "attachments": { "doc_url": "/apidoc/2.0/attachments", "api_url": "/api", "name": "Attachments", "short_description": "All data which can be linked, like videos, pdfs, or links.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/attachments/index", "name": "index", "apis": [ { "api_url": "/v2/project_sessions/:project_session_id/attachments", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects/:project_id/attachments", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/attachments", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_session_id", "full_name": "project_session_id", "description": "\n

The project_session id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_id", "full_name": "project_id", "description": "\n

The project id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id asc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, attachable_id, attachable_type, kind, created_at, updated_at, language_id, user_id, default, up_to_date, container_id, container_type, base_id, untranslatable, attachments_structure_id.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "asc" }, "keys": [ "id", "attachable_id", "attachable_type", "kind", "created_at", "updated_at", "language_id", "user_id", "default", "up_to_date", "container_id", "container_type", "base_id", "untranslatable", "attachments_structure_id" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, attachable_id, attachable_type, kind, created_at, updated_at, language_id, user_id, default, up_to_date, container_id, container_type, base_id, untranslatable, attachments_structure_id.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "attachable_id", "attachable_type", "kind", "created_at", "updated_at", "language_id", "user_id", "default", "up_to_date", "container_id", "container_type", "base_id", "untranslatable", "attachments_structure_id" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, attachable_id, attachable_type, kind, created_at, updated_at, language_id, user_id, default, up_to_date, container_id, container_type, base_id, untranslatable, attachments_structure_id.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "attachable_id", "attachable_type", "kind", "created_at", "updated_at", "language_id", "user_id", "default", "up_to_date", "container_id", "container_type", "base_id", "untranslatable", "attachments_structure_id" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/projects/4/attachments", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/attachments/show", "name": "show", "apis": [ { "api_url": "/v2/project_sessions/:project_session_id/attachments/:id", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/attachments/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_session_id", "full_name": "project_session_id", "description": "\n

The project_session id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/attachments/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 1, "name": "New Jersey zombies", "pdf": { "pdf": { "url": null, "thumb": { "url": null } } }, "page_count": 1, "created_at": "2017-11-22T13:41:25.981Z", "pdf_processing": true, "slug": "new-jersey-zombies", "url": null, "thumb_url": null, "base_id": 1, "language": { "id": 3, "name": "Romanian", "identifier": "ro" }, "type": "Pdf" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/attachments/create", "name": "create", "apis": [ { "api_url": "/v2/projects/:project_id/attachments", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_id", "full_name": "project_id", "description": "\n

The project id or slug

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "attachment", "full_name": "attachment", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "kind", "full_name": "attachment[kind]", "description": "\n

The kind of the attachment

\n", "required": true, "allow_nil": false, "validator": "Must be one of: code, pdf, link, document, video.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language_id", "full_name": "attachment[language_id]", "description": "\n

The attachment language

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "untranslatable", "full_name": "attachment[untranslatable]", "description": "\n

Is this attachment untranslatable

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "attachable_attributes", "full_name": "attachment[attachable_attributes]", "description": "\n

The attachment file

\n", "required": true, "allow_nil": false, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "attachment[attachable_attributes][name]", "description": "\n

The name of the attachment

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "attachable_type", "full_name": "attachment[attachable_attributes][attachable_type]", "description": "\n

The type of the attachment, need the file linked with the same param (see below)

\n", "required": true, "allow_nil": false, "validator": "Must be one of: code, pdf, link, document, video.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "pdf", "full_name": "attachment[attachable_attributes][pdf]", "description": "\n

The attached pdf file

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "video", "full_name": "attachment[attachable_attributes][video]", "description": "\n

The attached video file

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/attachments/update", "name": "update", "apis": [ { "api_url": "/v2/attachments/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/attachments/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "attachment", "full_name": "attachment", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "kind", "full_name": "attachment[kind]", "description": "\n

The kind of the attachment

\n", "required": false, "allow_nil": false, "validator": "Must be one of: code, pdf, link, document, video.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language_id", "full_name": "attachment[language_id]", "description": "\n

The attachment language

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "untranslatable", "full_name": "attachment[untranslatable]", "description": "\n

Is this attachment untranslatable

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "attachable_attributes", "full_name": "attachment[attachable_attributes]", "description": "\n

The attachment file

\n", "required": false, "allow_nil": false, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "attachment[attachable_attributes][name]", "description": "\n

The name of the attachment

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "attachable_type", "full_name": "attachment[attachable_attributes][attachable_type]", "description": "\n

The type of the attachment, need the file linked with the same param (see below)

\n", "required": false, "allow_nil": false, "validator": "Must be one of: code, pdf, link, document, video.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "pdf", "full_name": "attachment[attachable_attributes][pdf]", "description": "\n

The attached pdf file

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "video", "full_name": "attachment[attachable_attributes][video]", "description": "\n

The attached video file

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/attachments/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/attachments/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/attachments/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "accreditations": { "doc_url": "/apidoc/2.0/accreditations", "api_url": "/api", "name": "Accreditations", "short_description": "Accreditations", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/accreditations/index", "name": "index", "apis": [ { "api_url": "/v2/accreditations", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, user_id, cursus_id, difficulty, validated, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "name", "user_id", "cursus_id", "difficulty", "validated", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, user_id, cursus_id, difficulty, validated, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "user_id", "cursus_id", "difficulty", "validated", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, user_id, cursus_id, difficulty, validated, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "user_id", "cursus_id", "difficulty", "validated", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/accreditations", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 1, "name": "Kamino", "user_id": 39, "cursus_id": 2, "validated": false }, { "id": 2, "name": "Endor", "user_id": 71, "cursus_id": 2, "validated": false } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/accreditations/show", "name": "show", "apis": [ { "api_url": "/v2/accreditations/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/accreditations/2", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 2, "name": "Endor", "user_id": 71, "cursus_id": 2, "validated": false }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/accreditations/create", "name": "create", "apis": [ { "api_url": "/v2/accreditations", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "accreditation", "full_name": "accreditation", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "accreditation[name]", "description": "\n

The name.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "accreditation[user_id]", "description": "\n

The user id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "accreditation[cursus_id]", "description": "\n

The cursus id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "validated", "full_name": "accreditation[validated]", "description": "\n

Is it validated ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "difficulty", "full_name": "accreditation[difficulty]", "description": "\n

The difficulty.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "accreditations_skills_attributes", "full_name": "accreditation[accreditations_skills_attributes]", "description": "\n

The accreditations skills attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "skill_id", "full_name": "accreditation[accreditations_skills_attributes][skill_id]", "description": "\n

The skill id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "accreditation[accreditations_skills_attributes][value]", "description": "\n

The value.

\n", "required": true, "allow_nil": false, "validator": "Must be Float", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "accreditation[accreditations_skills_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/accreditations", "versions": [ "2.0" ], "query": null, "request_data": { "accreditation": { "accreditations_skills_attributes": [ { "skill_id": "5", "value": "100.0" } ], "cursus_id": "2", "difficulty": "100.0", "name": "DQar", "user_id": "90", "validated": "true" } }, "response_data": { "id": 3, "name": "DQar", "user_id": 90, "cursus_id": 2, "validated": true, "difficulty": 100 }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "basic_tutor", "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/accreditations/update", "name": "update", "apis": [ { "api_url": "/v2/accreditations/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/accreditations/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "accreditation", "full_name": "accreditation", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "accreditation[name]", "description": "\n

The name.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "accreditation[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "accreditation[cursus_id]", "description": "\n

The cursus id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "validated", "full_name": "accreditation[validated]", "description": "\n

Is it validated ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "difficulty", "full_name": "accreditation[difficulty]", "description": "\n

The difficulty.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "accreditations_skills_attributes", "full_name": "accreditation[accreditations_skills_attributes]", "description": "\n

The accreditations skills attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "skill_id", "full_name": "accreditation[accreditations_skills_attributes][skill_id]", "description": "\n

The skill id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "accreditation[accreditations_skills_attributes][value]", "description": "\n

The value.

\n", "required": false, "allow_nil": false, "validator": "Must be Float", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "accreditation[accreditations_skills_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/accreditations/2", "versions": [ "2.0" ], "query": null, "request_data": { "accreditation": { "accreditations_skills_attributes": [ { "skill_id": "2", "value": "0.0" } ], "cursus_id": "2", "difficulty": "100.0", "name": "Kamino", "user_id": "59", "validated": "true" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "basic_tutor", "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/accreditations/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/accreditations/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/accreditations/2", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "basic_tutor", "basic_staff" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "achievements": { "doc_url": "/apidoc/2.0/achievements", "api_url": "/api", "name": "Achievements", "short_description": "Meta-goals earned by users all along their progression.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/achievements/index", "name": "index", "apis": [ { "api_url": "/v2/achievements", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/cursus/:cursus_id/achievements", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:campus_id/achievements", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/titles/:title_id/achievements", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

List all visibles achievements. Invisibles achievements need at least the basic_staff role.

\n", "errors": [], "params": [ { "name": "cursus_id", "full_name": "cursus_id", "description": "\n

The cursus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "campus_id", "description": "\n

The campus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "title_id", "full_name": "title_id", "description": "\n

The title id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id asc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, internal_name, kind, tier, description, pedago, visible, nbr_of_success, parent_id, image, created_at, updated_at, slug, position, reward, title_id.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "asc" }, "keys": [ "id", "name", "internal_name", "kind", "tier", "description", "pedago", "visible", "nbr_of_success", "parent_id", "image", "created_at", "updated_at", "slug", "position", "reward", "title_id" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, internal_name, kind, tier, description, pedago, visible, nbr_of_success, parent_id, image, created_at, updated_at, slug, position, reward, title_id.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "internal_name", "kind", "tier", "description", "pedago", "visible", "nbr_of_success", "parent_id", "image", "created_at", "updated_at", "slug", "position", "reward", "title_id" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, internal_name, kind, tier, description, pedago, visible, nbr_of_success, parent_id, image, created_at, updated_at, slug, position, reward, title_id.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "internal_name", "kind", "tier", "description", "pedago", "visible", "nbr_of_success", "parent_id", "image", "created_at", "updated_at", "slug", "position", "reward", "title_id" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/achievements", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 1, "name": "Film buff", "description": "Regarder 1 video sur l'e-learning.", "tier": "none", "kind": "pedagogy", "visible": true, "image": "/uploads/achievement/image/1/logo.svg", "nbr_of_success": 1, "users_url": "https://api.intra.42.fr/v2/achievements/1/users", "achievements": [], "parent": null, "title": null }, { "id": 3, "name": "Film buff", "description": "Regarder 21 videos sur l'e-learning.", "tier": "none", "kind": "pedagogy", "visible": true, "image": "/uploads/achievement/image/3/logo.svg", "nbr_of_success": 21, "users_url": "https://api.intra.42.fr/v2/achievements/3/users", "achievements": [], "parent": null, "title": null }, { "id": 4, "name": "Film buff", "description": "Regarder 42 videos sur l'e-learning.", "tier": "none", "kind": "pedagogy", "visible": true, "image": "/uploads/achievement/image/4/logo.svg", "nbr_of_success": 42, "users_url": "https://api.intra.42.fr/v2/achievements/4/users", "achievements": [], "parent": null, "title": null } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "basic_staff" ], "authentication": "user", "facultative": true }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/achievements/show", "name": "show", "apis": [ { "api_url": "/v2/achievements/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Return the achievement specified by the :id parameter. Invisibles achievements need at least the basic_staff role.

\n", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/achievements/8", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 8, "name": "Film buff", "description": "Regarder 10 videos sur l'e-learning.", "tier": "none", "kind": "pedagogy", "visible": true, "image": "/uploads/achievement/image/8/logo.svg", "nbr_of_success": 10, "users_url": "https://api.intra.42.fr/v2/achievements/8/users", "achievements": [], "parent": null, "title": null }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/achievements/create", "name": "create", "apis": [ { "api_url": "/v2/achievements", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "achievement", "full_name": "achievement", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "achievement[name]", "description": "\n

The name.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "internal_name", "full_name": "achievement[internal_name]", "description": "\n

The internal name.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "achievement[description]", "description": "\n

The description. Maximum length is 140.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "pedago", "full_name": "achievement[pedago]", "description": "\n

Is it pedago ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "visible", "full_name": "achievement[visible]", "description": "\n

Is it visible ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "nbr_of_success", "full_name": "achievement[nbr_of_success]", "description": "\n

The nbr of success.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "parent_id", "full_name": "achievement[parent_id]", "description": "\n

The parent id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "image_cache", "full_name": "achievement[image_cache]", "description": "\n

The image cache.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "image", "full_name": "achievement[image]", "description": "\n

The image.

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "achievement[kind]", "description": "\n

The kind.

\n", "required": true, "allow_nil": false, "validator": "Must be one of: project, social, scolarity, pedagogy.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "title_id", "full_name": "achievement[title_id]", "description": "\n

The title id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "tier", "full_name": "achievement[tier]", "description": "\n

The tier.

\n", "required": true, "allow_nil": false, "validator": "Must be one of: none, easy, medium, hard, challenge.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "lg", "full_name": "achievement[lg]", "description": "\n

The language id.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "position", "full_name": "achievement[position]", "description": "\n

The position.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "reward", "full_name": "achievement[reward]", "description": "\n

The reward.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_ids", "full_name": "achievement[cursus_ids]", "description": "\n

The cursus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "campus_ids", "full_name": "achievement[campus_ids]", "description": "\n

The campus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "community_services_attributes", "full_name": "achievement[community_services_attributes]", "description": "\n

The community services attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "duration", "full_name": "achievement[community_services_attributes][duration]", "description": "\n

The duration.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "occupation", "full_name": "achievement[community_services_attributes][occupation]", "description": "\n

The occupation.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "achievement[community_services_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "achievement[community_services_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/achievements", "versions": [ "2.0" ], "query": null, "request_data": { "achievement": { "name": "Be a test of the API", "internal_name": "BeATestAPI", "kind": "social", "tier": "none", "description": "Be used as a test for the api", "image": { "tempfile": [], "original_filename": "logo.svg", "content_type": "image/svg+xml", "headers": "Content-Disposition: form-data; name=\"achievement[image]\"; filename=\"logo.svg\"\r\nContent-Type: image/svg+xml\r\nContent-Length: 2989\r\n" }, "title_id": "30", "cursus_ids": [ "1" ], "campus_ids": [ "1" ], "lg": "1" } }, "response_data": { "id": 10, "name": "Be a test of the API", "description": "Be used as a test for the api", "tier": "none", "kind": "social", "visible": false, "image": "/uploads/achievement/image/10/logo.svg", "nbr_of_success": null, "users_url": "https://api.intra.42.fr/v2/achievements/10/users", "achievements": [], "parent": null, "title": null }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor", "achievements_manager" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/achievements/update", "name": "update", "apis": [ { "api_url": "/v2/achievements/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/achievements/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "achievement", "full_name": "achievement", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "achievement[name]", "description": "\n

The name.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "internal_name", "full_name": "achievement[internal_name]", "description": "\n

The internal name.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "achievement[description]", "description": "\n

The description. Maximum length is 140.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "pedago", "full_name": "achievement[pedago]", "description": "\n

Is it pedago ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "visible", "full_name": "achievement[visible]", "description": "\n

Is it visible ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "nbr_of_success", "full_name": "achievement[nbr_of_success]", "description": "\n

The nbr of success.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "parent_id", "full_name": "achievement[parent_id]", "description": "\n

The parent id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "image_cache", "full_name": "achievement[image_cache]", "description": "\n

The image cache.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "image", "full_name": "achievement[image]", "description": "\n

The image.

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "achievement[kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: project, social, scolarity, pedagogy.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "title_id", "full_name": "achievement[title_id]", "description": "\n

The title id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "tier", "full_name": "achievement[tier]", "description": "\n

The tier.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: none, easy, medium, hard, challenge.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "lg", "full_name": "achievement[lg]", "description": "\n

The language id.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "position", "full_name": "achievement[position]", "description": "\n

The position.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "reward", "full_name": "achievement[reward]", "description": "\n

The reward.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_ids", "full_name": "achievement[cursus_ids]", "description": "\n

The cursus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "campus_ids", "full_name": "achievement[campus_ids]", "description": "\n

The campus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "community_services_attributes", "full_name": "achievement[community_services_attributes]", "description": "\n

The community services attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "duration", "full_name": "achievement[community_services_attributes][duration]", "description": "\n

The duration.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "occupation", "full_name": "achievement[community_services_attributes][occupation]", "description": "\n

The occupation.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "achievement[community_services_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "achievement[community_services_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/achievements/8", "versions": [ "2.0" ], "query": null, "request_data": { "achievement": { "name": "Be a test of the API", "internal_name": "BeATestAPI", "kind": "social", "tier": "none", "description": "Be used as a test for the api", "image": { "tempfile": [], "original_filename": "logo.svg", "content_type": "image/svg+xml", "headers": "Content-Disposition: form-data; name=\"achievement[image]\"; filename=\"logo.svg\"\r\nContent-Type: image/svg+xml\r\nContent-Length: 2989\r\n" }, "title_id": "30", "cursus_ids": [ "1" ], "campus_ids": [ "1" ], "lg": "1" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor", "achievements_manager" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/achievements/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/achievements/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/achievements/8", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor", "achievements_manager" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "achievements_users": { "doc_url": "/apidoc/2.0/achievements_users", "api_url": "/api", "name": "Achievements users", "short_description": "Users which earned an achievement", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/achievements_users/index", "name": "index", "apis": [ { "api_url": "/v2/achievements/:achievement_id/achievements_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/achievements_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "achievement_id", "full_name": "achievement_id", "description": "\n

The achievement id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, achievement_id, nbr_of_success, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "user_id", "achievement_id", "nbr_of_success", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, achievement_id, nbr_of_success, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "user_id", "achievement_id", "nbr_of_success", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, achievement_id, nbr_of_success, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "user_id", "achievement_id", "nbr_of_success", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/achievements_users", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 126, "user_id": 126, "login": "darthcae", "url": "https://api.intra.42.fr/v2/users/darthcae", "created_at": "2017-11-22T13:41:22.464Z" }, { "id": 125, "user_id": 125, "login": "sebulseb", "url": "https://api.intra.42.fr/v2/users/sebulseb", "created_at": "2017-11-22T13:41:22.453Z" }, { "id": 124, "user_id": 124, "login": "hsolo2", "url": "https://api.intra.42.fr/v2/users/hsolo2", "created_at": "2017-11-22T13:41:22.442Z" } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/achievements_users/show", "name": "show", "apis": [ { "api_url": "/v2/achievements_users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Return the achievement specified by the :id parameter

\n", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/achievements_users/105", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 105, "user_id": 105, "login": "yodyoda2", "url": "https://api.intra.42.fr/v2/users/yodyoda2", "created_at": "2017-11-22T13:41:22.217Z" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/achievements_users/create", "name": "create", "apis": [ { "api_url": "/v2/achievements_users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "achievements_user", "full_name": "achievements_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "achievements_user[user_id]", "description": "\n

The user id. Must be unique in the scope of a given achievement.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "achievement_id", "full_name": "achievements_user[achievement_id]", "description": "\n

The achievement id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "nbr_of_success", "full_name": "achievements_user[nbr_of_success]", "description": "\n

The nbr of success.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/achievements_users", "versions": [ "2.0" ], "query": null, "request_data": { "achievements_user": { "achievement_id": "1", "user_id": "29" } }, "response_data": { "id": 127, "user_id": 29, "login": "askywalk", "url": "https://api.intra.42.fr/v2/users/askywalk", "created_at": "2017-11-22T13:43:26.572Z" }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/achievements_users/update", "name": "update", "apis": [ { "api_url": "/v2/achievements_users/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/achievements_users/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "achievements_user", "full_name": "achievements_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "achievements_user[user_id]", "description": "\n

The user id. Must be unique in the scope of a given achievement.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "achievement_id", "full_name": "achievements_user[achievement_id]", "description": "\n

The achievement id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "nbr_of_success", "full_name": "achievements_user[nbr_of_success]", "description": "\n

The nbr of success.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/achievements_users/105", "versions": [ "2.0" ], "query": null, "request_data": { "achievements_user": { "achievement_id": "5", "user_id": "30" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/achievements_users/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/achievements_users/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/achievements_users/105", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "announcements": { "doc_url": "/apidoc/2.0/announcements", "api_url": "/api", "name": "Announcements", "short_description": "An announcement made to users in a cursus on their homepage.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/announcements/graph", "name": "graph", "apis": [ { "api_url": "/v2/announcements/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at, expire_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by expire_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, author, title, text, kind, created_at, updated_at, image, expire_at, link, notificable_id, notificable_type.", "expected_type": "string", "metadata": { "sort": { "default": { "expire_at": "desc", "id": "desc" }, "keys": [ "id", "author", "title", "text", "kind", "created_at", "updated_at", "image", "expire_at", "link", "notificable_id", "notificable_type" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, author, title, text, kind, created_at, updated_at, image, expire_at, link, notificable_id, notificable_type, expire.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "author", "title", "text", "kind", "created_at", "updated_at", "image", "expire_at", "link", "notificable_id", "notificable_type", "expire" ], "additional": { "expire": { "proc": {}, "all": [ "true", "false" ], "description": "Return only expire announcements" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, author, title, text, kind, created_at, updated_at, image, expire_at, link, notificable_id, notificable_type.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "author", "title", "text", "kind", "created_at", "updated_at", "image", "expire_at", "link", "notificable_id", "notificable_type" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/announcements/graph/on/created_at/by/day", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "2017-11-22": 4 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/announcements/filtering_keys", "name": "filtering_keys", "apis": [], "formats": null, "full_description": "\n

Return all the announcements, globally or # filtered by cursus

\n", "errors": [], "params": [], "examples": [], "metadata": null, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/announcements/show", "name": "show", "apis": [ { "api_url": "/v2/announcements/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Return the announcement specified by the :id parameter

\n", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/announcements/4", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 4, "author": "Jerrell Prohaska", "title": "Minnesota frogs", "text": "Pickled aut et repellendus ugh sed a natus. Beatae cliche knausgaard.", "kind": "global", "link": null, "created_at": "2017-11-22T13:41:03.321Z", "updated_at": "2017-11-22T13:41:03.321Z", "expire_at": "2017-11-03T07:42:11.309Z" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/announcements/create", "name": "create", "apis": [ { "api_url": "/v2/announcements", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/cursus/:cursus_id/announcements", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "cursus_id", "full_name": "cursus_id", "description": "\n

The cursus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "announcement", "full_name": "announcement", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "cursus_ids", "full_name": "announcement[cursus_ids]", "description": "\n

The cursus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "campus_ids", "full_name": "announcement[campus_ids]", "description": "\n

The campus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "author", "full_name": "announcement[author]", "description": "\n

The author.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "title", "full_name": "announcement[title]", "description": "\n

The title.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "text", "full_name": "announcement[text]", "description": "\n

The text.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "announcement[kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "expire_at", "full_name": "announcement[expire_at]", "description": "\n

The expire at.

\n", "required": true, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "image", "full_name": "announcement[image]", "description": "\n

The image.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/announcements", "versions": [ "2.0" ], "query": null, "request_data": { "announcement": { "author": "42partnerships", "campus_ids": [ "1" ], "cursus_ids": [ "1" ], "expire_at": "2017-11-22 14:13:10 UTC", "kind": "global", "text": "42partnerships revient", "title": "Partenariats \u00e9coles 2016" } }, "response_data": { "id": 5, "author": "42partnerships", "title": "Partenariats \u00e9coles 2016", "text": "42partnerships revient", "kind": "global", "link": null, "created_at": "2017-11-22T13:43:27.259Z", "updated_at": "2017-11-22T13:43:27.259Z", "expire_at": "2017-11-22T14:13:10.000Z" }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/announcements/update", "name": "update", "apis": [ { "api_url": "/v2/announcements/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/announcements/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "announcement", "full_name": "announcement", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "cursus_ids", "full_name": "announcement[cursus_ids]", "description": "\n

The cursus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "campus_ids", "full_name": "announcement[campus_ids]", "description": "\n

The campus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "author", "full_name": "announcement[author]", "description": "\n

The author.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "title", "full_name": "announcement[title]", "description": "\n

The title.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "text", "full_name": "announcement[text]", "description": "\n

The text.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "announcement[kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "expire_at", "full_name": "announcement[expire_at]", "description": "\n

The expire at.

\n", "required": false, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "image", "full_name": "announcement[image]", "description": "\n

The image.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/announcements/4", "versions": [ "2.0" ], "query": null, "request_data": { "announcement": { "author": "42partnerships", "campus_ids": [ "1" ], "cursus_ids": [ "1" ], "expire_at": "2017-11-22 14:13:10 UTC", "kind": "global", "text": "42partnerships revient", "title": "Partenariats \u00e9coles 2016" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/announcements/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/announcements/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/announcements/4", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "anti_grav_units": { "doc_url": "/apidoc/2.0/anti_grav_units", "api_url": "/api", "name": "Anti grav units", "short_description": null, "full_description": null, "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/anti_grav_units/index", "name": "index", "apis": [ { "api_url": "/v2/anti_grav_units", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [], "examples": [], "metadata": { "roles": [ "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/anti_grav_units/show", "name": "show", "apis": [ { "api_url": "/v2/anti_grav_units/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_staff" ] }, "see": [], "headers": [], "show": true } ], "headers": null }, "anti_grav_units_users": { "doc_url": "/apidoc/2.0/anti_grav_units_users", "api_url": "/api", "name": "Anti grav units users", "short_description": null, "full_description": null, "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/anti_grav_units_users/index", "name": "index", "apis": [ { "api_url": "/v2/anti_grav_units_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/anti_grav_units_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:campus_id/anti_grav_units_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "campus_id", "description": "\n

The campus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, created_at, updated_at, close_id, is_free, reason, end_date, expected_end_date, begin_date, cursus_id.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "user_id", "created_at", "updated_at", "close_id", "is_free", "reason", "end_date", "expected_end_date", "begin_date", "cursus_id" ], "additional": { "cursus_id": { "proc": {}, "all": [ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 ], "description": "Only return agu users with users in the given cursus" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, created_at, updated_at, close_id, is_free, reason, end_date, expected_end_date, begin_date.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "user_id", "created_at", "updated_at", "close_id", "is_free", "reason", "end_date", "expected_end_date", "begin_date" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/anti_grav_units_users/create", "name": "create", "apis": [ { "api_url": "/v2/anti_grav_units_users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Create an AntiGravUnitsUser, if is_free is true then the AGU user will not loose an agu or freeze time.

\n\n

This is the api for creating agu that ends in the future. If you are looking for creating agu in the past to delay the blackhole, please go to the following link. POST /v2/users/:user_id/free_past_agu

\n", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

Freezed user id

\n", "required": true, "allow_nil": false, "validator": "Must be Integer", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "expected_end_date", "full_name": "expected_end_date", "description": "\n

The date when the agu will be automatically stopped

\n", "required": true, "allow_nil": false, "validator": "Must be Date", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "begin_date", "full_name": "begin_date", "description": "\n

The date when the agu started, defaulted to Today

\n", "required": false, "allow_nil": false, "validator": "Must be Date", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "is_free", "full_name": "is_free", "description": "\n

If true, the agu will not consume one of 3 user agu, can be overlapped with other agus

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "reason", "full_name": "reason", "description": "\n

The reason of this freeze

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "POST", "path": "/v2/anti_grav_units_users", "versions": [ "2.0" ], "query": "", "request_data": { "anti_grav_units_user": { "expected_end_date": "2019-12-23", "begin_date": "2019-12-09", "user_id": 31461, "is_free": true } }, "response_data": { "id": 64, "user_id": 18763, "begin_date": "2019-12-09", "expected_end_date": "2019-12-23", "created_at": "2019-12-09T14:17:15.986Z", "updated_at": "2019-12-09T14:17:15.986Z", "is_free": true, "close_id": 65822 }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/anti_grav_units_users/show", "name": "show", "apis": [ { "api_url": "/v2/anti_grav_units_users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_staff" ] }, "see": [], "headers": [], "show": true } ], "headers": null }, "apps": { "doc_url": "/apidoc/2.0/apps", "api_url": "/api", "name": "Apps", "short_description": "Applications for the API v2", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/apps/index", "name": "index", "apis": [ { "api_url": "/v2/apps", "http_method": "GET", "short_description": "Get all the public and owned applications", "deprecated": null }, { "api_url": "/v2/users/:user_id/apps", "http_method": "GET", "short_description": "Get all the public and owned applications", "deprecated": null } ], "formats": null, "full_description": "\n

Return all the public created applications working with the APIv2.

\n\n

If there is a resource owner, also returns the resource owner applications, public or not.

\n", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, token, user_id, created_at, updated_at, allowed_origins.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "name", "token", "user_id", "created_at", "updated_at", "allowed_origins" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, uid, owner_id, website.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "uid", "owner_id", "website" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, uid, owner_id, website.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "uid", "owner_id", "website" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/apps", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 7, "name": "test intrateam staff oauth application", "description": null, "image": null, "website": null, "public": true, "scopes": [], "created_at": "2017-11-22T13:43:11.377Z", "updated_at": "2017-11-22T13:43:11.434Z", "owner": { "id": 74, "login": "pamidala", "url": "https://api.intra.42.fr/v2/users/pamidala" }, "rate_limit": 1800, "roles": [ { "id": 16, "name": "Official App", "description": "Approved application without rate limits" }, { "id": 7, "name": "Basic Staff", "description": "Member of the staff, can manage community services, closes, exams and access advanced student data" }, { "id": 11, "name": "Advanced Staff", "description": "Member of the staff, with higher privileges" }, { "id": 1, "name": "Intrateam", "description": "manage all" } ] }, { "id": 6, "name": "test pedago oauth application", "description": null, "image": null, "website": null, "public": true, "scopes": [], "created_at": "2017-11-22T13:43:11.315Z", "updated_at": "2017-11-22T13:43:11.369Z", "owner": {}, "rate_limit": 1800, "roles": [ { "id": 16, "name": "Official App", "description": "Approved application without rate limits" }, { "id": 7, "name": "Basic Staff", "description": "Member of the staff, can manage community services, closes, exams and access advanced student data" }, { "id": 11, "name": "Advanced Staff", "description": "Member of the staff, with higher privileges" }, { "id": 5, "name": "Advanced Tutor", "description": "Manage skills, cursus and all low level pedagogic data" } ] }, { "id": 5, "name": "test advanced staff oauth application", "description": null, "image": null, "website": null, "public": true, "scopes": [], "created_at": "2017-11-22T13:43:11.261Z", "updated_at": "2017-11-22T13:43:11.307Z", "owner": {}, "rate_limit": 1800, "roles": [ { "id": 16, "name": "Official App", "description": "Approved application without rate limits" }, { "id": 7, "name": "Basic Staff", "description": "Member of the staff, can manage community services, closes, exams and access advanced student data" }, { "id": 11, "name": "Advanced Staff", "description": "Member of the staff, with higher privileges" } ] } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30, "authentication": "user", "facultative": true }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/apps/show", "name": "show", "apis": [ { "api_url": "/v2/apps/:id", "http_method": "GET", "short_description": "Get a public or owned application", "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/apps/7", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 7, "name": "test intrateam staff oauth application", "description": null, "image": null, "website": null, "public": true, "scopes": [], "created_at": "2017-11-22T13:43:11.377Z", "updated_at": "2017-11-22T13:43:11.434Z", "owner": { "id": 74, "login": "pamidala", "url": "https://api.intra.42.fr/v2/users/pamidala" }, "rate_limit": 1800, "roles": [ { "id": 16, "name": "Official App", "description": "Approved application without rate limits" }, { "id": 7, "name": "Basic Staff", "description": "Member of the staff, can manage community services, closes, exams and access advanced student data" }, { "id": 11, "name": "Advanced Staff", "description": "Member of the staff, with higher privileges" }, { "id": 1, "name": "Intrateam", "description": "manage all" } ] }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true } ], "headers": [] }, "balances": { "doc_url": "/apidoc/2.0/balances", "api_url": "/api", "name": "Balances", "short_description": "The balance of a pool", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/balances/index", "name": "index", "apis": [ { "api_url": "/v2/balances", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/pools/:pool_id/balances", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "pool_id", "full_name": "pool_id", "description": "\n

The pool id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, created_at, updated_at, pool_id.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "begin_at", "end_at", "created_at", "updated_at", "pool_id" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, created_at, updated_at, pool_id, future, end.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "begin_at", "end_at", "created_at", "updated_at", "pool_id", "future", "end" ], "additional": { "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only balances which begins in the future" }, "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end balances" } } } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/balances", "versions": [ "2.0" ], "query": "page=1", "request_data": null, "response_data": [ { "id": 191, "begin_at": "2018-06-16 10:49:28", "end_at": "2018-06-16 14:03:41", "pool_id": 21 }, { "id": 192, "begin_at": "2018-06-25 22:52:56", "end_at": "2018-07-23 22:52:56", "pool_id": 16 }, { "id": 193, "begin_at": "2018-06-28 11:56:03", "end_at": "2018-07-26 11:56:03", "pool_id": 18 } ] } ], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/balances/show", "name": "show", "apis": [ { "api_url": "/v2/balances/:id", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/pools/:pool_id/balances/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "pool_id", "full_name": "pool_id", "description": "\n

The pool id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/balances/191", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 191, "begin_at": "2018-06-16 10:49:28", "end_at": "2018-06-16 14:03:41", "pool_id": 21 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "bloc_deadlines": { "doc_url": "/apidoc/2.0/bloc_deadlines", "api_url": "/api", "name": "Bloc deadlines", "short_description": "A bloc", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/bloc_deadlines/index", "name": "index", "apis": [ { "api_url": "/v2/bloc_deadlines", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/blocs/:bloc_id/bloc_deadlines", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "bloc_id", "full_name": "bloc_id", "description": "\n

The bloc id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, bloc_id, begin_at, end_at, created_at, updated_at, coalition_id.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "bloc_id", "begin_at", "end_at", "created_at", "updated_at", "coalition_id" ] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/bloc_deadlines/show", "name": "show", "apis": [ { "api_url": "/v2/bloc_deadlines/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/bloc_deadlines/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 1, "bloc_id": 1, "coalition_id": 1, "begin_at": "2017-11-22T13:41:20.752Z", "end_at": "2018-11-22T13:41:20.752Z", "created_at": "2017-11-22T13:41:20.764Z", "updated_at": "2017-11-22T13:41:20.764Z" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/bloc_deadlines/create", "name": "create", "apis": [ { "api_url": "/v2/bloc_deadlines", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "bloc_deadline", "full_name": "bloc_deadline", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "bloc_id", "full_name": "bloc_deadline[bloc_id]", "description": "\n

The bloc id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "bloc_deadline[begin_at]", "description": "\n

The begin at.

\n", "required": true, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "bloc_deadline[end_at]", "description": "\n

The end at.

\n", "required": true, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "coalition_id", "full_name": "bloc_deadline[coalition_id]", "description": "\n

The coalition id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/bloc_deadlines", "versions": [ "2.0" ], "query": null, "request_data": { "bloc_deadline": { "begin_at": "2022-11-29", "bloc_id": "1", "coalition_id": "2", "end_at": "2023-11-29" } }, "response_data": { "id": 6, "bloc_id": 1, "coalition_id": 2, "begin_at": "2022-11-29T00:00:00.000Z", "end_at": "2023-11-29T00:00:00.000Z", "created_at": "2017-11-22T13:43:28.263Z", "updated_at": "2017-11-22T13:43:28.263Z" }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/bloc_deadlines/update", "name": "update", "apis": [ { "api_url": "/v2/bloc_deadlines/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/bloc_deadlines/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "bloc_deadline", "full_name": "bloc_deadline", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "bloc_id", "full_name": "bloc_deadline[bloc_id]", "description": "\n

The bloc id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "bloc_deadline[begin_at]", "description": "\n

The begin at.

\n", "required": false, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "bloc_deadline[end_at]", "description": "\n

The end at.

\n", "required": false, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "coalition_id", "full_name": "bloc_deadline[coalition_id]", "description": "\n

The coalition id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/bloc_deadlines/1", "versions": [ "2.0" ], "query": null, "request_data": { "bloc_deadline": { "begin_at": "2022-11-29", "bloc_id": "1", "coalition_id": "2", "end_at": "2023-11-29" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "blocs": { "doc_url": "/apidoc/2.0/blocs", "api_url": "/api", "name": "Blocs", "short_description": "A bloc is the managing container of coalitions.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/blocs/index", "name": "index", "apis": [ { "api_url": "/v2/blocs", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, cursus_id, campus_id, squad_size, created_at, updated_at, coalition_delay, repeat_deadline_delay.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "cursus_id", "campus_id", "squad_size", "created_at", "updated_at", "coalition_delay", "repeat_deadline_delay" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, cursus_id, campus_id, squad_size, created_at, updated_at, coalition_delay, repeat_deadline_delay.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "cursus_id", "campus_id", "squad_size", "created_at", "updated_at", "coalition_delay", "repeat_deadline_delay" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/blocs", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 1, "campus_id": 5, "cursus_id": 1, "squad_size": 80, "created_at": "2017-11-22T13:41:20.665Z", "updated_at": "2017-11-22T13:41:20.665Z", "coalitions": [ { "id": 1, "name": "Indiana goblins", "slug": "super-slug", "image_url": "https://admin.intra.42.fr/uploads/coalition/image/1/logo.svg", "color": "#1c7f08", "score": 54, "user_id": 38 }, { "id": 2, "name": "Kansas giants", "slug": "super-slug", "image_url": "https://admin.intra.42.fr/uploads/coalition/image/2/logo.svg", "color": "#087262", "score": 83, "user_id": 90 } ] } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/blocs/show", "name": "show", "apis": [ { "api_url": "/v2/blocs/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/blocs/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 1, "campus_id": 5, "cursus_id": 1, "squad_size": 80, "created_at": "2017-11-22T13:41:20.665Z", "updated_at": "2017-11-22T13:41:20.665Z", "coalitions": [ { "id": 1, "name": "Indiana goblins", "slug": "super-slug", "image_url": "https://admin.intra.42.fr/uploads/coalition/image/1/logo.svg", "color": "#1c7f08", "score": 54, "user_id": 38 }, { "id": 2, "name": "Kansas giants", "slug": "super-slug", "image_url": "https://admin.intra.42.fr/uploads/coalition/image/2/logo.svg", "color": "#087262", "score": 83, "user_id": 90 } ] }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true } ], "headers": [] }, "broadcasts": { "doc_url": "/apidoc/2.0/broadcasts", "api_url": "/api", "name": "Broadcasts", "short_description": "Broadcasts publicated on a campus", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/broadcasts/index", "name": "index", "apis": [ { "api_url": "/v2/campus/:campus_id/broadcasts", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "campus_id", "full_name": "campus_id", "description": "\n

The campus id or slug

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, campus_id, tag_id, content, pinned_until, hidden_at, url, created_at, updated_at, content_html, position.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "campus_id", "tag_id", "content", "pinned_until", "hidden_at", "url", "created_at", "updated_at", "content_html", "position" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, campus_id, tag_id, content, pinned_until, hidden_at, url, created_at, updated_at, content_html, position, hidden.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "campus_id", "tag_id", "content", "pinned_until", "hidden_at", "url", "created_at", "updated_at", "content_html", "position", "hidden" ], "additional": { "hidden": { "proc": {}, "all": [ "true", "false" ], "description": "Return only hidden broadcasts" } } } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "authentication": "user" }, "see": [], "headers": [], "show": true } ], "headers": [] }, "campus": { "doc_url": "/apidoc/2.0/campus", "api_url": "/api", "name": "Campus", "short_description": "Places where 42 users works", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/campus/index", "name": "index", "apis": [ { "api_url": "/v2/campus", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, time_zone, language_id, slug, main_email, endpoint_id, vogsphere_id, content_email, time_of_community_service_started, companies_mail, address, zip, city, country, pro_needs_validation, logo, website, facebook, twitter, display_name, email_extension, help_url, active, open_to_job_offers.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "name", "created_at", "updated_at", "time_zone", "language_id", "slug", "main_email", "endpoint_id", "vogsphere_id", "content_email", "time_of_community_service_started", "companies_mail", "address", "zip", "city", "country", "pro_needs_validation", "logo", "website", "facebook", "twitter", "display_name", "email_extension", "help_url", "active", "open_to_job_offers" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, time_zone, language_id, slug, main_email, endpoint_id, vogsphere_id, content_email, time_of_community_service_started, companies_mail, address, zip, city, country, pro_needs_validation, logo, website, facebook, twitter, display_name, email_extension, help_url, active, open_to_job_offers.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "created_at", "updated_at", "time_zone", "language_id", "slug", "main_email", "endpoint_id", "vogsphere_id", "content_email", "time_of_community_service_started", "companies_mail", "address", "zip", "city", "country", "pro_needs_validation", "logo", "website", "facebook", "twitter", "display_name", "email_extension", "help_url", "active", "open_to_job_offers" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, time_zone, language_id, slug, main_email, endpoint_id, vogsphere_id, content_email, time_of_community_service_started, companies_mail, address, zip, city, country, pro_needs_validation, logo, website, facebook, twitter, display_name, email_extension, help_url, active, open_to_job_offers.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "created_at", "updated_at", "time_zone", "language_id", "slug", "main_email", "endpoint_id", "vogsphere_id", "content_email", "time_of_community_service_started", "companies_mail", "address", "zip", "city", "country", "pro_needs_validation", "logo", "website", "facebook", "twitter", "display_name", "email_extension", "help_url", "active", "open_to_job_offers" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/campus", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 6, "name": "Paris", "time_zone": "Europe/Paris", "language": { "id": 1, "name": "Fran\u00e7ais", "identifier": "fr" }, "users_count": 19, "vogsphere_id": 1, "endpoint": null }, { "id": 5, "name": "Fremont", "time_zone": "America/Los_Angeles", "language": { "id": 2, "name": "English", "identifier": "en" }, "users_count": 16, "vogsphere_id": 2, "endpoint": null }, { "id": 4, "name": "Kiev", "time_zone": "Europe/Kiev", "language": { "id": 2, "name": "English", "identifier": "en" }, "users_count": 22, "vogsphere_id": null, "endpoint": null } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/campus/show", "name": "show", "apis": [ { "api_url": "/v2/campus/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/campus/3", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 3, "name": "Chisinau", "time_zone": "Europe/Bucharest", "language": { "id": 3, "name": "Romanian", "identifier": "ro" }, "users_count": 15, "vogsphere_id": 1, "endpoint": null }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/campus/create", "name": "create", "apis": [ { "api_url": "/v2/campus", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "campus", "full_name": "campus", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "campus[name]", "description": "\n

The name. Must be unique.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "time_zone", "full_name": "campus[time_zone]", "description": "\n

The time zone.

\n", "required": true, "allow_nil": false, "validator": "Must be one of: Pacific/Pago_Pago, Pacific/Pago_Pago, Pacific/Pago_Pago, Pacific/Honolulu, America/Juneau, America/Los_Angeles, America/Tijuana, America/Phoenix, America/Chihuahua, America/Mazatlan, America/Denver, America/Guatemala, America/Chicago, America/Mexico_City, America/Mexico_City, America/Monterrey, America/Regina, America/Bogota, America/New_York, America/Indiana/Indianapolis, America/Lima, America/Lima, America/Halifax, America/Caracas, America/Guyana, America/La_Paz, America/Santiago, America/St_Johns, America/Sao_Paulo, America/Argentina/Buenos_Aires, America/Godthab, America/Montevideo, Atlantic/South_Georgia, Atlantic/Azores, Atlantic/Cape_Verde, Europe/London, Europe/Lisbon, Europe/London, Africa/Monrovia, Etc/UTC, Europe/Amsterdam, Europe/Belgrade, Europe/Berlin, Europe/Zurich, Europe/Prague, Europe/Brussels, Europe/Budapest, Africa/Casablanca, Europe/Copenhagen, Europe/Dublin, Europe/Belgrade, Europe/Madrid, Europe/Paris, Europe/Prague, Europe/Rome, Europe/Belgrade, Europe/Belgrade, Europe/Stockholm, Europe/Vienna, Europe/Warsaw, Africa/Algiers, Europe/Belgrade, Europe/Zurich, Europe/Athens, Europe/Bucharest, Africa/Cairo, Africa/Maputo, Europe/Helsinki, Asia/Jerusalem, Europe/Kaliningrad, Europe/Kiev, Africa/Johannesburg, Europe/Riga, Europe/Sofia, Europe/Tallinn, Europe/Vilnius, Asia/Baghdad, Europe/Istanbul, Asia/Riyadh, Europe/Minsk, Europe/Moscow, Africa/Nairobi, Asia/Riyadh, Europe/Moscow, Asia/Tehran, Asia/Dubai, Asia/Baku, Asia/Dubai, Europe/Samara, Asia/Tbilisi, Europe/Volgograd, Asia/Yerevan, Asia/Kabul, Asia/Yekaterinburg, Asia/Karachi, Asia/Karachi, Asia/Tashkent, Asia/Kolkata, Asia/Kolkata, Asia/Kolkata, Asia/Kolkata, Asia/Colombo, Asia/Kathmandu, Asia/Almaty, Asia/Dhaka, Asia/Dhaka, Asia/Urumqi, Asia/Yangon, Asia/Bangkok, Asia/Bangkok, Asia/Jakarta, Asia/Krasnoyarsk, Asia/Novosibirsk, Asia/Shanghai, Asia/Shanghai, Asia/Hong_Kong, Asia/Irkutsk, Asia/Kuala_Lumpur, Australia/Perth, Asia/Singapore, Asia/Taipei, Asia/Ulaanbaatar, Asia/Tokyo, Asia/Tokyo, Asia/Seoul, Asia/Tokyo, Asia/Yakutsk, Australia/Adelaide, Australia/Darwin, Australia/Brisbane, Australia/Melbourne, Pacific/Guam, Australia/Hobart, Australia/Melbourne, Pacific/Port_Moresby, Australia/Sydney, Asia/Vladivostok, Asia/Magadan, Pacific/Noumea, Pacific/Guadalcanal, Asia/Srednekolymsk, Pacific/Auckland, Pacific/Fiji, Asia/Kamchatka, Pacific/Majuro, Pacific/Auckland, Pacific/Chatham, Pacific/Tongatapu, Pacific/Apia, Pacific/Fakaofo.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language_id", "full_name": "campus[language_id]", "description": "\n

The language id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "campus[slug]", "description": "\n

The slug.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "main_email", "full_name": "campus[main_email]", "description": "\n

The main email.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "endpoint_id", "full_name": "campus[endpoint_id]", "description": "\n

The endpoint id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "vogsphere_id", "full_name": "campus[vogsphere_id]", "description": "\n

The vogsphere id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "content_email", "full_name": "campus[content_email]", "description": "\n

The content email.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "time_of_community_service_started", "full_name": "campus[time_of_community_service_started]", "description": "\n

The time of community service started.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "companies_mail", "full_name": "campus[companies_mail]", "description": "\n

The companies mail.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "address", "full_name": "campus[address]", "description": "\n

The address.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "zip", "full_name": "campus[zip]", "description": "\n

The zip.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "city", "full_name": "campus[city]", "description": "\n

The city.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "country", "full_name": "campus[country]", "description": "\n

The country.

\n", "required": true, "allow_nil": false, "validator": "Must be one of: Afghanistan, \u00c5land Islands, Albania, Algeria, American Samoa, Andorra, Angola, Anguilla, Antarctica, Antigua and Barbuda, Argentina, Armenia, Aruba, Australia, Austria, Azerbaijan, Bahamas, Bahrain, Bangladesh, Barbados, Belarus, Belgium, Belize, Benin, Bermuda, Bhutan, Bolivia, Plurinational State of, Bonaire, Sint Eustatius and Saba, Bosnia and Herzegovina, Botswana, Bouvet Island, Brazil, British Indian Ocean Territory, Brunei Darussalam, Bulgaria, Burkina Faso, Burundi, Cambodia, Cameroon, Canada, Cape Verde, Cayman Islands, Central African Republic, Chad, Chile, China, Christmas Island, Cocos (Keeling) Islands, Colombia, Comoros, Congo, Congo, The Democratic Republic of the, Cook Islands, Costa Rica, C\u00f4te d'Ivoire, Croatia, Cuba, Cura\u00e7ao, Cyprus, Czech Republic, Denmark, Djibouti, Dominica, Dominican Republic, Ecuador, Egypt, El Salvador, Equatorial Guinea, Eritrea, Estonia, Ethiopia, Falkland Islands (Malvinas), Faroe Islands, Fiji, Finland, France, French Guiana, French Polynesia, French Southern Territories, Gabon, Gambia, Georgia, Germany, Ghana, Gibraltar, Greece, Greenland, Grenada, Guadeloupe, Guam, Guatemala, Guernsey, Guinea, Guinea-Bissau, Guyana, Haiti, Heard Island and McDonald Islands, Holy See (Vatican City State), Honduras, Hong Kong, Hungary, Iceland, India, Indonesia, Iran, Islamic Republic of, Iraq, Ireland, Isle of Man, Israel, Italy, Jamaica, Japan, Jersey, Jordan, Kazakhstan, Kenya, Kiribati, Korea, Democratic People's Republic of, Korea, Republic of, Kuwait, Kyrgyzstan, Lao People's Democratic Republic, Latvia, Lebanon, Lesotho, Liberia, Libya, Liechtenstein, Lithuania, Luxembourg, Macao, Macedonia, Republic of, Madagascar, Malawi, Malaysia, Maldives, Mali, Malta, Marshall Islands, Martinique, Mauritania, Mauritius, Mayotte, Mexico, Micronesia, Federated States of, Moldova, Republic of, Monaco, Mongolia, Montenegro, Montserrat, Morocco, Mozambique, Myanmar, Namibia, Nauru, Nepal, Netherlands, New Caledonia, New Zealand, Nicaragua, Niger, Nigeria, Niue, Norfolk Island, Northern Mariana Islands, Norway, Oman, Pakistan, Palau, Palestine, State of, Panama, Papua New Guinea, Paraguay, Peru, Philippines, Pitcairn, Poland, Portugal, Puerto Rico, Qatar, R\u00e9union, Romania, Russian Federation, Rwanda, Saint Barth\u00e9lemy, Saint Helena, Ascension and Tristan da Cunha, Saint Kitts and Nevis, Saint Lucia, Saint Martin (French part), Saint Pierre and Miquelon, Saint Vincent and the Grenadines, Samoa, San Marino, Sao Tome and Principe, Saudi Arabia, Senegal, Serbia, Seychelles, Sierra Leone, Singapore, Sint Maarten (Dutch part), Slovakia, Slovenia, Solomon Islands, Somalia, South Africa, South Georgia and the South Sandwich Islands, Spain, Sri Lanka, Sudan, Suriname, South Sudan, Svalbard and Jan Mayen, Swaziland, Sweden, Switzerland, Syrian Arab Republic, Taiwan, Tajikistan, Tanzania, United Republic of, Thailand, Timor-Leste, Togo, Tokelau, Tonga, Trinidad and Tobago, Tunisia, Turkey, Turkmenistan, Turks and Caicos Islands, Tuvalu, Uganda, Ukraine, United Arab Emirates, United Kingdom, United States, United States Minor Outlying Islands, Uruguay, Uzbekistan, Vanuatu, Venezuela, Bolivarian Republic of, Viet Nam, Virgin Islands, British, Virgin Islands, U.S., Wallis and Futuna, Western Sahara, Yemen, Zambia, Zimbabwe.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "pro_needs_validation", "full_name": "campus[pro_needs_validation]", "description": "\n

Is it pro needs validation ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "logo", "full_name": "campus[logo]", "description": "\n

The logo.

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "website", "full_name": "campus[website]", "description": "\n

The website.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "facebook", "full_name": "campus[facebook]", "description": "\n

The facebook.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "twitter", "full_name": "campus[twitter]", "description": "\n

The twitter.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "display_name", "full_name": "campus[display_name]", "description": "\n

The display name.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "email_extension", "full_name": "campus[email_extension]", "description": "\n

The email extension.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "help_url", "full_name": "campus[help_url]", "description": "\n

The help url.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "active", "full_name": "campus[active]", "description": "\n

Is it active ? Default to true.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "open_to_job_offers", "full_name": "campus[open_to_job_offers]", "description": "\n

Is it open to job offers ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/campus", "versions": [ "2.0" ], "query": null, "request_data": { "campus": { "address": "42007 Mossie Forest", "city": "Danielton", "content_email": "Hi __first_name__", "country": "Bonaire, Sint Eustatius and Saba", "display_name": "42 Paris", "language_id": "1", "logo": "#", "name": "Argentina1", "time_of_community_service_started": "2017-11-22 14:00:00 +0100", "time_zone": "Pacific/Pago_Pago", "website": "http://cruickshankwehner.org/pinkie_reynolds", "zip": "19751-7157" } }, "response_data": { "id": 7, "name": "Argentina1", "time_zone": "Pacific/Pago_Pago", "language": { "id": 1, "name": "Fran\u00e7ais", "identifier": "fr" }, "users_count": 0, "vogsphere_id": null, "endpoint": null }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/campus/update", "name": "update", "apis": [ { "api_url": "/v2/campus/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus", "full_name": "campus", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "campus[name]", "description": "\n

The name. Must be unique.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "time_zone", "full_name": "campus[time_zone]", "description": "\n

The time zone.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: Pacific/Pago_Pago, Pacific/Pago_Pago, Pacific/Pago_Pago, Pacific/Honolulu, America/Juneau, America/Los_Angeles, America/Tijuana, America/Phoenix, America/Chihuahua, America/Mazatlan, America/Denver, America/Guatemala, America/Chicago, America/Mexico_City, America/Mexico_City, America/Monterrey, America/Regina, America/Bogota, America/New_York, America/Indiana/Indianapolis, America/Lima, America/Lima, America/Halifax, America/Caracas, America/Guyana, America/La_Paz, America/Santiago, America/St_Johns, America/Sao_Paulo, America/Argentina/Buenos_Aires, America/Godthab, America/Montevideo, Atlantic/South_Georgia, Atlantic/Azores, Atlantic/Cape_Verde, Europe/London, Europe/Lisbon, Europe/London, Africa/Monrovia, Etc/UTC, Europe/Amsterdam, Europe/Belgrade, Europe/Berlin, Europe/Zurich, Europe/Prague, Europe/Brussels, Europe/Budapest, Africa/Casablanca, Europe/Copenhagen, Europe/Dublin, Europe/Belgrade, Europe/Madrid, Europe/Paris, Europe/Prague, Europe/Rome, Europe/Belgrade, Europe/Belgrade, Europe/Stockholm, Europe/Vienna, Europe/Warsaw, Africa/Algiers, Europe/Belgrade, Europe/Zurich, Europe/Athens, Europe/Bucharest, Africa/Cairo, Africa/Maputo, Europe/Helsinki, Asia/Jerusalem, Europe/Kaliningrad, Europe/Kiev, Africa/Johannesburg, Europe/Riga, Europe/Sofia, Europe/Tallinn, Europe/Vilnius, Asia/Baghdad, Europe/Istanbul, Asia/Riyadh, Europe/Minsk, Europe/Moscow, Africa/Nairobi, Asia/Riyadh, Europe/Moscow, Asia/Tehran, Asia/Dubai, Asia/Baku, Asia/Dubai, Europe/Samara, Asia/Tbilisi, Europe/Volgograd, Asia/Yerevan, Asia/Kabul, Asia/Yekaterinburg, Asia/Karachi, Asia/Karachi, Asia/Tashkent, Asia/Kolkata, Asia/Kolkata, Asia/Kolkata, Asia/Kolkata, Asia/Colombo, Asia/Kathmandu, Asia/Almaty, Asia/Dhaka, Asia/Dhaka, Asia/Urumqi, Asia/Yangon, Asia/Bangkok, Asia/Bangkok, Asia/Jakarta, Asia/Krasnoyarsk, Asia/Novosibirsk, Asia/Shanghai, Asia/Shanghai, Asia/Hong_Kong, Asia/Irkutsk, Asia/Kuala_Lumpur, Australia/Perth, Asia/Singapore, Asia/Taipei, Asia/Ulaanbaatar, Asia/Tokyo, Asia/Tokyo, Asia/Seoul, Asia/Tokyo, Asia/Yakutsk, Australia/Adelaide, Australia/Darwin, Australia/Brisbane, Australia/Melbourne, Pacific/Guam, Australia/Hobart, Australia/Melbourne, Pacific/Port_Moresby, Australia/Sydney, Asia/Vladivostok, Asia/Magadan, Pacific/Noumea, Pacific/Guadalcanal, Asia/Srednekolymsk, Pacific/Auckland, Pacific/Fiji, Asia/Kamchatka, Pacific/Majuro, Pacific/Auckland, Pacific/Chatham, Pacific/Tongatapu, Pacific/Apia, Pacific/Fakaofo.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language_id", "full_name": "campus[language_id]", "description": "\n

The language id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "campus[slug]", "description": "\n

The slug.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "main_email", "full_name": "campus[main_email]", "description": "\n

The main email.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "endpoint_id", "full_name": "campus[endpoint_id]", "description": "\n

The endpoint id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "vogsphere_id", "full_name": "campus[vogsphere_id]", "description": "\n

The vogsphere id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "content_email", "full_name": "campus[content_email]", "description": "\n

The content email.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "time_of_community_service_started", "full_name": "campus[time_of_community_service_started]", "description": "\n

The time of community service started.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "companies_mail", "full_name": "campus[companies_mail]", "description": "\n

The companies mail.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "address", "full_name": "campus[address]", "description": "\n

The address.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "zip", "full_name": "campus[zip]", "description": "\n

The zip.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "city", "full_name": "campus[city]", "description": "\n

The city.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "country", "full_name": "campus[country]", "description": "\n

The country.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: Afghanistan, \u00c5land Islands, Albania, Algeria, American Samoa, Andorra, Angola, Anguilla, Antarctica, Antigua and Barbuda, Argentina, Armenia, Aruba, Australia, Austria, Azerbaijan, Bahamas, Bahrain, Bangladesh, Barbados, Belarus, Belgium, Belize, Benin, Bermuda, Bhutan, Bolivia, Plurinational State of, Bonaire, Sint Eustatius and Saba, Bosnia and Herzegovina, Botswana, Bouvet Island, Brazil, British Indian Ocean Territory, Brunei Darussalam, Bulgaria, Burkina Faso, Burundi, Cambodia, Cameroon, Canada, Cape Verde, Cayman Islands, Central African Republic, Chad, Chile, China, Christmas Island, Cocos (Keeling) Islands, Colombia, Comoros, Congo, Congo, The Democratic Republic of the, Cook Islands, Costa Rica, C\u00f4te d'Ivoire, Croatia, Cuba, Cura\u00e7ao, Cyprus, Czech Republic, Denmark, Djibouti, Dominica, Dominican Republic, Ecuador, Egypt, El Salvador, Equatorial Guinea, Eritrea, Estonia, Ethiopia, Falkland Islands (Malvinas), Faroe Islands, Fiji, Finland, France, French Guiana, French Polynesia, French Southern Territories, Gabon, Gambia, Georgia, Germany, Ghana, Gibraltar, Greece, Greenland, Grenada, Guadeloupe, Guam, Guatemala, Guernsey, Guinea, Guinea-Bissau, Guyana, Haiti, Heard Island and McDonald Islands, Holy See (Vatican City State), Honduras, Hong Kong, Hungary, Iceland, India, Indonesia, Iran, Islamic Republic of, Iraq, Ireland, Isle of Man, Israel, Italy, Jamaica, Japan, Jersey, Jordan, Kazakhstan, Kenya, Kiribati, Korea, Democratic People's Republic of, Korea, Republic of, Kuwait, Kyrgyzstan, Lao People's Democratic Republic, Latvia, Lebanon, Lesotho, Liberia, Libya, Liechtenstein, Lithuania, Luxembourg, Macao, Macedonia, Republic of, Madagascar, Malawi, Malaysia, Maldives, Mali, Malta, Marshall Islands, Martinique, Mauritania, Mauritius, Mayotte, Mexico, Micronesia, Federated States of, Moldova, Republic of, Monaco, Mongolia, Montenegro, Montserrat, Morocco, Mozambique, Myanmar, Namibia, Nauru, Nepal, Netherlands, New Caledonia, New Zealand, Nicaragua, Niger, Nigeria, Niue, Norfolk Island, Northern Mariana Islands, Norway, Oman, Pakistan, Palau, Palestine, State of, Panama, Papua New Guinea, Paraguay, Peru, Philippines, Pitcairn, Poland, Portugal, Puerto Rico, Qatar, R\u00e9union, Romania, Russian Federation, Rwanda, Saint Barth\u00e9lemy, Saint Helena, Ascension and Tristan da Cunha, Saint Kitts and Nevis, Saint Lucia, Saint Martin (French part), Saint Pierre and Miquelon, Saint Vincent and the Grenadines, Samoa, San Marino, Sao Tome and Principe, Saudi Arabia, Senegal, Serbia, Seychelles, Sierra Leone, Singapore, Sint Maarten (Dutch part), Slovakia, Slovenia, Solomon Islands, Somalia, South Africa, South Georgia and the South Sandwich Islands, Spain, Sri Lanka, Sudan, Suriname, South Sudan, Svalbard and Jan Mayen, Swaziland, Sweden, Switzerland, Syrian Arab Republic, Taiwan, Tajikistan, Tanzania, United Republic of, Thailand, Timor-Leste, Togo, Tokelau, Tonga, Trinidad and Tobago, Tunisia, Turkey, Turkmenistan, Turks and Caicos Islands, Tuvalu, Uganda, Ukraine, United Arab Emirates, United Kingdom, United States, United States Minor Outlying Islands, Uruguay, Uzbekistan, Vanuatu, Venezuela, Bolivarian Republic of, Viet Nam, Virgin Islands, British, Virgin Islands, U.S., Wallis and Futuna, Western Sahara, Yemen, Zambia, Zimbabwe.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "pro_needs_validation", "full_name": "campus[pro_needs_validation]", "description": "\n

Is it pro needs validation ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "logo", "full_name": "campus[logo]", "description": "\n

The logo.

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "website", "full_name": "campus[website]", "description": "\n

The website.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "facebook", "full_name": "campus[facebook]", "description": "\n

The facebook.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "twitter", "full_name": "campus[twitter]", "description": "\n

The twitter.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "display_name", "full_name": "campus[display_name]", "description": "\n

The display name.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "email_extension", "full_name": "campus[email_extension]", "description": "\n

The email extension.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "help_url", "full_name": "campus[help_url]", "description": "\n

The help url.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "active", "full_name": "campus[active]", "description": "\n

Is it active ? Default to true.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "open_to_job_offers", "full_name": "campus[open_to_job_offers]", "description": "\n

Is it open to job offers ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/campus/3", "versions": [ "2.0" ], "query": null, "request_data": { "campus": { "address": "42007 Mossie Forest", "city": "Danielton", "content_email": "Hi __first_name__", "country": "Bonaire, Sint Eustatius and Saba", "display_name": "42 Paris", "language_id": "3", "logo": "#", "name": "Jamaica2", "time_of_community_service_started": "2017-11-22 14:00:00 +0100", "time_zone": "Asia/Kathmandu", "website": "http://cruickshankwehner.org/pinkie_reynolds", "zip": "19751-7157" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/campus/stats", "name": "stats", "apis": [ { "api_url": "/v2/campus/:campus_id/stats", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "campus", "full_name": "campus", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "campus[name]", "description": "\n

The name. Must be unique.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "time_zone", "full_name": "campus[time_zone]", "description": "\n

The time zone.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: Pacific/Pago_Pago, Pacific/Pago_Pago, Pacific/Pago_Pago, Pacific/Honolulu, America/Juneau, America/Los_Angeles, America/Tijuana, America/Phoenix, America/Chihuahua, America/Mazatlan, America/Denver, America/Guatemala, America/Chicago, America/Mexico_City, America/Mexico_City, America/Monterrey, America/Regina, America/Bogota, America/New_York, America/Indiana/Indianapolis, America/Lima, America/Lima, America/Halifax, America/Caracas, America/Guyana, America/La_Paz, America/Santiago, America/St_Johns, America/Sao_Paulo, America/Argentina/Buenos_Aires, America/Godthab, America/Montevideo, Atlantic/South_Georgia, Atlantic/Azores, Atlantic/Cape_Verde, Europe/London, Europe/Lisbon, Europe/London, Africa/Monrovia, Etc/UTC, Europe/Amsterdam, Europe/Belgrade, Europe/Berlin, Europe/Zurich, Europe/Prague, Europe/Brussels, Europe/Budapest, Africa/Casablanca, Europe/Copenhagen, Europe/Dublin, Europe/Belgrade, Europe/Madrid, Europe/Paris, Europe/Prague, Europe/Rome, Europe/Belgrade, Europe/Belgrade, Europe/Stockholm, Europe/Vienna, Europe/Warsaw, Africa/Algiers, Europe/Belgrade, Europe/Zurich, Europe/Athens, Europe/Bucharest, Africa/Cairo, Africa/Maputo, Europe/Helsinki, Asia/Jerusalem, Europe/Kaliningrad, Europe/Kiev, Africa/Johannesburg, Europe/Riga, Europe/Sofia, Europe/Tallinn, Europe/Vilnius, Asia/Baghdad, Europe/Istanbul, Asia/Riyadh, Europe/Minsk, Europe/Moscow, Africa/Nairobi, Asia/Riyadh, Europe/Moscow, Asia/Tehran, Asia/Dubai, Asia/Baku, Asia/Dubai, Europe/Samara, Asia/Tbilisi, Europe/Volgograd, Asia/Yerevan, Asia/Kabul, Asia/Yekaterinburg, Asia/Karachi, Asia/Karachi, Asia/Tashkent, Asia/Kolkata, Asia/Kolkata, Asia/Kolkata, Asia/Kolkata, Asia/Colombo, Asia/Kathmandu, Asia/Almaty, Asia/Dhaka, Asia/Dhaka, Asia/Urumqi, Asia/Yangon, Asia/Bangkok, Asia/Bangkok, Asia/Jakarta, Asia/Krasnoyarsk, Asia/Novosibirsk, Asia/Shanghai, Asia/Shanghai, Asia/Hong_Kong, Asia/Irkutsk, Asia/Kuala_Lumpur, Australia/Perth, Asia/Singapore, Asia/Taipei, Asia/Ulaanbaatar, Asia/Tokyo, Asia/Tokyo, Asia/Seoul, Asia/Tokyo, Asia/Yakutsk, Australia/Adelaide, Australia/Darwin, Australia/Brisbane, Australia/Melbourne, Pacific/Guam, Australia/Hobart, Australia/Melbourne, Pacific/Port_Moresby, Australia/Sydney, Asia/Vladivostok, Asia/Magadan, Pacific/Noumea, Pacific/Guadalcanal, Asia/Srednekolymsk, Pacific/Auckland, Pacific/Fiji, Asia/Kamchatka, Pacific/Majuro, Pacific/Auckland, Pacific/Chatham, Pacific/Tongatapu, Pacific/Apia, Pacific/Fakaofo.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language_id", "full_name": "campus[language_id]", "description": "\n

The language id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "campus[slug]", "description": "\n

The slug.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "main_email", "full_name": "campus[main_email]", "description": "\n

The main email.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "endpoint_id", "full_name": "campus[endpoint_id]", "description": "\n

The endpoint id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "vogsphere_id", "full_name": "campus[vogsphere_id]", "description": "\n

The vogsphere id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "content_email", "full_name": "campus[content_email]", "description": "\n

The content email.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "time_of_community_service_started", "full_name": "campus[time_of_community_service_started]", "description": "\n

The time of community service started.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "companies_mail", "full_name": "campus[companies_mail]", "description": "\n

The companies mail.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "address", "full_name": "campus[address]", "description": "\n

The address.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "zip", "full_name": "campus[zip]", "description": "\n

The zip.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "city", "full_name": "campus[city]", "description": "\n

The city.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "country", "full_name": "campus[country]", "description": "\n

The country.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: Afghanistan, \u00c5land Islands, Albania, Algeria, American Samoa, Andorra, Angola, Anguilla, Antarctica, Antigua and Barbuda, Argentina, Armenia, Aruba, Australia, Austria, Azerbaijan, Bahamas, Bahrain, Bangladesh, Barbados, Belarus, Belgium, Belize, Benin, Bermuda, Bhutan, Bolivia, Plurinational State of, Bonaire, Sint Eustatius and Saba, Bosnia and Herzegovina, Botswana, Bouvet Island, Brazil, British Indian Ocean Territory, Brunei Darussalam, Bulgaria, Burkina Faso, Burundi, Cambodia, Cameroon, Canada, Cape Verde, Cayman Islands, Central African Republic, Chad, Chile, China, Christmas Island, Cocos (Keeling) Islands, Colombia, Comoros, Congo, Congo, The Democratic Republic of the, Cook Islands, Costa Rica, C\u00f4te d'Ivoire, Croatia, Cuba, Cura\u00e7ao, Cyprus, Czech Republic, Denmark, Djibouti, Dominica, Dominican Republic, Ecuador, Egypt, El Salvador, Equatorial Guinea, Eritrea, Estonia, Ethiopia, Falkland Islands (Malvinas), Faroe Islands, Fiji, Finland, France, French Guiana, French Polynesia, French Southern Territories, Gabon, Gambia, Georgia, Germany, Ghana, Gibraltar, Greece, Greenland, Grenada, Guadeloupe, Guam, Guatemala, Guernsey, Guinea, Guinea-Bissau, Guyana, Haiti, Heard Island and McDonald Islands, Holy See (Vatican City State), Honduras, Hong Kong, Hungary, Iceland, India, Indonesia, Iran, Islamic Republic of, Iraq, Ireland, Isle of Man, Israel, Italy, Jamaica, Japan, Jersey, Jordan, Kazakhstan, Kenya, Kiribati, Korea, Democratic People's Republic of, Korea, Republic of, Kuwait, Kyrgyzstan, Lao People's Democratic Republic, Latvia, Lebanon, Lesotho, Liberia, Libya, Liechtenstein, Lithuania, Luxembourg, Macao, Macedonia, Republic of, Madagascar, Malawi, Malaysia, Maldives, Mali, Malta, Marshall Islands, Martinique, Mauritania, Mauritius, Mayotte, Mexico, Micronesia, Federated States of, Moldova, Republic of, Monaco, Mongolia, Montenegro, Montserrat, Morocco, Mozambique, Myanmar, Namibia, Nauru, Nepal, Netherlands, New Caledonia, New Zealand, Nicaragua, Niger, Nigeria, Niue, Norfolk Island, Northern Mariana Islands, Norway, Oman, Pakistan, Palau, Palestine, State of, Panama, Papua New Guinea, Paraguay, Peru, Philippines, Pitcairn, Poland, Portugal, Puerto Rico, Qatar, R\u00e9union, Romania, Russian Federation, Rwanda, Saint Barth\u00e9lemy, Saint Helena, Ascension and Tristan da Cunha, Saint Kitts and Nevis, Saint Lucia, Saint Martin (French part), Saint Pierre and Miquelon, Saint Vincent and the Grenadines, Samoa, San Marino, Sao Tome and Principe, Saudi Arabia, Senegal, Serbia, Seychelles, Sierra Leone, Singapore, Sint Maarten (Dutch part), Slovakia, Slovenia, Solomon Islands, Somalia, South Africa, South Georgia and the South Sandwich Islands, Spain, Sri Lanka, Sudan, Suriname, South Sudan, Svalbard and Jan Mayen, Swaziland, Sweden, Switzerland, Syrian Arab Republic, Taiwan, Tajikistan, Tanzania, United Republic of, Thailand, Timor-Leste, Togo, Tokelau, Tonga, Trinidad and Tobago, Tunisia, Turkey, Turkmenistan, Turks and Caicos Islands, Tuvalu, Uganda, Ukraine, United Arab Emirates, United Kingdom, United States, United States Minor Outlying Islands, Uruguay, Uzbekistan, Vanuatu, Venezuela, Bolivarian Republic of, Viet Nam, Virgin Islands, British, Virgin Islands, U.S., Wallis and Futuna, Western Sahara, Yemen, Zambia, Zimbabwe.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "pro_needs_validation", "full_name": "campus[pro_needs_validation]", "description": "\n

Is it pro needs validation ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "logo", "full_name": "campus[logo]", "description": "\n

The logo.

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "website", "full_name": "campus[website]", "description": "\n

The website.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "facebook", "full_name": "campus[facebook]", "description": "\n

The facebook.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "twitter", "full_name": "campus[twitter]", "description": "\n

The twitter.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "display_name", "full_name": "campus[display_name]", "description": "\n

The display name.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "email_extension", "full_name": "campus[email_extension]", "description": "\n

The email extension.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "help_url", "full_name": "campus[help_url]", "description": "\n

The help url.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "active", "full_name": "campus[active]", "description": "\n

Is it active ? Default to true.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "open_to_job_offers", "full_name": "campus[open_to_job_offers]", "description": "\n

Is it open to job offers ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": null, "see": [], "headers": [], "show": true } ], "headers": [] }, "campus_users_activities": { "doc_url": "/apidoc/2.0/campus_users_activities", "api_url": "/api", "name": "Campus users activities", "short_description": "Get all the users activities for a campus", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/campus_users_activities/index", "name": "index", "apis": [ { "api_url": "/v2/campus/journal", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "begin_at", "full_name": "begin_at", "description": "\n

begin_at must be before or equal to end_at, your date range must be 124 days maximum

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "end_at", "description": "\n

end_at must be after or equal to begin_at, your date range must be 124 days maximum

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "POST", "path": "/v2/campus/journal", "versions": [ "2.0" ], "query": "", "request_data": { "begin_at": "2020-01-01", "end_at": "2020-04-01" }, "response_data": [ { "event_at": "2020-01-02", "user_id": 69936, "cursus_id": 9, "reason": "Used intranet", "count": 1 }, { "event_at": "2020-01-02", "user_id": 69937, "cursus_id": 9, "reason": "Used intranet", "count": 1 }, { "event_at": "2020-01-03", "user_id": 69936, "cursus_id": 9, "reason": "Was evaluated by someone", "count": 1 } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_staff" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "campus_users": { "doc_url": "/apidoc/2.0/campus_users", "api_url": "/api", "name": "Campus users", "short_description": "The users wich are in a campus", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/campus_users/index", "name": "index", "apis": [ { "api_url": "/v2/campus_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/campus_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, campus_id, is_primary, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "user_id", "campus_id", "is_primary", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, campus_id, is_primary, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "user_id", "campus_id", "is_primary", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, campus_id, is_primary, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "user_id", "campus_id", "is_primary", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/campus_users/show", "name": "show", "apis": [ { "api_url": "/v2/campus_users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/campus_users/126", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 126, "user_id": 126, "campus_id": 1, "is_primary": true }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/campus_users/create", "name": "create", "apis": [ { "api_url": "/v2/campus_users", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/campus_users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_user", "full_name": "campus_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "campus_id", "full_name": "campus_user[campus_id]", "description": "\n

The campus id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "campus_user[user_id]", "description": "\n

The user id. Must be unique in the scope of a given campus.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "is_primary", "full_name": "campus_user[is_primary]", "description": "\n

Is it is primary ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/campus_users", "versions": [ "2.0" ], "query": null, "request_data": { "campus_user": { "campus_id": "6", "user_id": "1" } }, "response_data": { "id": 127, "user_id": 1, "campus_id": 6, "is_primary": false }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/campus_users/update", "name": "update", "apis": [ { "api_url": "/v2/campus_users/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus_users/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_user", "full_name": "campus_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "campus_id", "full_name": "campus_user[campus_id]", "description": "\n

The campus id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "campus_user[user_id]", "description": "\n

The user id. Must be unique in the scope of a given campus.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "is_primary", "full_name": "campus_user[is_primary]", "description": "\n

Is it is primary ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/campus_users/126", "versions": [ "2.0" ], "query": null, "request_data": { "campus_user": { "campus_id": "6", "user_id": "1" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/campus_users/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/campus_users/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "certificates": { "doc_url": "/apidoc/2.0/certificates", "api_url": "/api", "name": "Certificates", "short_description": "certificates", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/certificates/index", "name": "index", "apis": [ { "api_url": "/v2/certificates", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] }, { "name": "certificate", "full_name": "certificate", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "certificate[name]", "description": "\n

The name. Must be unique.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "content", "full_name": "certificate[content]", "description": "\n

The content.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "total_certificate_number", "full_name": "certificate[total_certificate_number]", "description": "\n

The total certificate number.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "image", "full_name": "certificate[image]", "description": "\n

The image.

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "certificate[cursus_id]", "description": "\n

The cursus id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/certificates/show", "name": "show", "apis": [ { "api_url": "/v2/certificates/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "certificate", "full_name": "certificate", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "certificate[name]", "description": "\n

The name. Must be unique.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "content", "full_name": "certificate[content]", "description": "\n

The content.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "total_certificate_number", "full_name": "certificate[total_certificate_number]", "description": "\n

The total certificate number.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "image", "full_name": "certificate[image]", "description": "\n

The image.

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "certificate[cursus_id]", "description": "\n

The cursus id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "certificates_users": { "doc_url": "/apidoc/2.0/certificates_users", "api_url": "/api", "name": "Certificates users", "short_description": "User belonging to a certificate.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/certificates_users/index", "name": "index", "apis": [ { "api_url": "/v2/certificates_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/certificates/:certificate_id/certificates_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/certificates_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "certificate_id", "full_name": "certificate_id", "description": "\n

The certificate id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] }, { "name": "certificates_user", "full_name": "certificates_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "certificate_id", "full_name": "certificates_user[certificate_id]", "description": "\n

The certificate id. Must be unique in the scope of a given user.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "certificates_user[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "certificate_number", "full_name": "certificates_user[certificate_number]", "description": "\n

The certificate number.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "qrcode", "full_name": "certificates_user[qrcode]", "description": "\n

The qrcode.

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/certificates_users/show", "name": "show", "apis": [ { "api_url": "/v2/certificates_users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "certificates_user", "full_name": "certificates_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "certificate_id", "full_name": "certificates_user[certificate_id]", "description": "\n

The certificate id. Must be unique in the scope of a given user.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "certificates_user[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "certificate_number", "full_name": "certificates_user[certificate_number]", "description": "\n

The certificate number.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "qrcode", "full_name": "certificates_user[qrcode]", "description": "\n

The qrcode.

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "closes": { "doc_url": "/apidoc/2.0/closes", "api_url": "/api", "name": "Closes", "short_description": "The closing of a 42 account", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/closes/index", "name": "index", "apis": [ { "api_url": "/v2/closes", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/closes", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, closer_id, reason, state, created_at, updated_at, kind.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "user_id", "closer_id", "reason", "state", "created_at", "updated_at", "kind" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, closer_id, reason, state, created_at, updated_at, kind.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "user_id", "closer_id", "reason", "state", "created_at", "updated_at", "kind" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, closer_id, reason, state, created_at, updated_at, kind.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "user_id", "closer_id", "reason", "state", "created_at", "updated_at", "kind" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/closes", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 2, "reason": "Connecticut giants", "state": "unclose", "created_at": "2017-11-22T13:42:20.888Z", "updated_at": "2017-11-22T13:42:20.987Z", "community_services": [ { "id": 2, "duration": 14400, "schedule_at": "2017-11-28T06:00:00.000Z", "occupation": "West Virginia lions", "state": "schedule", "created_at": "2017-11-22T13:42:20.944Z", "updated_at": "2017-11-22T13:42:21.007Z" } ], "user": { "id": 82, "login": "kyren", "url": "https://api.intra.42.fr/v2/users/kyren" }, "closer": { "id": 2, "login": "andre", "url": "https://api.intra.42.fr/v2/users/andre" } }, { "id": 1, "reason": "Florida druids", "state": "unclose", "created_at": "2017-11-22T13:42:20.695Z", "updated_at": "2017-11-22T13:42:20.857Z", "community_services": [ { "id": 1, "duration": 14400, "schedule_at": "2017-11-27T11:00:00.000Z", "occupation": "North Carolina spirits", "state": "schedule", "created_at": "2017-11-22T13:42:20.806Z", "updated_at": "2017-11-22T13:42:20.876Z" } ], "user": { "id": 114, "login": "darmaul", "url": "https://api.intra.42.fr/v2/users/darmaul" }, "closer": { "id": 3, "login": "gargamel", "url": "https://api.intra.42.fr/v2/users/gargamel" } } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30, "required_scopes": [ "tig" ], "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/closes/show", "name": "show", "apis": [ { "api_url": "/v2/closes/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/closes/2", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 2, "reason": "Connecticut giants", "state": "unclose", "created_at": "2017-11-22T13:42:20.888Z", "updated_at": "2017-11-22T13:42:20.987Z", "community_services": [ { "id": 2, "duration": 14400, "schedule_at": "2017-11-28T06:00:00.000Z", "occupation": "West Virginia lions", "state": "schedule", "created_at": "2017-11-22T13:42:20.944Z", "updated_at": "2017-11-22T13:42:21.007Z" } ], "user": { "id": 82, "login": "kyren", "url": "https://api.intra.42.fr/v2/users/kyren" }, "closer": { "id": 2, "login": "andre", "url": "https://api.intra.42.fr/v2/users/andre" } }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "tig" ], "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/closes/create", "name": "create", "apis": [ { "api_url": "/v2/closes", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/closes", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

If you want to link a community service with this close, pass it trough the community_services_attributes array attribute. An email is automatically sent to the user when he is assigned to a community service.

\n", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "close", "full_name": "close", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "close[user_id]", "description": "\n

The closed user

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "closer_id", "full_name": "close[closer_id]", "description": "\n

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

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "close[kind]", "description": "\n

The close kind

\n", "required": true, "allow_nil": false, "validator": "Must be one of: agu, other, deserter, black_hole, serious_misconduct, social_security, non_admitted.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "reason", "full_name": "close[reason]", "description": "\n

The reason of this close

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "community_services_attributes", "full_name": "close[community_services_attributes]", "description": "\n

The linked community service(s)

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "duration", "full_name": "close[community_services_attributes][duration]", "description": "\n

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

\n", "required": true, "allow_nil": false, "validator": "Must be one of: 7200, 14400, 28800.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "occupation", "full_name": "close[community_services_attributes][occupation]", "description": "\n

The community service occupation

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/closes", "versions": [ "2.0" ], "query": null, "request_data": { "close": { "closer_id": "2", "kind": "other", "reason": "Mange des patates douces en cluster \ud83c\udf60", "state": "close", "user_id": "64" } }, "response_data": { "id": 3, "reason": "Mange des patates douces en cluster \ud83c\udf60", "state": "close", "created_at": "2017-11-22T13:43:29.676Z", "updated_at": "2017-11-22T13:43:29.676Z", "community_services": [], "user": { "id": 64, "login": "shepalpa", "url": "https://api.intra.42.fr/v2/users/shepalpa" }, "closer": { "id": 2, "login": "andre", "url": "https://api.intra.42.fr/v2/users/andre" } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "tig" ], "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/closes/update", "name": "update", "apis": [ { "api_url": "/v2/closes/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/closes/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "close", "full_name": "close", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "close[user_id]", "description": "\n

The closed user

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "closer_id", "full_name": "close[closer_id]", "description": "\n

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

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "close[kind]", "description": "\n

The close kind

\n", "required": false, "allow_nil": false, "validator": "Must be one of: agu, other, deserter, black_hole, serious_misconduct, social_security, non_admitted.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "reason", "full_name": "close[reason]", "description": "\n

The reason of this close

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "community_services_attributes", "full_name": "close[community_services_attributes]", "description": "\n

The linked community service(s)

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "duration", "full_name": "close[community_services_attributes][duration]", "description": "\n

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

\n", "required": false, "allow_nil": false, "validator": "Must be one of: 7200, 14400, 28800.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "occupation", "full_name": "close[community_services_attributes][occupation]", "description": "\n

The community service occupation

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/closes/2", "versions": [ "2.0" ], "query": null, "request_data": { "close": { "closer_id": "1", "kind": "other", "reason": "Mange des patates douces en cluster \ud83c\udf60", "state": "close", "user_id": "41" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "tig" ], "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/closes/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/closes/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "close", "full_name": "close", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "close[user_id]", "description": "\n

The closed user

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "closer_id", "full_name": "close[closer_id]", "description": "\n

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

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "close[kind]", "description": "\n

The close kind

\n", "required": false, "allow_nil": false, "validator": "Must be one of: agu, other, deserter, black_hole, serious_misconduct, social_security, non_admitted.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "reason", "full_name": "close[reason]", "description": "\n

The reason of this close

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "community_services_attributes", "full_name": "close[community_services_attributes]", "description": "\n

The linked community service(s)

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "duration", "full_name": "close[community_services_attributes][duration]", "description": "\n

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

\n", "required": false, "allow_nil": false, "validator": "Must be one of: 7200, 14400, 28800.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "occupation", "full_name": "close[community_services_attributes][occupation]", "description": "\n

The community service occupation

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "DELETE", "path": "/v2/closes/2", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "tig" ], "roles": [ "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/closes/unclose", "name": "unclose", "apis": [ { "api_url": "/v2/closes/:id/unclose", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/closes/:id/unclose", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Change the close state from close to unclose.

\n", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "required_scopes": [ "tig" ], "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/closes/close", "name": "close", "apis": [ { "api_url": "/v2/closes/:id/close", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/closes/:id/close", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Change the close state from unclose to close.

\n", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "required_scopes": [ "tig" ], "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "coalitions": { "doc_url": "/apidoc/2.0/coalitions", "api_url": "/api", "name": "Coalitions", "short_description": "A users competing inside of a bloc.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/coalitions/index", "name": "index", "apis": [ { "api_url": "/v2/coalitions", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/coalitions", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/blocs/:bloc_id/coalitions", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "bloc_id", "full_name": "bloc_id", "description": "\n

The bloc id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, bloc_id, user_id, name, image, slug, created_at, updated_at, color, cover.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "bloc_id", "user_id", "name", "image", "slug", "created_at", "updated_at", "color", "cover" ] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] }, { "name": "coalition", "full_name": "coalition", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "bloc_id", "full_name": "coalition[bloc_id]", "description": "\n

The bloc id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "coalition[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "coalition[name]", "description": "\n

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

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "image", "full_name": "coalition[image]", "description": "\n

The image.

\n", "required": false, "allow_nil": false, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "coalition[slug]", "description": "\n

The slug.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "color", "full_name": "coalition[color]", "description": "\n

The color.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cover", "full_name": "coalition[cover]", "description": "\n

The cover.

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/coalitions", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 2, "name": "Kansas giants", "slug": "super-slug", "image_url": "https://admin.intra.42.fr/uploads/coalition/image/2/logo.svg", "color": "#087262", "score": 83, "user_id": 90 }, { "id": 1, "name": "Indiana goblins", "slug": "super-slug", "image_url": "https://admin.intra.42.fr/uploads/coalition/image/1/logo.svg", "color": "#1c7f08", "score": 54, "user_id": 38 } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/coalitions/show", "name": "show", "apis": [ { "api_url": "/v2/coalitions/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "coalition", "full_name": "coalition", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "bloc_id", "full_name": "coalition[bloc_id]", "description": "\n

The bloc id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "coalition[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "coalition[name]", "description": "\n

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

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "image", "full_name": "coalition[image]", "description": "\n

The image.

\n", "required": false, "allow_nil": false, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "coalition[slug]", "description": "\n

The slug.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "color", "full_name": "coalition[color]", "description": "\n

The color.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cover", "full_name": "coalition[cover]", "description": "\n

The cover.

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/coalitions/2", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 2, "name": "Kansas giants", "slug": "super-slug", "image_url": "https://admin.intra.42.fr/uploads/coalition/image/2/logo.svg", "color": "#087262", "score": 83, "user_id": 90 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/coalitions/create", "name": "create", "apis": [ { "api_url": "/v2/coalitions", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "coalition", "full_name": "coalition", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "bloc_id", "full_name": "coalition[bloc_id]", "description": "\n

The bloc id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "coalition[user_id]", "description": "\n

The user id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "coalition[name]", "description": "\n

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

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "image", "full_name": "coalition[image]", "description": "\n

The image.

\n", "required": true, "allow_nil": false, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "coalition[slug]", "description": "\n

The slug.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "color", "full_name": "coalition[color]", "description": "\n

The color.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cover", "full_name": "coalition[cover]", "description": "\n

The cover.

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/coalitions", "versions": [ "2.0" ], "query": null, "request_data": { "coalition": { "name": "rabbits", "bloc_id": "1", "user_id": "35", "image": { "tempfile": [], "original_filename": "logo.svg", "content_type": "image/svg+xml", "headers": "Content-Disposition: form-data; name=\"coalition[image]\"; filename=\"logo.svg\"\r\nContent-Type: image/svg+xml\r\nContent-Length: 2989\r\n" }, "color": "#4231d7" } }, "response_data": { "id": 3, "name": "rabbits", "slug": "rabbits", "image_url": "https://admin.intra.42.fr/uploads/coalition/image/3/logo.svg", "color": "#4231d7", "score": 0, "user_id": 35 }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/coalitions/update", "name": "update", "apis": [ { "api_url": "/v2/coalitions/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/coalitions/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "coalition", "full_name": "coalition", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "bloc_id", "full_name": "coalition[bloc_id]", "description": "\n

The bloc id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "coalition[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "coalition[name]", "description": "\n

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

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "image", "full_name": "coalition[image]", "description": "\n

The image.

\n", "required": false, "allow_nil": false, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "coalition[slug]", "description": "\n

The slug.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "color", "full_name": "coalition[color]", "description": "\n

The color.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cover", "full_name": "coalition[cover]", "description": "\n

The cover.

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/coalitions/2", "versions": [ "2.0" ], "query": null, "request_data": { "coalition": { "name": "monkeys", "bloc_id": "1", "user_id": "34", "image": { "tempfile": [], "original_filename": "logo.svg", "content_type": "image/svg+xml", "headers": "Content-Disposition: form-data; name=\"coalition[image]\"; filename=\"logo.svg\"\r\nContent-Type: image/svg+xml\r\nContent-Length: 2989\r\n" }, "color": "#f8f45d" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "coalitions_users": { "doc_url": "/apidoc/2.0/coalitions_users", "api_url": "/api", "name": "Coalitions users", "short_description": "coalition.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/coalitions_users/index", "name": "index", "apis": [ { "api_url": "/v2/coalitions/:coalition_id/coalitions_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/coalitions_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/coalitions_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "coalition_id", "full_name": "coalition_id", "description": "\n

The coalition id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, coalition_id, user_id, created_at, updated_at, this_year_score, this_year_score_updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "coalition_id", "user_id", "created_at", "updated_at", "this_year_score", "this_year_score_updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, coalition_id, user_id, created_at, updated_at, this_year_score, this_year_score_updated_at, this_year_score_updated.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "coalition_id", "user_id", "created_at", "updated_at", "this_year_score", "this_year_score_updated_at", "this_year_score_updated" ], "additional": { "this_year_score_updated": { "proc": {}, "all": [ "true", "false" ], "description": "Return only this_year_score_updated coalitions users" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, coalition_id, user_id, created_at, updated_at, this_year_score, this_year_score_updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "coalition_id", "user_id", "created_at", "updated_at", "this_year_score", "this_year_score_updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] }, { "name": "coalitions_user", "full_name": "coalitions_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "coalition_id", "full_name": "coalitions_user[coalition_id]", "description": "\n

The coalition id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "coalitions_user[user_id]", "description": "\n

The user id. Must be unique in the scope of a given coalition.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "this_year_score", "full_name": "coalitions_user[this_year_score]", "description": "\n

The this year score.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "this_year_score_updated_at", "full_name": "coalitions_user[this_year_score_updated_at]", "description": "\n

The this year score updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/coalitions_users", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 4, "coalition_id": 1, "user_id": 67, "created_at": "2017-11-22T13:42:09.775Z", "updated_at": "2017-11-22T13:42:09.775Z" }, { "id": 3, "coalition_id": 1, "user_id": 25, "created_at": "2017-11-22T13:42:09.750Z", "updated_at": "2017-11-22T13:42:09.750Z" }, { "id": 2, "coalition_id": 2, "user_id": 23, "created_at": "2017-11-22T13:42:09.723Z", "updated_at": "2017-11-22T13:42:09.723Z" } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/coalitions_users/show", "name": "show", "apis": [ { "api_url": "/v2/coalitions_users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "coalitions_user", "full_name": "coalitions_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "coalition_id", "full_name": "coalitions_user[coalition_id]", "description": "\n

The coalition id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "coalitions_user[user_id]", "description": "\n

The user id. Must be unique in the scope of a given coalition.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "this_year_score", "full_name": "coalitions_user[this_year_score]", "description": "\n

The this year score.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "this_year_score_updated_at", "full_name": "coalitions_user[this_year_score_updated_at]", "description": "\n

The this year score updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/coalitions_users/4", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 4, "coalition_id": 1, "user_id": 67, "created_at": "2017-11-22T13:42:09.775Z", "updated_at": "2017-11-22T13:42:09.775Z" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/coalitions_users/create", "name": "create", "apis": [ { "api_url": "/v2/coalitions_users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "coalitions_user", "full_name": "coalitions_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "coalition_id", "full_name": "coalitions_user[coalition_id]", "description": "\n

The coalition id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "coalitions_user[user_id]", "description": "\n

The user id. Must be unique in the scope of a given coalition.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "this_year_score", "full_name": "coalitions_user[this_year_score]", "description": "\n

The this year score.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "this_year_score_updated_at", "full_name": "coalitions_user[this_year_score_updated_at]", "description": "\n

The this year score updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/coalitions_users", "versions": [ "2.0" ], "query": null, "request_data": { "coalitions_user": { "coalition_id": "2", "user_id": "60" } }, "response_data": { "id": 5, "coalition_id": 2, "user_id": 60, "created_at": "2017-11-22T13:43:31.350Z", "updated_at": "2017-11-22T13:43:31.350Z" }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/coalitions_users/update", "name": "update", "apis": [ { "api_url": "/v2/coalitions_users/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/coalitions_users/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "coalitions_user", "full_name": "coalitions_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "coalition_id", "full_name": "coalitions_user[coalition_id]", "description": "\n

The coalition id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "coalitions_user[user_id]", "description": "\n

The user id. Must be unique in the scope of a given coalition.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "this_year_score", "full_name": "coalitions_user[this_year_score]", "description": "\n

The this year score.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "this_year_score_updated_at", "full_name": "coalitions_user[this_year_score_updated_at]", "description": "\n

The this year score updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/coalitions_users/4", "versions": [ "2.0" ], "query": null, "request_data": { "coalitions_user": { "coalition_id": "2", "user_id": "24" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/coalitions_users/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/coalitions_users/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "coalitions_user", "full_name": "coalitions_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "coalition_id", "full_name": "coalitions_user[coalition_id]", "description": "\n

The coalition id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "coalitions_user[user_id]", "description": "\n

The user id. Must be unique in the scope of a given coalition.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "this_year_score", "full_name": "coalitions_user[this_year_score]", "description": "\n

The this year score.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "this_year_score_updated_at", "full_name": "coalitions_user[this_year_score_updated_at]", "description": "\n

The this year score updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "DELETE", "path": "/v2/coalitions_users/4", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "commands": { "doc_url": "/apidoc/2.0/commands", "api_url": "/api", "name": "Commands", "short_description": "Products are sold on the intranet shop, here are commands", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/commands/index", "name": "index", "apis": [ { "api_url": "/v2/products/:product_id/commands", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:campus_id/products/:product_id/commands", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "product_id", "full_name": "product_id", "description": "\n

The product id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "campus_id", "description": "\n

The campus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, created_at, updated_at, product_id, user_id, owner_id, used, validator_id, validated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "created_at", "updated_at", "product_id", "user_id", "owner_id", "used", "validator_id", "validated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, created_at, updated_at, product_id, user_id, owner_id, used, validator_id, validated_at, validated.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "created_at", "updated_at", "product_id", "user_id", "owner_id", "used", "validator_id", "validated_at", "validated" ], "additional": { "validated": { "proc": {}, "all": [ "true", "false" ], "description": "Return only validated commands" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, created_at, updated_at, product_id, user_id, owner_id, used, validator_id, validated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "created_at", "updated_at", "product_id", "user_id", "owner_id", "used", "validator_id", "validated_at" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/commands/show", "name": "show", "apis": [], "formats": null, "full_description": "", "errors": [], "params": [], "examples": [], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/commands/create", "name": "create", "apis": [], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "command", "full_name": "command", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "command[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "product_id", "full_name": "command[product_id]", "description": "\n

The product id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "command[user_id]", "description": "\n

The user id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "owner_id", "full_name": "command[owner_id]", "description": "\n

The owner id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "used", "full_name": "command[used]", "description": "\n

Is it used ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/commands/update", "name": "update", "apis": [], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "command", "full_name": "command", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "command[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "product_id", "full_name": "command[product_id]", "description": "\n

The product id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "command[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "owner_id", "full_name": "command[owner_id]", "description": "\n

The owner id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "used", "full_name": "command[used]", "description": "\n

Is it used ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/commands/destroy", "name": "destroy", "apis": [], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "command", "full_name": "command", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "command[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "product_id", "full_name": "command[product_id]", "description": "\n

The product id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "command[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "owner_id", "full_name": "command[owner_id]", "description": "\n

The owner id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "used", "full_name": "command[used]", "description": "\n

Is it used ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": {}, "see": [], "headers": [], "show": true } ], "headers": [] }, "community_services": { "doc_url": "/apidoc/2.0/community_services", "api_url": "/api", "name": "Community services", "short_description": "A task that an user have to do for the community. Usually linked with a close.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/community_services/graph", "name": "graph", "apis": [ { "api_url": "/v2/community_services/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at, schedule_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, close_id, tiger_id, duration, schedule_at, occupation, token, state, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "close_id", "tiger_id", "duration", "schedule_at", "occupation", "token", "state", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, close_id, tiger_id, duration, schedule_at, occupation, token, state, created_at, updated_at, schedule.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "close_id", "tiger_id", "duration", "schedule_at", "occupation", "token", "state", "created_at", "updated_at", "schedule" ], "additional": { "schedule": { "proc": {}, "all": [ "true", "false" ], "description": "Return only schedule community services" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, close_id, tiger_id, duration, schedule_at, occupation, token, state, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "close_id", "tiger_id", "duration", "schedule_at", "occupation", "token", "state", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/community_services/graph/on/created_at/by/day", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "2017-11-22": 2 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/community_services/index", "name": "index", "apis": [ { "api_url": "/v2/closes/:close_id/community_services", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/community_services", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "close_id", "full_name": "close_id", "description": "\n

The close id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, close_id, tiger_id, duration, schedule_at, occupation, token, state, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "close_id", "tiger_id", "duration", "schedule_at", "occupation", "token", "state", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, close_id, tiger_id, duration, schedule_at, occupation, token, state, created_at, updated_at, schedule.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "close_id", "tiger_id", "duration", "schedule_at", "occupation", "token", "state", "created_at", "updated_at", "schedule" ], "additional": { "schedule": { "proc": {}, "all": [ "true", "false" ], "description": "Return only schedule community services" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, close_id, tiger_id, duration, schedule_at, occupation, token, state, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "close_id", "tiger_id", "duration", "schedule_at", "occupation", "token", "state", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/community_services.json", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 2, "duration": 14400, "schedule_at": "2017-11-28T06:00:00.000Z", "occupation": "West Virginia lions", "state": "schedule", "created_at": "2017-11-22T13:42:20.944Z", "updated_at": "2017-11-22T13:42:21.007Z", "close": { "id": 2, "reason": "Connecticut giants", "state": "unclose", "created_at": "2017-11-22T13:42:20.888Z", "updated_at": "2017-11-22T13:42:20.987Z" } }, { "id": 1, "duration": 14400, "schedule_at": "2017-11-27T11:00:00.000Z", "occupation": "North Carolina spirits", "state": "schedule", "created_at": "2017-11-22T13:42:20.806Z", "updated_at": "2017-11-22T13:42:20.876Z", "close": { "id": 1, "reason": "Florida druids", "state": "unclose", "created_at": "2017-11-22T13:42:20.695Z", "updated_at": "2017-11-22T13:42:20.857Z" } } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/community_services/show", "name": "show", "apis": [ { "api_url": "/v2/community_services/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/community_services/1.json", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 1, "duration": 14400, "schedule_at": "2017-11-27T11:00:00.000Z", "occupation": "North Carolina spirits", "state": "schedule", "created_at": "2017-11-22T13:42:20.806Z", "updated_at": "2017-11-22T13:42:20.876Z", "close": { "id": 1, "reason": "Florida druids", "state": "unclose", "created_at": "2017-11-22T13:42:20.695Z", "updated_at": "2017-11-22T13:42:20.857Z" } }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/community_services/validate", "name": "validate", "apis": [ { "api_url": "/v2/community_services/:id/validate", "http_method": "PUT", "short_description": "Validate the given community service", "deprecated": null }, { "api_url": "/v2/community_services/:id/validate", "http_method": "PATCH", "short_description": "Validate the given community service", "deprecated": null } ], "formats": null, "full_description": "\n

Set the given community service state to validated

\n", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "required_scopes": [ "tig" ], "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/community_services/invalidate", "name": "invalidate", "apis": [ { "api_url": "/v2/community_services/:id/invalidate", "http_method": "PUT", "short_description": "Invalidate the given community service", "deprecated": null }, { "api_url": "/v2/community_services/:id/invalidate", "http_method": "PATCH", "short_description": "Invalidate the given community service", "deprecated": null } ], "formats": null, "full_description": "\n

Set the given community service state to invalidated

\n", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "required_scopes": [ "tig" ], "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/community_services/create", "name": "create", "apis": [ { "api_url": "/v2/community_services", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Warning: When you use this call, we suggest that you know what you do. If you want to link a community service with this community_service, pass it trough the closes#index API call, with his community_services_attributes array attribute. An email is automatically sent to the user when he is assigned to a community service.

\n", "errors": [], "params": [ { "name": "community_service", "full_name": "community_service", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "duration", "full_name": "community_service[duration]", "description": "\n

The duration.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "occupation", "full_name": "community_service[occupation]", "description": "\n

The occupation.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "schedule_at", "full_name": "community_service[schedule_at]", "description": "\n

The schedule at. Must be after today. Must be before 2 weeks from now.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "close_id", "full_name": "community_service[close_id]", "description": "\n

The close id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "tiger_id", "full_name": "community_service[tiger_id]", "description": "\n

The tiger id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/community_services.json", "versions": [ "2.0" ], "query": null, "request_data": { "community_service": { "close_id": "2", "duration": "14400", "occupation": "Regarder Shrek, en entier, avec Mathieu Trentin", "schedule_at": "2017-11-27 09:00:00 UTC", "tiger_id": "2" } }, "response_data": { "id": 3, "duration": 14400, "schedule_at": "2017-11-27T06:00:00.000Z", "occupation": "Regarder Shrek, en entier, avec Mathieu Trentin", "state": "schedule", "created_at": "2017-11-22T13:43:32.216Z", "updated_at": "2017-11-22T13:43:32.216Z", "close": { "id": 2, "reason": "Connecticut giants", "state": "unclose", "created_at": "2017-11-22T13:42:20.888Z", "updated_at": "2017-11-22T13:42:20.987Z" } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "tig" ], "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/community_services/update", "name": "update", "apis": [ { "api_url": "/v2/community_services/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/community_services/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Warning: When you use this call, we suggest that you know what you do.

\n", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "community_service", "full_name": "community_service", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "duration", "full_name": "community_service[duration]", "description": "\n

The duration.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "occupation", "full_name": "community_service[occupation]", "description": "\n

The occupation.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "schedule_at", "full_name": "community_service[schedule_at]", "description": "\n

The schedule at. Must be after today. Must be before 2 weeks from now.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "close_id", "full_name": "community_service[close_id]", "description": "\n

The close id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "tiger_id", "full_name": "community_service[tiger_id]", "description": "\n

The tiger id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/community_services/1.json", "versions": [ "2.0" ], "query": null, "request_data": { "community_service": { "close_id": "2", "duration": "14400", "occupation": "Regarder Shrek, en entier, avec Mathieu Trentin", "schedule_at": "2017-11-27 09:00:00 UTC", "tiger_id": "2" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "tig" ], "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/community_services/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/community_services/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Warning: When you use this call, we suggest that you know what you do.

\n", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "community_service", "full_name": "community_service", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "duration", "full_name": "community_service[duration]", "description": "\n

The duration.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "occupation", "full_name": "community_service[occupation]", "description": "\n

The occupation.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "schedule_at", "full_name": "community_service[schedule_at]", "description": "\n

The schedule at. Must be after today. Must be before 2 weeks from now.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "close_id", "full_name": "community_service[close_id]", "description": "\n

The close id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "tiger_id", "full_name": "community_service[tiger_id]", "description": "\n

The tiger id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "DELETE", "path": "/v2/community_services/1.json", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "tig" ], "roles": [ "advanced_staff" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "cursus": { "doc_url": "/apidoc/2.0/cursus", "api_url": "/api", "name": "Cursus", "short_description": "An educational cycle in 42", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/cursus/index", "name": "index", "apis": [ { "api_url": "/v2/cursus", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, slug, kind, restricted, is_subscriptable.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "name", "created_at", "updated_at", "slug", "kind", "restricted", "is_subscriptable" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, slug, kind, restricted, is_subscriptable.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "created_at", "updated_at", "slug", "kind", "restricted", "is_subscriptable" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, slug, kind, restricted, is_subscriptable.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "created_at", "updated_at", "slug", "kind", "restricted", "is_subscriptable" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/cursus", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 2, "created_at": "2017-11-22T13:41:00.825Z", "name": "42", "slug": "42" }, { "id": 1, "created_at": "2017-11-22T13:41:00.750Z", "name": "Piscine C", "slug": "piscine-c" } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/cursus/show", "name": "show", "apis": [ { "api_url": "/v2/cursus/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/cursus/2", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 2, "created_at": "2017-11-22T13:41:00.825Z", "name": "42", "slug": "42" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/cursus/create", "name": "create", "apis": [ { "api_url": "/v2/cursus", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "cursus", "full_name": "cursus", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "cursus[name]", "description": "\n

The name. Must be unique.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "cursus[kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: normal, piscine, external.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "skill_ids", "full_name": "cursus[skill_ids]", "description": "\n

The skill ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/cursus", "versions": [ "2.0" ], "query": null, "request_data": { "cursus": { "name": "Oregon tigers", "skill_ids": [ "11", "12" ] } }, "response_data": { "id": 3, "created_at": "2017-11-22T13:43:33.469Z", "name": "Oregon tigers", "slug": "oregon-tigers" }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/cursus/update", "name": "update", "apis": [ { "api_url": "/v2/cursus/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/cursus/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus", "full_name": "cursus", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "cursus[name]", "description": "\n

The name. Must be unique.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "cursus[kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: normal, piscine, external.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "skill_ids", "full_name": "cursus[skill_ids]", "description": "\n

The skill ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/cursus/2", "versions": [ "2.0" ], "query": null, "request_data": { "cursus": { "name": "Oregon kangaroos", "skill_ids": [ "13", "14" ] } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/cursus/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/cursus/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "cursus_users": { "doc_url": "/apidoc/2.0/cursus_users", "api_url": "/api", "name": "Cursus users", "short_description": "The users wich are in a cursus", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/cursus_users/graph", "name": "graph", "apis": [ { "api_url": "/v2/cursus_users/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at, begin_at, end_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, cursus_id, user_id, created_at, updated_at, end_at, begin_at, has_coalition, blackholed_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "cursus_id", "user_id", "created_at", "updated_at", "end_at", "begin_at", "has_coalition", "blackholed_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, cursus_id, user_id, created_at, updated_at, end_at, begin_at, has_coalition, blackholed_at, active, campus_id, end, future, blackholed.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "cursus_id", "user_id", "created_at", "updated_at", "end_at", "begin_at", "has_coalition", "blackholed_at", "active", "campus_id", "end", "future", "blackholed" ], "additional": { "active": { "proc": {}, "all": [ "true", "false" ], "description": "Only return active cursus_users" }, "campus_id": { "proc": {}, "all": [], "description": "Return cursus_users with primary campus of user equal to him" }, "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end cursus users" }, "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only cursus users which begins in the future" }, "blackholed": { "proc": {}, "all": [ "true", "false" ], "description": "Return only blackholed cursus users" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, cursus_id, user_id, created_at, updated_at, end_at, begin_at, has_coalition, blackholed_at, level.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "cursus_id", "user_id", "created_at", "updated_at", "end_at", "begin_at", "has_coalition", "blackholed_at", "level" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/cursus_users/graph/on/created_at/by/day", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "2017-11-22": 126 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/cursus_users/index", "name": "index", "apis": [ { "api_url": "/v2/cursus_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/cursus_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/cursus/:cursus_id/cursus_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "cursus_id", "description": "\n

The cursus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, cursus_id, user_id, created_at, updated_at, end_at, begin_at, has_coalition, blackholed_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "cursus_id", "user_id", "created_at", "updated_at", "end_at", "begin_at", "has_coalition", "blackholed_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, cursus_id, user_id, created_at, updated_at, end_at, begin_at, has_coalition, blackholed_at, active, campus_id, end, future, blackholed.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "cursus_id", "user_id", "created_at", "updated_at", "end_at", "begin_at", "has_coalition", "blackholed_at", "active", "campus_id", "end", "future", "blackholed" ], "additional": { "active": { "proc": {}, "all": [ "true", "false" ], "description": "Only return active cursus_users" }, "campus_id": { "proc": {}, "all": [], "description": "Return cursus_users with primary campus of user equal to him" }, "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end cursus users" }, "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only cursus users which begins in the future" }, "blackholed": { "proc": {}, "all": [ "true", "false" ], "description": "Return only blackholed cursus users" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, cursus_id, user_id, created_at, updated_at, end_at, begin_at, has_coalition, blackholed_at, level.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "cursus_id", "user_id", "created_at", "updated_at", "end_at", "begin_at", "has_coalition", "blackholed_at", "level" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/cursus_users", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 126, "begin_at": "2016-12-16T07:41:39.516Z", "end_at": null, "grade": "Cadet", "level": 0.0, "skills": [], "cursus_id": 2, "has_coalition": true, "user": { "id": 126, "login": "darthcae", "url": "https://api.intra.42.fr/v2/users/darthcae" }, "cursus": { "id": 2, "created_at": "2017-11-22T13:41:00.825Z", "name": "42", "slug": "42" } }, { "id": 125, "begin_at": "2017-11-10T21:38:19.158Z", "end_at": null, "grade": "Cadet", "level": 0.0, "skills": [], "cursus_id": 1, "has_coalition": true, "user": { "id": 125, "login": "sebulseb", "url": "https://api.intra.42.fr/v2/users/sebulseb" }, "cursus": { "id": 1, "created_at": "2017-11-22T13:41:00.750Z", "name": "Piscine C", "slug": "piscine-c" } }, { "id": 124, "begin_at": "2017-07-22T03:48:20.016Z", "end_at": null, "grade": "Cadet", "level": 0.0, "skills": [], "cursus_id": 2, "has_coalition": true, "user": { "id": 124, "login": "hsolo2", "url": "https://api.intra.42.fr/v2/users/hsolo2" }, "cursus": { "id": 2, "created_at": "2017-11-22T13:41:00.825Z", "name": "42", "slug": "42" } } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/cursus_users/show", "name": "show", "apis": [ { "api_url": "/v2/cursus_users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/cursus_users/7", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 7, "begin_at": "2017-06-13T03:05:07.756Z", "end_at": null, "grade": "Cadet", "level": 0.0, "skills": [], "cursus_id": 1, "has_coalition": true, "user": { "id": 7, "login": "jbinks", "url": "https://api.intra.42.fr/v2/users/jbinks" }, "cursus": { "id": 1, "created_at": "2017-11-22T13:41:00.750Z", "name": "Piscine C", "slug": "piscine-c" } }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/cursus_users/create", "name": "create", "apis": [ { "api_url": "/v2/cursus_users", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/cursus_users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_user", "full_name": "cursus_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "cursus_id", "full_name": "cursus_user[cursus_id]", "description": "\n

The cursus id. Must be unique in the scope of a given user.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "cursus_user[user_id]", "description": "\n

The user id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "cursus_user[end_at]", "description": "\n

The end at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "cursus_user[begin_at]", "description": "\n

The begin at.

\n", "required": true, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "has_coalition", "full_name": "cursus_user[has_coalition]", "description": "\n

Is it has coalition ? Default to true.

\n", "required": true, "allow_nil": false, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "skip_begin_validation", "full_name": "cursus_user[skip_begin_validation]", "description": "\n

The skip begin validation.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/cursus_users", "versions": [ "2.0" ], "query": null, "request_data": { "cursus_user": { "begin_at": "2017-07-22 13:43:10 UTC", "cursus_id": "2", "end_at": "2018-03-22 13:43:10 UTC", "user_id": "1" } }, "response_data": { "id": 127, "begin_at": "2017-07-22T13:43:10.000Z", "end_at": "2018-03-22T13:43:10.000Z", "grade": null, "level": 0.0, "skills": [], "cursus_id": 2, "has_coalition": true, "user": { "id": 1, "login": "jeanne", "url": "https://api.intra.42.fr/v2/users/jeanne" }, "cursus": { "id": 2, "created_at": "2017-11-22T13:41:00.825Z", "name": "42", "slug": "42" } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/cursus_users/update", "name": "update", "apis": [ { "api_url": "/v2/cursus_users/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/cursus_users/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_user", "full_name": "cursus_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "cursus_id", "full_name": "cursus_user[cursus_id]", "description": "\n

The cursus id. Must be unique in the scope of a given user.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "cursus_user[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "cursus_user[end_at]", "description": "\n

The end at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "cursus_user[begin_at]", "description": "\n

The begin at.

\n", "required": false, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "has_coalition", "full_name": "cursus_user[has_coalition]", "description": "\n

Is it has coalition ? Default to true.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "skip_begin_validation", "full_name": "cursus_user[skip_begin_validation]", "description": "\n

The skip begin validation.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/cursus_users/7", "versions": [ "2.0" ], "query": null, "request_data": { "cursus_user": { "begin_at": "2017-07-22 13:43:10 UTC", "cursus_id": "2", "end_at": "2018-03-22 13:43:10 UTC", "user_id": "1" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/cursus_users/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/cursus_users/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/cursus_users/7", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "dashes": { "doc_url": "/apidoc/2.0/dashes", "api_url": "/api", "name": "Dashes", "short_description": "The Dash is a short-time project", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/dashes/graph", "name": "graph", "apis": [ { "api_url": "/v2/dashes/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, description, cursus_id, skill_id, nbr_xp, slug, begin_at, duration, created_at, updated_at, campus_id.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "name", "description", "cursus_id", "skill_id", "nbr_xp", "slug", "begin_at", "duration", "created_at", "updated_at", "campus_id" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, description, cursus_id, skill_id, nbr_xp, slug, begin_at, duration, created_at, updated_at, campus_id, future.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "description", "cursus_id", "skill_id", "nbr_xp", "slug", "begin_at", "duration", "created_at", "updated_at", "campus_id", "future" ], "additional": { "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only dashes which begins in the future" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, description, cursus_id, skill_id, nbr_xp, slug, begin_at, duration, created_at, updated_at, campus_id.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "description", "cursus_id", "skill_id", "nbr_xp", "slug", "begin_at", "duration", "created_at", "updated_at", "campus_id" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/dashes/index", "name": "index", "apis": [ { "api_url": "/v2/dashes", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, description, cursus_id, skill_id, nbr_xp, slug, begin_at, duration, created_at, updated_at, campus_id.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "name", "description", "cursus_id", "skill_id", "nbr_xp", "slug", "begin_at", "duration", "created_at", "updated_at", "campus_id" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, description, cursus_id, skill_id, nbr_xp, slug, begin_at, duration, created_at, updated_at, campus_id, future.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "description", "cursus_id", "skill_id", "nbr_xp", "slug", "begin_at", "duration", "created_at", "updated_at", "campus_id", "future" ], "additional": { "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only dashes which begins in the future" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, description, cursus_id, skill_id, nbr_xp, slug, begin_at, duration, created_at, updated_at, campus_id.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "description", "cursus_id", "skill_id", "nbr_xp", "slug", "begin_at", "duration", "created_at", "updated_at", "campus_id" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/dashes/show", "name": "show", "apis": [ { "api_url": "/v2/dashes/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/dashes/create", "name": "create", "apis": [ { "api_url": "/v2/dashes", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "dash", "full_name": "dash", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "dash[name]", "description": "\n

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

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "dash[description]", "description": "\n

The description.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "dash[slug]", "description": "\n

The slug.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "dash[cursus_id]", "description": "\n

The cursus id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "dash[campus_id]", "description": "\n

The campus id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "skill_id", "full_name": "dash[skill_id]", "description": "\n

The skill id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "nbr_xp", "full_name": "dash[nbr_xp]", "description": "\n

The nbr xp.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "dash[begin_at]", "description": "\n

The begin at. Must be after today.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "duration", "full_name": "dash[duration]", "description": "\n

The duration.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/dashes", "versions": [ "2.0" ], "query": null, "request_data": { "dash": { "begin_at": "2017-11-25 13:43:35 UTC", "campus_id": "2", "cursus_id": "1", "description": "Le sujet dbon courage!", "duration": "20", "name": "Dashname", "nbr_xp": "20", "skill_id": "3", "slug": "dashname" } }, "response_data": { "id": 2, "name": "Dashname", "description": "Le sujet dbon courage!", "slug": "dashname", "cursus_id": 1, "campus_id": 2, "skill_id": 3, "nbr_xp": "20", "begin_at": "2017-11-25T13:43:35.000Z", "end_at": "2017-11-25T14:03:35.000Z" }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/dashes/update", "name": "update", "apis": [ { "api_url": "/v2/dashes/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/dashes/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "dash", "full_name": "dash", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "dash[name]", "description": "\n

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

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "dash[description]", "description": "\n

The description.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "dash[slug]", "description": "\n

The slug.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "dash[cursus_id]", "description": "\n

The cursus id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "dash[campus_id]", "description": "\n

The campus id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "skill_id", "full_name": "dash[skill_id]", "description": "\n

The skill id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "nbr_xp", "full_name": "dash[nbr_xp]", "description": "\n

The nbr xp.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "dash[begin_at]", "description": "\n

The begin at. Must be after today.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "duration", "full_name": "dash[duration]", "description": "\n

The duration.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/dashes/1", "versions": [ "2.0" ], "query": null, "request_data": { "dash": { "begin_at": "2017-11-25 13:43:35 UTC", "campus_id": "1", "cursus_id": "2", "description": "Le sujet dbon courage!", "duration": "20", "name": "Dashname", "nbr_xp": "20", "skill_id": "2", "slug": "dashname" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/dashes/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/dashes/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/dashes/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "dashes_users": { "doc_url": "/apidoc/2.0/dashes_users", "api_url": "/api", "name": "Dashes users", "short_description": "The dash of a user", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/dashes_users/graph", "name": "graph", "apis": [ { "api_url": "/v2/dashes_users/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, dash_id, user_id, repo_uuid, repo_url, final_mark, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "dash_id", "user_id", "repo_uuid", "repo_url", "final_mark", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, dash_id, user_id, repo_uuid, repo_url, final_mark, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "dash_id", "user_id", "repo_uuid", "repo_url", "final_mark", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, dash_id, user_id, repo_uuid, repo_url, final_mark, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "dash_id", "user_id", "repo_uuid", "repo_url", "final_mark", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/dashes_users/graph/on/created_at/by/day", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "2017-11-22": 1 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/dashes_users/index", "name": "index", "apis": [ { "api_url": "/v2/dashes_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/dashes/:dash_id/dashes_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "dash_id", "full_name": "dash_id", "description": "\n

The dash id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, dash_id, user_id, repo_uuid, repo_url, final_mark, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "dash_id", "user_id", "repo_uuid", "repo_url", "final_mark", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, dash_id, user_id, repo_uuid, repo_url, final_mark, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "dash_id", "user_id", "repo_uuid", "repo_url", "final_mark", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, dash_id, user_id, repo_uuid, repo_url, final_mark, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "dash_id", "user_id", "repo_uuid", "repo_url", "final_mark", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/dashes_users", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 1, "dash_id": 1, "user_id": 6, "repo_url": null, "repo_uuid": null, "final_mark": null } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/dashes_users/show", "name": "show", "apis": [ { "api_url": "/v2/dashes_users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/dashes_users/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 1, "dash_id": 1, "user_id": 6, "repo_url": null, "repo_uuid": null, "final_mark": null }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/dashes_users/create", "name": "create", "apis": [ { "api_url": "/v2/dashes_users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "dashes_user", "full_name": "dashes_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "dash_id", "full_name": "dashes_user[dash_id]", "description": "\n

The dash id. Must be unique in the scope of a given user.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "dashes_user[user_id]", "description": "\n

The user id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "repo_url", "full_name": "dashes_user[repo_url]", "description": "\n

The repo url.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "repo_uuid", "full_name": "dashes_user[repo_uuid]", "description": "\n

The repo uuid.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "final_mark", "full_name": "dashes_user[final_mark]", "description": "\n

The final mark.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/dashes_users", "versions": [ "2.0" ], "query": null, "request_data": { "dashes_user": { "dash_id": "1", "user_id": "1" } }, "response_data": { "id": 2, "dash_id": 1, "user_id": 1, "repo_url": null, "repo_uuid": null, "final_mark": null }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/dashes_users/update", "name": "update", "apis": [ { "api_url": "/v2/dashes_users/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/dashes_users/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "dashes_user", "full_name": "dashes_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "dash_id", "full_name": "dashes_user[dash_id]", "description": "\n

The dash id. Must be unique in the scope of a given user.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "dashes_user[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "repo_url", "full_name": "dashes_user[repo_url]", "description": "\n

The repo url.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "repo_uuid", "full_name": "dashes_user[repo_uuid]", "description": "\n

The repo uuid.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "final_mark", "full_name": "dashes_user[final_mark]", "description": "\n

The final mark.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/dashes_users/1", "versions": [ "2.0" ], "query": null, "request_data": { "dashes_user": { "dash_id": "1", "user_id": "1" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/dashes_users/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/dashes_users/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/dashes_users/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "endpoints": { "doc_url": "/apidoc/2.0/endpoints", "api_url": "/api", "name": "Endpoints", "short_description": "A endpoint for a campus", "full_description": "\n

TL,DR

\n\n
\n

In order to synchronize all users between the intranet and the local storage system user for authentification (like LDAP) set on a campus, each campus must set a webservice which will be called by the intranet on a user creation / update / close / unclose. A short implementation is available here.

\n
\n\n

Endpoints

\n\n

The following endpoints will be called on actions on users, depending on his campus, and are:

\n\n

Close

\n\n

Called when a user is closed.

\n\n

POST /users/%user/close

\n\n

Parameters:

\n\n
{\n  "id":5696,\n  "user_id":16814,\n  "closer_id":109,\n  "reason":"La raison du close",\n  "state":"close",\n  "created_at":"2016-01-23T14:59:22.789Z",\n  "updated_at":"2016-01-23T14:59:22.789Z",\n  "key"=>"a_secret_for_your_webservice"\n}
\n\n

Unclose

\n\n

Called when a user is unclosed.

\n\n

POST /users/%user/unclose

\n\n

Parameters:

\n\n
{\n  "key"=>"a_secret_for_your_webservice"\n}
\n\n

Update

\n\n

Called when a user is updated.

\n\n

POST /users/%user/update

\n\n

Parameters:

\n\n
# All the user fields. If the password is changed, the new password is displayed, uncrypted.\n{\n  "uid":"andre",\n  "login":"andre",\n  "key":"a_secret_for_your_webservice",\n  "id":74,\n  "email":"andre@staff.42.fr",\n  "password":"the_new_password",\n  "created_at":"2016-01-20T00:32:50.226Z",\n  "updated_at":"2016-09-16T23:36:59.971Z",\n  "image_url":"/uploads/users/andre.jpg",\n  "first_name":"Andre",\n  "last_name":"AUBIN",\n  "phone":null,\n  "pool_year":null,\n  "pool_month":null,\n  "kind":"admin",\n  "status":null,\n  "campus":[\n    {\n      "id":1,\n      "name":"Paris",\n      "created_at":"2015-05-19T10:53:31.459Z",\n      "updated_at":"2016-09-22T09:11:25.476Z",\n      "time_zone":"Europe/Paris",\n      "language_id":1,\n      "slug":"paris",\n      "main_email":"general@staff.42.fr",\n      "endpoint_id":1,\n      "vogsphere_id":1\n    }\n  ],\n  "primary_campus":{\n    "id":1,\n    "name":"Paris",\n    "created_at":"2015-05-19T10:53:31.459Z",\n    "updated_at":"2016-09-22T09:11:25.476Z",\n    "time_zone":"Europe/Paris",\n    "language_id":1,\n    "slug":"paris",\n    "main_email":"general@staff.42.fr",\n    "endpoint_id":1,\n    "vogsphere_id":1\n  },\n  "meta":{\n    "additional":"informations",\n    "can_be":"set here"\n  }\n}
\n\n

Create

\n\n

Called when a user is created.

\n\n

POST /users/new

\n\n

Parameters:

\n\n
# All the fields of the new user.\n{\n  "uid":"andre",\n  "login":"andre",\n  "key":"a_secret_for_your_webservice",\n  "id":74,\n  "email":"andre@staff.42.fr",\n  "password":"the_new_password",\n  "created_at":"2016-01-20T00:32:50.226Z",\n  "updated_at":"2016-09-16T23:36:59.971Z",\n  "image_url":"/uploads/users/andre.jpg",\n  "first_name":"Andre",\n  "last_name":"AUBIN",\n  "phone":null,\n  "pool_year":null,\n  "pool_month":null,\n  "kind":"admin",\n  "status":null,\n  "campus":[\n    {\n      "id":1,\n      "name":"Paris",\n      "created_at":"2015-05-19T10:53:31.459Z",\n      "updated_at":"2016-09-22T09:11:25.476Z",\n      "time_zone":"Europe/Paris",\n      "language_id":1,\n      "slug":"paris",\n      "main_email":"general@staff.42.fr",\n      "endpoint_id":1,\n      "vogsphere_id":1\n    }\n  ],\n  "primary_campus":{\n    "id":1,\n    "name":"Paris",\n    "created_at":"2015-05-19T10:53:31.459Z",\n    "updated_at":"2016-09-22T09:11:25.476Z",\n    "time_zone":"Europe/Paris",\n    "language_id":1,\n    "slug":"paris",\n    "main_email":"general@staff.42.fr",\n    "endpoint_id":1,\n    "vogsphere_id":1\n  },\n  "meta":{\n    "additional":"informations",\n    "can_be":"set here"\n  }\n}
\n\n

The meta user field contain additional information which can be added trough the API, like, for example, a group_id, and which will not be saved in the database. The uncrypted password is shown, but will not be saved in the database. So it\u2019s the only time it will be available on user creation.

\n
\n

Error handling

\n\n

The implemented webserice have to handle errors correctly, and return the good HTTP response code.

\n\n\n\n\n
Http CodeMeaning
404 (Not found)The user can\u2019t be found
422 (Unprocessable entity)Parameters are unprocessable or missing
500 (Internal server error)Error on the webservice
200 (Ok) (or 200, 201, 204)Ok
\n

It\u2019s optional, but we encourage you to respond 200, 201 and 204 for actions.

\n
\n

Security and format

\n\n

Exchanges MUST be done over a SSL tunnel (e.g. https).

\n\n

If the endpoint requires a secret token, it will be sent with the data under the key key.

\n\n

If datas are sent, they will always be in JSON format.

\n
\n

Additional data

\n\n

The meta user field contain additional information which can be added trough the API, like, for example, a group_id, and which will not be saved in the database.

\n
\n

Example of implementation

\n\n

available here

\n", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/endpoints/index", "name": "index", "apis": [ { "api_url": "/v2/endpoints", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, url, secret, description, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "url", "secret", "description", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, url, secret, description, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "url", "secret", "description", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, url, secret, description, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "url", "secret", "description", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/endpoints", "versions": [ "2.0" ], "query": "page=1", "request_data": null, "response_data": [ { "id": 1, "url": "http://evil.machine.ai", "description": "The endpoint for the evil machine", "created_at": "2016-05-06T08:45:06.194Z", "updated_at": "2016-05-06T08:45:06.194Z", "campus": [] }, { "id": 2, "url": "http://burning.endpoint.io", "description": "Another endpoint", "created_at": "2016-05-06T08:45:06.194Z", "updated_at": "2016-05-06T08:45:06.194Z", "campus": [] }, { "id": 3, "url": "https://intra.42.jp", "description": "The tokyo endpoint", "created_at": "2016-05-06T08:45:06.194Z", "updated_at": "2016-05-06T08:49:40.574Z", "campus": [ { "id": 9, "name": "Tokyo", "time_zone": "Asia/Tokyo", "language": { "id": 2, "name": "English", "identifier": "en", "created_at": "2015-04-14T16:07:38.122Z", "updated_at": "2015-04-14T16:07:38.122Z" }, "users_count": 1 } ] } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/endpoints/show", "name": "show", "apis": [ { "api_url": "/v2/endpoints/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/endpoints/3", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 3, "url": "https://intra.42.jp", "description": "The tokyo endpoint", "created_at": "2016-05-06T08:45:06.194Z", "updated_at": "2016-05-06T08:49:40.574Z", "campus": [ { "id": 9, "name": "Tokyo", "time_zone": "Asia/Tokyo", "language": { "id": 2, "name": "English", "identifier": "en", "created_at": "2015-04-14T16:07:38.122Z", "updated_at": "2015-04-14T16:07:38.122Z" }, "users_count": 1 } ] }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/endpoints/create", "name": "create", "apis": [ { "api_url": "/v2/endpoints", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "endpoint", "full_name": "endpoint", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "endpoint[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "url", "full_name": "endpoint[url]", "description": "\n

The url.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "secret", "full_name": "endpoint[secret]", "description": "\n

The secret.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "endpoint[description]", "description": "\n

The description.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "endpoint[created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "updated_at", "full_name": "endpoint[updated_at]", "description": "\n

The updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/endpoints/update", "name": "update", "apis": [ { "api_url": "/v2/endpoints/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/endpoints/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "endpoint", "full_name": "endpoint", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "endpoint[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "url", "full_name": "endpoint[url]", "description": "\n

The url.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "secret", "full_name": "endpoint[secret]", "description": "\n

The secret.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "endpoint[description]", "description": "\n

The description.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "endpoint[created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "updated_at", "full_name": "endpoint[updated_at]", "description": "\n

The updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "roles": [ "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/endpoints/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/endpoints/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_staff" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "evaluations": { "doc_url": "/apidoc/2.0/evaluations", "api_url": "/api", "name": "Evaluations", "short_description": "The Evaluation of a project", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/evaluations/graph", "name": "graph", "apis": [], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, position, kind, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "position", "kind", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, position, kind, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "position", "kind", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, position, kind, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "position", "kind", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/evaluations/index", "name": "index", "apis": [ { "api_url": "/v2/project_sessions/:project_session_id/evaluations", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/evaluations", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects/:project_id/evaluations", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_session_id", "full_name": "project_session_id", "description": "\n

The project_session id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_id", "full_name": "project_id", "description": "\n

The project id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, position, kind, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "position", "kind", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, position, kind, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "position", "kind", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, position, kind, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "position", "kind", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/evaluations/show", "name": "show", "apis": [ { "api_url": "/v2/evaluations/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/evaluations/create", "name": "create", "apis": [ { "api_url": "/v2/evaluations", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "evaluation", "full_name": "evaluation", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "kind", "full_name": "evaluation[kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: scale, upload.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/evaluations/update", "name": "update", "apis": [ { "api_url": "/v2/evaluations/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/evaluations/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "evaluation", "full_name": "evaluation", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "kind", "full_name": "evaluation[kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: scale, upload.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/evaluations/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/evaluations/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "events": { "doc_url": "/apidoc/2.0/events", "api_url": "/api", "name": "Events", "short_description": "The events in a campus or a cursus", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/events/graph", "name": "graph", "apis": [ { "api_url": "/v2/events/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at, begin_at, end_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by begin_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, name, description, location, kind, max_people, created_at, updated_at, prohibition_of_cancellation, difficulty.", "expected_type": "string", "metadata": { "sort": { "default": { "begin_at": "desc", "id": "desc" }, "keys": [ "id", "begin_at", "end_at", "name", "description", "location", "kind", "max_people", "created_at", "updated_at", "prohibition_of_cancellation", "difficulty" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, name, description, location, kind, max_people, created_at, updated_at, prohibition_of_cancellation, difficulty, future, end.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "begin_at", "end_at", "name", "description", "location", "kind", "max_people", "created_at", "updated_at", "prohibition_of_cancellation", "difficulty", "future", "end" ], "additional": { "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only events which begins in the future" }, "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end events" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, name, description, location, kind, max_people, created_at, updated_at, prohibition_of_cancellation, difficulty.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "begin_at", "end_at", "name", "description", "location", "kind", "max_people", "created_at", "updated_at", "prohibition_of_cancellation", "difficulty" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/events/graph/on/created_at/by/day", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "2017-11-22": 4 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/events/index", "name": "index", "apis": [ { "api_url": "/v2/cursus/:cursus_id/events", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:campus_id/events", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:campus_id/cursus/:cursus_id/events", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/events", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/events", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "cursus_id", "full_name": "cursus_id", "description": "\n

The cursus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "campus_id", "description": "\n

The campus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by begin_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, name, description, location, kind, max_people, created_at, updated_at, prohibition_of_cancellation, difficulty.", "expected_type": "string", "metadata": { "sort": { "default": { "begin_at": "desc", "id": "desc" }, "keys": [ "id", "begin_at", "end_at", "name", "description", "location", "kind", "max_people", "created_at", "updated_at", "prohibition_of_cancellation", "difficulty" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, name, description, location, kind, max_people, created_at, updated_at, prohibition_of_cancellation, difficulty, future, end.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "begin_at", "end_at", "name", "description", "location", "kind", "max_people", "created_at", "updated_at", "prohibition_of_cancellation", "difficulty", "future", "end" ], "additional": { "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only events which begins in the future" }, "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end events" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, name, description, location, kind, max_people, created_at, updated_at, prohibition_of_cancellation, difficulty.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "begin_at", "end_at", "name", "description", "location", "kind", "max_people", "created_at", "updated_at", "prohibition_of_cancellation", "difficulty" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/events", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 4, "name": "Oklahoma whales", "description": "Et selfies beard williamsburg quisquam ramps. Molestiae craft beer consectetur asperiores dolor. Small batch placeat banjo vhs mollitia aut vero. Distinctio est readymade offal tote bag +1.", "location": "West Wisozk", "kind": "rush", "max_people": 112, "nbr_subscribers": 0, "begin_at": "2017-11-25T13:42:10.090Z", "end_at": "2017-11-25T15:42:10.090Z", "campus_ids": [ 3 ], "cursus_ids": [ 1 ], "themes": [ { "created_at": "2019-01-09T17:18:54.779Z", "id": 36, "name": "AI", "updated_at": "2019-01-09T17:18:54.779Z" }, { "created_at": "2019-01-09T17:18:54.819Z", "id": 37, "name": "Entrepreneurship", "updated_at": "2019-01-09T17:18:54.819Z" } ], "waitlist": null, "prohibition_of_cancellation": 15, "created_at": "2017-11-22T13:42:10.110Z", "updated_at": "2017-11-22T13:42:10.127Z" }, { "id": 3, "name": "Wyoming cattle", "description": "Accusantium lumbersexual pug minima you probably haven't heard of them. Dolore officiis kitsch lumbersexual temporibus twee church-key. Ramps molestiae ut esse squid. Molestiae delectus est optio. Biodiesel roof maiores iphone nobis.", "location": "Southern Bauch", "kind": "other", "max_people": 39, "nbr_subscribers": 0, "begin_at": "2017-11-24T13:42:10.014Z", "end_at": "2017-11-24T15:42:10.015Z", "campus_ids": [ 6 ], "cursus_ids": [ 1 ], "themes": [ { "created_at": "2019-01-09T17:18:54.779Z", "id": 10, "name": "Meeting", "updated_at": "2019-01-09T17:18:54.779Z" }, { "created_at": "2019-01-09T17:18:54.819Z", "id": 15, "name": "Association", "updated_at": "2019-01-09T17:18:54.819Z" } ], "waitlist": { "created_at": "2019-01-14T16:25:05.941Z", "id": 392, "updated_at": "2019-01-14T16:25:05.941Z", "waitlistable_id": 3, "waitlistable_type": "Event" }, "prohibition_of_cancellation": 2, "created_at": "2017-11-22T13:42:10.037Z", "updated_at": "2017-11-22T13:42:10.082Z" }, { "id": 2, "name": "Nevada sheep", "description": "Et tousled small batch street voluptas +1. Nisi small batch shoreditch est bicycle rights similique sed. Pbr&b sit exercitationem etsy ea. Cumque et forage reprehenderit officia quas. Chartreuse ad tacos commodi.", "location": "South Wisconsin Academy", "kind": "association", "max_people": 94, "nbr_subscribers": 0, "begin_at": "2017-11-23T13:42:09.970Z", "end_at": "2017-11-23T15:42:09.970Z", "campus_ids": [ 4 ], "cursus_ids": [ 1 ], "themes": [ { "created_at": "2019-01-09T17:18:54.779Z", "id": 12, "name": "Security", "updated_at": "2019-01-09T17:18:54.779Z" }, { "created_at": "2019-01-09T17:18:54.819Z", "id": 42, "name": "Recrutement", "updated_at": "2019-01-09T17:18:54.819Z" } ], "waitlist": { "created_at": "2019-01-14T16:25:05.941Z", "id": 33, "updated_at": "2019-01-14T16:25:05.941Z", "waitlistable_id": 2, "waitlistable_type": "Event" }, "prohibition_of_cancellation": 10, "created_at": "2017-11-22T13:42:09.991Z", "updated_at": "2017-11-22T13:42:10.009Z" } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/events/show", "name": "show", "apis": [ { "api_url": "/v2/events/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Return the event specified by the :id parameter. Invisibles event need at least the basic_staff role.

\n", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/events/3", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 3, "name": "Wyoming cattle", "description": "Accusantium lumbersexual pug minima you probably haven't heard of them. Dolore officiis kitsch lumbersexual temporibus twee church-key. Ramps molestiae ut esse squid. Molestiae delectus est optio. Biodiesel roof maiores iphone nobis.", "location": "Southern Bauch", "kind": "other", "max_people": 39, "nbr_subscribers": 0, "begin_at": "2017-11-24T13:42:10.014Z", "end_at": "2017-11-24T15:42:10.015Z", "campus_ids": [ 6 ], "cursus_ids": [ 1 ], "themes": [ { "created_at": "2019-01-09T17:18:54.779Z", "id": 36, "name": "AI", "updated_at": "2019-01-09T17:18:54.779Z" }, { "created_at": "2019-01-09T17:18:54.819Z", "id": 37, "name": "Entrepreneurship", "updated_at": "2019-01-09T17:18:54.819Z" } ], "waitlist": { "created_at": "2019-01-14T16:25:05.941Z", "id": 391, "updated_at": "2019-01-14T16:25:05.941Z", "waitlistable_id": 3, "waitlistable_type": "Event" }, "prohibition_of_cancellation": 10, "created_at": "2017-11-22T13:42:10.037Z", "updated_at": "2017-11-22T13:42:10.082Z" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/events/create", "name": "create", "apis": [ { "api_url": "/v2/events", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "event", "full_name": "event", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "event[name]", "description": "\n

The name.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "event[begin_at]", "description": "\n

The begin at.

\n", "required": true, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "event[end_at]", "description": "\n

The end at. Beginning must be after ending.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "event[description]", "description": "\n

The description.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "location", "full_name": "event[location]", "description": "\n

The location.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "event[kind]", "description": "\n

The kind.

\n", "required": true, "allow_nil": false, "validator": "Must be one of: pedago, rush, piscine, partnership, meet, conference, meet_up, event, association, speed_working, hackathon, workshop, challenge, other, extern.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "max_people", "full_name": "event[max_people]", "description": "\n

The max people.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "prohibition_of_cancellation", "full_name": "event[prohibition_of_cancellation]", "description": "\n

The prohibition of cancellation.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "activate_waitlist", "full_name": "event[activate_waitlist]", "description": "\n

The activate waitlist.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "events_themes_attributes", "full_name": "event[events_themes_attributes]", "description": "\n

The events themes attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "event[events_themes_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "theme_id", "full_name": "event[events_themes_attributes][theme_id]", "description": "\n

The theme id. Must be unique in the scope of a given event.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "event[events_themes_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "theme_attributes", "full_name": "event[events_themes_attributes][theme_attributes]", "description": "\n

The theme attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "event[events_themes_attributes][theme_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "event[events_themes_attributes][theme_attributes][name]", "description": "\n

The name. Must be unique.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] }, { "name": "cursus_ids", "full_name": "event[cursus_ids]", "description": "\n

The cursus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "campus_ids", "full_name": "event[campus_ids]", "description": "\n

The campus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/events", "versions": [ "2.0" ], "query": null, "request_data": { "event": { "begin_at": "2017-11-25 13:43:10 UTC", "campus_ids": [ "1" ], "cursus_ids": [ "1" ], "events_themes_attributes": [ { "theme_id": 11 }, { "theme_attributes": { "name": "My awesome new theme" } }, { "theme_attributes": { "name": "My awesome new theme 2" } } ], "activate_waitlist": "true", "description": "A fucking great event", "end_at": "2017-11-29 13:43:10 UTC", "kind": "workshop", "location": "Holodeck", "max_people": "120", "prohibition_of_cancellation": 10, "name": "Rainbowcat festival \ud83c\udf08" } }, "response_data": { "id": 5, "name": "Rainbowcat festival \ud83c\udf08", "description": "A fucking great event", "location": "Holodeck", "kind": "workshop", "max_people": 120, "nbr_subscribers": 0, "begin_at": "2017-11-25T13:43:10.000Z", "end_at": "2017-11-29T13:43:10.000Z", "campus_ids": [ 1 ], "cursus_ids": [ 1 ], "themes": [ { "created_at": "2018-10-21T16:35:38.782Z", "id": 11, "name": "Security", "updated_at": "2018-10-21T16:35:38.782Z" }, { "created_at": "2019-01-14T15:06:56.968Z", "id": 42, "name": "My awesome new theme", "updated_at": "2019-01-14T15:06:56.968Z" }, { "created_at": "2019-01-14T15:06:56.968Z", "id": 43, "name": "My awesome new theme 2", "updated_at": "2019-01-14T15:06:56.968Z" } ], "waitlist": { "created_at": "2019-01-14T16:20:43.412Z", "id": 389, "updated_at": "2019-01-14T16:20:43.412Z", "waitlistable_id": 5, "waitlistable_type": "Event" }, "prohibition_of_cancellation": 10, "created_at": "2017-11-22T13:43:37.609Z", "updated_at": "2017-11-22T13:43:37.633Z" }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_staff", "events_manager" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/events/update", "name": "update", "apis": [ { "api_url": "/v2/events/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/events/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "event", "full_name": "event", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "event[name]", "description": "\n

The name.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "event[begin_at]", "description": "\n

The begin at.

\n", "required": false, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "event[end_at]", "description": "\n

The end at. Beginning must be after ending.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "event[description]", "description": "\n

The description.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "location", "full_name": "event[location]", "description": "\n

The location.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "event[kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: pedago, rush, piscine, partnership, meet, conference, meet_up, event, association, speed_working, hackathon, workshop, challenge, other, extern.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "max_people", "full_name": "event[max_people]", "description": "\n

The max people.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "prohibition_of_cancellation", "full_name": "event[prohibition_of_cancellation]", "description": "\n

The prohibition of cancellation.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "activate_waitlist", "full_name": "event[activate_waitlist]", "description": "\n

The activate waitlist.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "events_themes_attributes", "full_name": "event[events_themes_attributes]", "description": "\n

The events themes attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "event[events_themes_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "theme_id", "full_name": "event[events_themes_attributes][theme_id]", "description": "\n

The theme id. Must be unique in the scope of a given event.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "event[events_themes_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "theme_attributes", "full_name": "event[events_themes_attributes][theme_attributes]", "description": "\n

The theme attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "event[events_themes_attributes][theme_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "event[events_themes_attributes][theme_attributes][name]", "description": "\n

The name. Must be unique.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] }, { "name": "cursus_ids", "full_name": "event[cursus_ids]", "description": "\n

The cursus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "campus_ids", "full_name": "event[campus_ids]", "description": "\n

The campus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/events/3", "versions": [ "2.0" ], "query": null, "request_data": { "event": { "begin_at": "2017-11-25 13:43:10 UTC", "campus_ids": [ "1" ], "cursus_ids": [ "1" ], "events_themes_attributes": [ { "theme_attributes": { "name": "Association" } }, { "id": 58, "_destroy": "true" } ], "description": "A fucking great event", "end_at": "2017-11-29 13:43:10 UTC", "kind": "workshop", "location": "Holodeck", "max_people": "120", "prohibition_of_cancellation": 10, "name": "Rainbowcat festival \ud83c\udf08" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_staff", "events_manager" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/events/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/events/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/events/3", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_staff", "events_manager" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "events_users": { "doc_url": "/apidoc/2.0/events_users", "api_url": "/api", "name": "Events users", "short_description": "Users registered to an event", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/events_users/index", "name": "index", "apis": [ { "api_url": "/v2/users/:user_id/events_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/events/:event_id/events_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/events_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "event_id", "full_name": "event_id", "description": "\n

The event id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, event_id, user_id, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "event_id", "user_id", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, event_id, user_id, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "event_id", "user_id", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, event_id, user_id, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "event_id", "user_id", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/events_users/show", "name": "show", "apis": [ { "api_url": "/v2/events_users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/events_users/create", "name": "create", "apis": [ { "api_url": "/v2/events_users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "events_user", "full_name": "events_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "event_id", "full_name": "events_user[event_id]", "description": "\n

The event id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "events_user[user_id]", "description": "\n

The user id. Must be unique in the scope of a given event.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "authentication": "user", "required_scopes": [ "profile" ], "roles": [ "advanced_staff", "events_manager" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/events_users/update", "name": "update", "apis": [ { "api_url": "/v2/events_users/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/events_users/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "events_user", "full_name": "events_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "event_id", "full_name": "events_user[event_id]", "description": "\n

The event id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "events_user[user_id]", "description": "\n

The user id. Must be unique in the scope of a given event.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "authentication": "user", "required_scopes": [ "profile" ], "roles": [ "advanced_staff", "events_manager" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/events_users/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/events_users/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "authentication": "user", "required_scopes": [ "profile" ], "roles": [ "advanced_staff", "events_manager" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "exams": { "doc_url": "/apidoc/2.0/exams", "api_url": "/api", "name": "Exams", "short_description": "The exam in a campus or a cursus", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/exams/graph", "name": "graph", "apis": [ { "api_url": "/v2/exams/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at, begin_at, end_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by begin_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, location, ip_range, max_people, created_at, updated_at, visible, name, campus_id.", "expected_type": "string", "metadata": { "sort": { "default": { "begin_at": "desc", "id": "desc" }, "keys": [ "id", "begin_at", "end_at", "location", "ip_range", "max_people", "created_at", "updated_at", "visible", "name", "campus_id" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, location, ip_range, max_people, created_at, updated_at, visible, name, campus_id, future, end.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "begin_at", "end_at", "location", "ip_range", "max_people", "created_at", "updated_at", "visible", "name", "campus_id", "future", "end" ], "additional": { "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only exams which begins in the future" }, "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end exams" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, location, ip_range, max_people, created_at, updated_at, visible, name, campus_id.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "begin_at", "end_at", "location", "ip_range", "max_people", "created_at", "updated_at", "visible", "name", "campus_id" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/exams/graph/on/created_at/by/day", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "2017-11-22": 2 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/exams/index", "name": "index", "apis": [ { "api_url": "/v2/cursus/:cursus_id/exams", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:campus_id/exams", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:campus_id/cursus/:cursus_id/exams", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/exams", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects/:project_id/exams", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/exams", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

List all visibles exams. Invisibles exams need at least the basic_staff role.

\n", "errors": [], "params": [ { "name": "cursus_id", "full_name": "cursus_id", "description": "\n

The cursus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "campus_id", "description": "\n

The campus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_id", "full_name": "project_id", "description": "\n

The project id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by begin_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, location, ip_range, max_people, created_at, updated_at, visible, name, campus_id.", "expected_type": "string", "metadata": { "sort": { "default": { "begin_at": "desc", "id": "desc" }, "keys": [ "id", "begin_at", "end_at", "location", "ip_range", "max_people", "created_at", "updated_at", "visible", "name", "campus_id" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, location, ip_range, max_people, created_at, updated_at, visible, name, campus_id, future, end.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "begin_at", "end_at", "location", "ip_range", "max_people", "created_at", "updated_at", "visible", "name", "campus_id", "future", "end" ], "additional": { "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only exams which begins in the future" }, "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end exams" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, location, ip_range, max_people, created_at, updated_at, visible, name, campus_id.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "begin_at", "end_at", "location", "ip_range", "max_people", "created_at", "updated_at", "visible", "name", "campus_id" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/exams", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 1, "ip_range": "10.11.0.0/16,10.12.0.0/16,10.13.0.0/16", "begin_at": "2017-11-24T13:42:10.134Z", "end_at": "2017-11-24T15:42:10.134Z", "location": "Crona University", "max_people": 59, "nbr_subscribers": 0, "name": "Ordinary Wizarding Levels Exam", "campus": [ { "id": 1, "name": "Cluj", "time_zone": "Europe/Bucharest", "language": { "id": 3, "name": "Romanian", "identifier": "ro", "created_at": "2017-11-22T13:40:59.468Z", "updated_at": "2017-11-22T13:41:26.139Z" }, "users_count": 28, "vogsphere_id": 1 } ], "cursus": [ { "id": 1, "created_at": "2017-11-22T13:41:00.750Z", "name": "Piscine C", "slug": "piscine-c" } ], "projects": [ { "id": 2, "name": "Ordinary Wizarding Levels", "slug": "ordinary-wizarding-levels", "description": "Ordinary Wizarding Level (often abbreviated O.W.L.) is a subject-specific test taken during Hogwarts School of Witchcraft and Wizardry students' fifth year, administrated by the Wizarding Examinations Authority. The score made by a student on a particular O.W.L. determines whether or not he or she will be allowed to continue taking that subject in subsequent school years.", "parent": null, "children": [], "objectives": [ "Wizarding" ], "tier": 1, "attachments": [], "created_at": "2017-11-22T13:41:26.356Z", "updated_at": "2017-11-22T13:41:26.441Z", "exam": true } ] } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "basic_staff" ], "authentication": "user", "facultative": true }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/exams/show", "name": "show", "apis": [ { "api_url": "/v2/exams/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Return the exam specified by the :id parameter. Invisibles exams need at least the basic_staff role.

\n", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/exams/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 1, "ip_range": "10.11.0.0/16,10.12.0.0/16,10.13.0.0/16", "begin_at": "2017-11-24T13:42:10.134Z", "end_at": "2017-11-24T15:42:10.134Z", "location": "Crona University", "max_people": 59, "nbr_subscribers": 0, "name": "Ordinary Wizarding Levels Exam", "campus": [ { "id": 1, "name": "Cluj", "time_zone": "Europe/Bucharest", "language": { "id": 3, "name": "Romanian", "identifier": "ro", "created_at": "2017-11-22T13:40:59.468Z", "updated_at": "2017-11-22T13:41:26.139Z" }, "users_count": 28, "vogsphere_id": 1 } ], "cursus": [ { "id": 1, "created_at": "2017-11-22T13:41:00.750Z", "name": "Piscine C", "slug": "piscine-c" } ], "projects": [ { "id": 2, "name": "Ordinary Wizarding Levels", "slug": "ordinary-wizarding-levels", "description": "Ordinary Wizarding Level (often abbreviated O.W.L.) is a subject-specific test taken during Hogwarts School of Witchcraft and Wizardry students' fifth year, administrated by the Wizarding Examinations Authority. The score made by a student on a particular O.W.L. determines whether or not he or she will be allowed to continue taking that subject in subsequent school years.", "parent": null, "children": [], "objectives": [ "Wizarding" ], "tier": 1, "attachments": [], "created_at": "2017-11-22T13:41:26.356Z", "updated_at": "2017-11-22T13:41:26.441Z", "exam": true } ] }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/exams/create", "name": "create", "apis": [ { "api_url": "/v2/exams", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "exam", "full_name": "exam", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "exam[name]", "description": "\n

The name.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "exam[begin_at]", "description": "\n

The begin at.

\n", "required": true, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "exam[end_at]", "description": "\n

The end at. Beginning must be after ending.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "location", "full_name": "exam[location]", "description": "\n

The location.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "ip_range", "full_name": "exam[ip_range]", "description": "\n

The ip range.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "visible", "full_name": "exam[visible]", "description": "\n

Is it visible ? Default to true.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "max_people", "full_name": "exam[max_people]", "description": "\n

The max people.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "exam[campus_id]", "description": "\n

The campus id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "project_ids", "full_name": "exam[project_ids]", "description": "\n

The project ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/exams", "versions": [ "2.0" ], "query": null, "request_data": { "exam": { "begin_at": "2017-11-25 13:43:10 UTC", "campus_ids": [ "1" ], "end_at": "2017-11-29 13:43:10 UTC", "ip_range": "10.20.0.0/16", "location": "Cluj", "max_people": "70", "name": "Rainbowcat Exam \ud83c\udf08", "project_ids": [ "3" ], "visible": "true" } }, "response_data": { "id": 3, "ip_range": "10.20.0.0/16", "begin_at": "2017-11-25T13:43:10.000Z", "end_at": "2017-11-29T13:43:10.000Z", "location": "Cluj", "max_people": 70, "nbr_subscribers": 0, "name": "Rainbowcat Exam \ud83c\udf08", "campus": [ { "id": 1, "name": "Cluj", "time_zone": "Europe/Bucharest", "language": { "id": 3, "name": "Romanian", "identifier": "ro", "created_at": "2017-11-22T13:40:59.468Z", "updated_at": "2017-11-22T13:41:26.139Z" }, "users_count": 28, "vogsphere_id": 1 } ], "cursus": [ { "id": 1, "created_at": "2017-11-22T13:41:00.750Z", "name": "Piscine C", "slug": "piscine-c" } ], "projects": [ { "id": 3, "name": "Metaprogramming in OCaml", "slug": "metaprogramming-in-ocaml", "description": "Something you shouldn't see", "parent": null, "children": [], "objectives": [ "Run away" ], "tier": 1, "attachments": [], "created_at": "2017-11-22T13:41:26.537Z", "updated_at": "2017-11-22T13:41:26.616Z", "exam": true } ] }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/exams/update", "name": "update", "apis": [ { "api_url": "/v2/exams/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/exams/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "exam", "full_name": "exam", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "exam[name]", "description": "\n

The name.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "exam[begin_at]", "description": "\n

The begin at.

\n", "required": false, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "exam[end_at]", "description": "\n

The end at. Beginning must be after ending.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "location", "full_name": "exam[location]", "description": "\n

The location.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "ip_range", "full_name": "exam[ip_range]", "description": "\n

The ip range.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "visible", "full_name": "exam[visible]", "description": "\n

Is it visible ? Default to true.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "max_people", "full_name": "exam[max_people]", "description": "\n

The max people.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "exam[campus_id]", "description": "\n

The campus id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "project_ids", "full_name": "exam[project_ids]", "description": "\n

The project ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/exams/1", "versions": [ "2.0" ], "query": null, "request_data": { "exam": { "begin_at": "2017-11-25 13:43:10 UTC", "campus_ids": [ "4" ], "end_at": "2017-11-29 13:43:10 UTC", "ip_range": "10.20.0.0/16", "location": "Cluj", "max_people": "70", "name": "Rainbowcat Exam \ud83c\udf08", "project_ids": [ "3" ], "visible": "true" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/exams/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/exams/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/exams/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "exams_users": { "doc_url": "/apidoc/2.0/exams_users", "api_url": "/api", "name": "Exams users", "short_description": null, "full_description": null, "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/exams_users/index", "name": "index", "apis": [ { "api_url": "/v2/exams/:exam_id/exams_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

List all visibles exams_users

\n", "errors": [], "params": [ { "name": "exam_id", "full_name": "exam_id", "description": "\n

The exam id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, exam_id, user_id, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "exam_id", "user_id", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, exam_id, user_id, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "exam_id", "user_id", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/exams_users/create", "name": "create", "apis": [ { "api_url": "/v2/exams/:exam_id/exams_users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "exam_id", "full_name": "exam_id", "description": "\n

The exam id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/exams_users/update", "name": "update", "apis": [], "formats": null, "full_description": "", "errors": [], "params": [], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/exams_users/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/exams/:exam_id/exams_users/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "exam_id", "full_name": "exam_id", "description": "\n

The exam id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": null }, "experiences": { "doc_url": "/apidoc/2.0/experiences", "api_url": "/api", "name": "Experiences", "short_description": "An experience gained by an user in a particular skill.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/experiences/index", "name": "index", "apis": [ { "api_url": "/v2/experiences", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects_users/:projects_user_id/experiences", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/experiences", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/skills/:skill_id/experiences", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/partnerships_users/:partnerships_user_id/experiences", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "projects_user_id", "full_name": "projects_user_id", "description": "\n

The projects_user id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "skill_id", "full_name": "skill_id", "description": "\n

The skill id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "partnerships_user_id", "full_name": "partnerships_user_id", "description": "\n

The partnerships_user id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, skill_id, experiancable_id, experiancable_type, experience, created_at, cursus_id, is_bonus.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "user_id", "skill_id", "experiancable_id", "experiancable_type", "experience", "created_at", "cursus_id", "is_bonus" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, skill_id, experiancable_id, experiancable_type, experience, created_at, cursus_id, is_bonus.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "user_id", "skill_id", "experiancable_id", "experiancable_type", "experience", "created_at", "cursus_id", "is_bonus" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, skill_id, experiancable_id, experiancable_type, experience, created_at, cursus_id, is_bonus.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "user_id", "skill_id", "experiancable_id", "experiancable_type", "experience", "created_at", "cursus_id", "is_bonus" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/experiences/show", "name": "show", "apis": [ { "api_url": "/v2/experiences/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/experiences/create", "name": "create", "apis": [ { "api_url": "/v2/experiences", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "experience", "full_name": "experience", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "experience[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "experience[user_id]", "description": "\n

The user id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "skill_id", "full_name": "experience[skill_id]", "description": "\n

The skill id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "experiancable_id", "full_name": "experience[experiancable_id]", "description": "\n

The experiancable id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "experiancable_type", "full_name": "experience[experiancable_type]", "description": "\n

The experiancable type.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "experience", "full_name": "experience[experience]", "description": "\n

The experience.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "experience[created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "experience[cursus_id]", "description": "\n

The cursus id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/experiences/update", "name": "update", "apis": [ { "api_url": "/v2/experiences/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/experiences/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "experience", "full_name": "experience", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "experience[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "experience[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "skill_id", "full_name": "experience[skill_id]", "description": "\n

The skill id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "experiancable_id", "full_name": "experience[experiancable_id]", "description": "\n

The experiancable id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "experiancable_type", "full_name": "experience[experiancable_type]", "description": "\n

The experiancable type.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "experience", "full_name": "experience[experience]", "description": "\n

The experience.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "experience[created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "experience[cursus_id]", "description": "\n

The cursus id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/experiences/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/experiences/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "expertises": { "doc_url": "/apidoc/2.0/expertises", "api_url": "/api", "name": "Expertises", "short_description": "Pedagogic expertises", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/expertises/index", "name": "index", "apis": [ { "api_url": "/v2/expertises", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, slug, created_at, updated_at, kind.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "name", "slug", "created_at", "updated_at", "kind" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, slug, created_at, updated_at, kind.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "slug", "created_at", "updated_at", "kind" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, slug, created_at, updated_at, kind.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "slug", "created_at", "updated_at", "kind" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/expertises", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 10, "name": "Magic", "slug": "magic", "url": "https://api.intra.42.fr/v2/expertises/magic", "kind": "languages", "created_at": "2017-11-22T13:41:01.825Z", "expertises_users_url": "https://api.intra.42.fr/v2/expertises/magic/expertises_users" }, { "id": 9, "name": "Elixir", "slug": "elixir", "url": "https://api.intra.42.fr/v2/expertises/elixir", "kind": "languages", "created_at": "2017-11-22T13:41:01.819Z", "expertises_users_url": "https://api.intra.42.fr/v2/expertises/elixir/expertises_users" }, { "id": 8, "name": "iOS", "slug": "ios", "url": "https://api.intra.42.fr/v2/expertises/ios", "kind": "frameworks", "created_at": "2017-11-22T13:41:01.814Z", "expertises_users_url": "https://api.intra.42.fr/v2/expertises/ios/expertises_users" } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/expertises/show", "name": "show", "apis": [ { "api_url": "/v2/expertises/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/expertises/3", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 3, "name": "Android", "slug": "android", "url": "https://api.intra.42.fr/v2/expertises/android", "kind": "frameworks", "created_at": "2017-11-22T13:41:01.785Z", "expertises_users_url": "https://api.intra.42.fr/v2/expertises/android/expertises_users" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/expertises/create", "name": "create", "apis": [ { "api_url": "/v2/expertises", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "expertise", "full_name": "expertise", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "expertise[name]", "description": "\n

The name. Must be unique.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "expertise[slug]", "description": "\n

The slug.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "expertise[kind]", "description": "\n

The kind.

\n", "required": true, "allow_nil": false, "validator": "Must be one of: languages, frameworks, databases, admin_sys, other.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/expertises", "versions": [ "2.0" ], "query": null, "request_data": { "expertise": { "kind": "databases", "name": "West Virginia frogs" } }, "response_data": { "id": 11, "name": "West Virginia frogs", "slug": "west-virginia-frogs", "url": "https://api.intra.42.fr/v2/expertises/west-virginia-frogs", "kind": "databases", "created_at": "2017-11-22T13:43:39.345Z", "expertises_users_url": "https://api.intra.42.fr/v2/expertises/west-virginia-frogs/expertises_users" }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/expertises/update", "name": "update", "apis": [ { "api_url": "/v2/expertises/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/expertises/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "expertise", "full_name": "expertise", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "expertise[name]", "description": "\n

The name. Must be unique.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "expertise[slug]", "description": "\n

The slug.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "expertise[kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: languages, frameworks, databases, admin_sys, other.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/expertises/3", "versions": [ "2.0" ], "query": null, "request_data": { "expertise": { "kind": "databases", "name": "South Dakota frogs" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/expertises/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/expertises/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/expertises/3", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "expertises_users": { "doc_url": "/apidoc/2.0/expertises_users", "api_url": "/api", "name": "Expertises users", "short_description": "Users which have an expertise", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/expertises_users/index", "name": "index", "apis": [ { "api_url": "/v2/expertises/:expertise_id/expertises_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/expertises_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/expertises_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "expertise_id", "full_name": "expertise_id", "description": "\n

The expertise id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, expertise_id, user_id, interested, value, created_at, updated_at, contact_me.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "expertise_id", "user_id", "interested", "value", "created_at", "updated_at", "contact_me" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, expertise_id, user_id, interested, value, created_at, updated_at, contact_me.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "expertise_id", "user_id", "interested", "value", "created_at", "updated_at", "contact_me" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, expertise_id, user_id, interested, value, created_at, updated_at, contact_me.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "expertise_id", "user_id", "interested", "value", "created_at", "updated_at", "contact_me" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/expertises_users", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 126, "expertise_id": 6, "interested": false, "value": 2, "contact_me": false, "created_at": "2017-11-22T13:41:23.630Z", "user_id": 126, "expertise": { "id": 6, "name": "AngularJS", "slug": "angularjs", "url": "https://api.intra.42.fr/v2/expertises/angularjs", "kind": "frameworks", "created_at": "2017-11-22T13:41:01.803Z", "expertises_users_url": "https://api.intra.42.fr/v2/expertises/angularjs/expertises_users" }, "user": { "id": 126, "login": "darthcae", "url": "https://api.intra.42.fr/v2/users/darthcae" } }, { "id": 125, "expertise_id": 4, "interested": false, "value": 2, "contact_me": false, "created_at": "2017-11-22T13:41:23.614Z", "user_id": 125, "expertise": { "id": 4, "name": "C", "slug": "c", "url": "https://api.intra.42.fr/v2/expertises/c", "kind": "languages", "created_at": "2017-11-22T13:41:01.791Z", "expertises_users_url": "https://api.intra.42.fr/v2/expertises/c/expertises_users" }, "user": { "id": 125, "login": "sebulseb", "url": "https://api.intra.42.fr/v2/users/sebulseb" } }, { "id": 124, "expertise_id": 1, "interested": false, "value": 2, "contact_me": false, "created_at": "2017-11-22T13:41:23.598Z", "user_id": 124, "expertise": { "id": 1, "name": ".NET", "slug": "net", "url": "https://api.intra.42.fr/v2/expertises/net", "kind": "languages", "created_at": "2017-11-22T13:41:01.773Z", "expertises_users_url": "https://api.intra.42.fr/v2/expertises/net/expertises_users" }, "user": { "id": 124, "login": "hsolo2", "url": "https://api.intra.42.fr/v2/users/hsolo2" } } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/expertises_users/show", "name": "show", "apis": [ { "api_url": "/v2/expertises_users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/expertises_users/3", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 3, "expertise_id": 6, "interested": false, "value": 2, "contact_me": false, "created_at": "2017-11-22T13:41:22.512Z", "user_id": 3, "expertise": { "id": 6, "name": "AngularJS", "slug": "angularjs", "url": "https://api.intra.42.fr/v2/expertises/angularjs", "kind": "frameworks", "created_at": "2017-11-22T13:41:01.803Z", "expertises_users_url": "https://api.intra.42.fr/v2/expertises/angularjs/expertises_users" }, "user": { "id": 3, "login": "gargamel", "url": "https://api.intra.42.fr/v2/users/gargamel" } }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/expertises_users/create", "name": "create", "apis": [ { "api_url": "/v2/expertises/:expertise_id/expertises_users", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/expertises_users", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/expertises_users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "expertise_id", "full_name": "expertise_id", "description": "\n

The expertise id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "expertises_user", "full_name": "expertises_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "expertise_id", "full_name": "expertises_user[expertise_id]", "description": "\n

The expertise id. Must be unique in the scope of a given user.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "expertises_user[user_id]", "description": "\n

The user id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "interested", "full_name": "expertises_user[interested]", "description": "\n

Is it interested ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "expertises_user[value]", "description": "\n

The value.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "contact_me", "full_name": "expertises_user[contact_me]", "description": "\n

Is it contact me ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/expertises_users", "versions": [ "2.0" ], "query": null, "request_data": { "expertises_user": { "expertise_id": "2", "user_id": "106", "value": "1" } }, "response_data": { "id": 127, "expertise_id": 2, "interested": false, "value": 1, "contact_me": false, "created_at": "2017-11-22T13:43:39.996Z", "user_id": 106, "expertise": { "id": 2, "name": "jQuery", "slug": "jquery", "url": "https://api.intra.42.fr/v2/expertises/jquery", "kind": "other", "created_at": "2017-11-22T13:41:01.779Z", "expertises_users_url": "https://api.intra.42.fr/v2/expertises/jquery/expertises_users" }, "user": { "id": 106, "login": "anaskywa", "url": "https://api.intra.42.fr/v2/users/anaskywa" } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "authentication": "user", "required_scopes": [ "profile" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/expertises_users/update", "name": "update", "apis": [ { "api_url": "/v2/expertises_users/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/expertises_users/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "expertises_user", "full_name": "expertises_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "expertise_id", "full_name": "expertises_user[expertise_id]", "description": "\n

The expertise id. Must be unique in the scope of a given user.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "expertises_user[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "interested", "full_name": "expertises_user[interested]", "description": "\n

Is it interested ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "expertises_user[value]", "description": "\n

The value.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "contact_me", "full_name": "expertises_user[contact_me]", "description": "\n

Is it contact me ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/expertises_users/3", "versions": [ "2.0" ], "query": null, "request_data": { "expertises_user": { "expertise_id": "6", "user_id": "125", "value": "1" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "authentication": "user", "required_scopes": [ "profile" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/expertises_users/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/expertises_users/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/expertises_users/3", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "authentication": "user", "required_scopes": [ "profile" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "feedbacks": { "doc_url": "/apidoc/2.0/feedbacks", "api_url": "/api", "name": "Feedbacks", "short_description": "The feedback of a ScaleTeam or an Event", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/feedbacks/index", "name": "index", "apis": [ { "api_url": "/v2/events/:event_id/feedbacks", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/feedbacks", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/scale_teams/:scale_team_id/feedbacks", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "event_id", "full_name": "event_id", "description": "\n

The event id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "scale_team_id", "full_name": "scale_team_id", "description": "\n

The scale_team id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at asc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, feedbackable_type, feedbackable_id, comment, rating, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "asc", "id": "desc" }, "keys": [ "id", "user_id", "feedbackable_type", "feedbackable_id", "comment", "rating", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, feedbackable_type, feedbackable_id, comment, rating, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "user_id", "feedbackable_type", "feedbackable_id", "comment", "rating", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, feedbackable_type, feedbackable_id, comment, rating, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "user_id", "feedbackable_type", "feedbackable_id", "comment", "rating", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/feedbacks/show", "name": "show", "apis": [ { "api_url": "/v2/events/:event_id/feedbacks/:id", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/feedbacks/:id", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/scale_teams/:scale_team_id/feedbacks/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "event_id", "full_name": "event_id", "description": "\n

The event id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "scale_team_id", "full_name": "scale_team_id", "description": "\n

The scale_team id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/feedbacks/create", "name": "create", "apis": [ { "api_url": "/v2/events/:event_id/feedbacks", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/feedbacks", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/scale_teams/:scale_team_id/feedbacks", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "event_id", "full_name": "event_id", "description": "\n

The event id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "scale_team_id", "full_name": "scale_team_id", "description": "\n

The scale_team id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "feedback", "full_name": "feedback", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "comment", "full_name": "feedback[comment]", "description": "\n

The comment. Maximum length is 1024.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "feedbackable_type", "full_name": "feedback[feedbackable_type]", "description": "\n

The feedbackable type.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "feedbackable_id", "full_name": "feedback[feedbackable_id]", "description": "\n

The feedbackable id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "rating", "full_name": "feedback[rating]", "description": "\n

The rating.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "feedback[user_id]", "description": "\n

The user id. Must be unique in the scope of a given feedbackable.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "feedback_details_attributes", "full_name": "feedback[feedback_details_attributes]", "description": "\n

The feedback details attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "feedback[feedback_details_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "rate", "full_name": "feedback[feedback_details_attributes][rate]", "description": "\n

The rate.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "feedback[feedback_details_attributes][kind]", "description": "\n

The kind.

\n", "required": true, "allow_nil": false, "validator": "Must be one of: punctuality, interested, rigorous, nice, accuracy, interesting, quality, pertinent.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "feedback[feedback_details_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/feedbacks/update", "name": "update", "apis": [ { "api_url": "/v2/events/:event_id/feedbacks/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/events/:event_id/feedbacks/:id", "http_method": "PUT", "short_description": null, "deprecated": null }, { "api_url": "/v2/feedbacks/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/feedbacks/:id", "http_method": "PUT", "short_description": null, "deprecated": null }, { "api_url": "/v2/scale_teams/:scale_team_id/feedbacks/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/scale_teams/:scale_team_id/feedbacks/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "event_id", "full_name": "event_id", "description": "\n

The event id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "scale_team_id", "full_name": "scale_team_id", "description": "\n

The scale_team id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "feedback", "full_name": "feedback", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "comment", "full_name": "feedback[comment]", "description": "\n

The comment. Maximum length is 1024.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "feedbackable_type", "full_name": "feedback[feedbackable_type]", "description": "\n

The feedbackable type.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "feedbackable_id", "full_name": "feedback[feedbackable_id]", "description": "\n

The feedbackable id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "rating", "full_name": "feedback[rating]", "description": "\n

The rating.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "feedback[user_id]", "description": "\n

The user id. Must be unique in the scope of a given feedbackable.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "feedback_details_attributes", "full_name": "feedback[feedback_details_attributes]", "description": "\n

The feedback details attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "feedback[feedback_details_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "rate", "full_name": "feedback[feedback_details_attributes][rate]", "description": "\n

The rate.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "feedback[feedback_details_attributes][kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: punctuality, interested, rigorous, nice, accuracy, interesting, quality, pertinent.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "feedback[feedback_details_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/feedbacks/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/events/:event_id/feedbacks/:id", "http_method": "DELETE", "short_description": null, "deprecated": null }, { "api_url": "/v2/feedbacks/:id", "http_method": "DELETE", "short_description": null, "deprecated": null }, { "api_url": "/v2/scale_teams/:scale_team_id/feedbacks/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "event_id", "full_name": "event_id", "description": "\n

The event id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "scale_team_id", "full_name": "scale_team_id", "description": "\n

The scale_team id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "flags": { "doc_url": "/apidoc/2.0/flags", "api_url": "/api", "name": "Flags", "short_description": "Flags from scales", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/flags/index", "name": "index", "apis": [ { "api_url": "/v2/flags", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by name asc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, positive, icon, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "name": "asc", "id": "desc" }, "keys": [ "id", "name", "positive", "icon", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, positive, icon, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "positive", "icon", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, positive, icon, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "positive", "icon", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true } ], "headers": [] }, "flash_users": { "doc_url": "/apidoc/2.0/flash_users", "api_url": "/api", "name": "Flash users", "short_description": "The Flash Users", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/flash_users/index", "name": "index", "apis": [ { "api_url": "/v2/flashes/:flash_id/flash_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/flash_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "flash_id", "full_name": "flash_id", "description": "\n

The flash id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at asc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, flash_id, seen, created_at, updated_at, end_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "asc", "id": "desc" }, "keys": [ "id", "user_id", "flash_id", "seen", "created_at", "updated_at", "end_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, flash_id, seen, created_at, updated_at, end_at, end.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "user_id", "flash_id", "seen", "created_at", "updated_at", "end_at", "end" ], "additional": { "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end flash users" } } } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/flash_users", "versions": [ "2.0" ], "query": "page=1", "request_data": null, "response_data": [ { "id": 28, "flash_id": 2, "seen": true, "end_at": "2016-06-13T18:40:57.031Z", "user": { "id": 10292, "login": "mguilbau", "url": "http://localhost:13000/v2/users/mguilbau" } }, { "id": 29, "flash_id": 2, "seen": true, "end_at": "2016-06-13T18:40:57.031Z", "user": { "id": 10316, "login": "spuyet", "url": "http://localhost:13000/v2/users/spuyet" } }, { "id": 30, "flash_id": 2, "seen": true, "end_at": "2016-06-13T18:40:57.031Z", "user": { "id": 10317, "login": "evoisin", "url": "http://localhost:13000/v2/users/evoisin" } } ] } ], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/flash_users/show", "name": "show", "apis": [ { "api_url": "/v2/flashes/:flash_id/flash_users/:id", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/flash_users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "flash_id", "full_name": "flash_id", "description": "\n

The flash id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/flash_users/28", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 28, "flash_id": 2, "seen": true, "end_at": "2016-06-13T18:40:57.031Z", "user": { "id": 10292, "login": "mguilbau", "url": "http://localhost:13000/v2/users/mguilbau" } }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/flash_users/create", "name": "create", "apis": [ { "api_url": "/v2/flashes/:flash_id/flash_users", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/flash_users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "flash_id", "full_name": "flash_id", "description": "\n

The flash id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "flash_user", "full_name": "flash_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "flash_user[user_id]", "description": "\n

The user id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "flash_id", "full_name": "flash_user[flash_id]", "description": "\n

The flash id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "seen", "full_name": "flash_user[seen]", "description": "\n

Is it seen ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "flash_user[end_at]", "description": "\n

The end at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/flashes", "versions": [ "2.0" ], "query": "", "request_data": { "flash_user": { "flash_id": 1, "user_id": 19265, "end_at": "2018-07-01T18:40:57.031Z" } }, "response_data": { "id": 166513, "flash_id": 1, "seen": false, "end_at": "2018-07-01T18:40:57.031Z", "user": { "id": 19265, "login": "jgengo", "url": "http://localhost:13000/v2/users/jgengo" } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "flashes": { "doc_url": "/apidoc/2.0/flashes", "api_url": "/api", "name": "Flashes", "short_description": "The Flash", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/flashes/index", "name": "index", "apis": [ { "api_url": "/v2/flashes", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at asc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, content, selector, created_at, updated_at, identifier, title, url, duration.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "asc", "id": "desc" }, "keys": [ "id", "content", "selector", "created_at", "updated_at", "identifier", "title", "url", "duration" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, content, selector, created_at, updated_at, identifier, title, url, duration.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "content", "selector", "created_at", "updated_at", "identifier", "title", "url", "duration" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/flashes", "versions": [ "2.0" ], "query": "page=1", "request_data": null, "response_data": [ { "id": 24, "title": "Achievement unlocked !", "content": "
\nachievement logo\n
\n

Serial examiner

\n

Effectuer 10 soutenances en une journ\u00e9e en tant que correcteur.

\n
\n
\n", "identifier": "achievement-83", "duration": 4320, "selector": "" }, { "id": 25, "title": "Achievement unlocked !", "content": "
\nachievement logo\n
\n

Serial examiner

\n

Effectuer 10 soutenances en une journ\u00e9e en tant que correcteur.

\n
\n
\n", "identifier": "achievement-84", "duration": 4320, "selector": "" }, { "id": 26, "title": "Achievement unlocked !", "content": "
\nachievement logo\n
\n

Serial examiner

\n

Effectuer 10 soutenances en une journ\u00e9e en tant que correcteur.

\n
\n
\n", "identifier": "achievement-85", "duration": 4320, "selector": "" } ] } ], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/flashes/show", "name": "show", "apis": [ { "api_url": "/v2/flashes/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/flashes/27", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 27, "title": "Achievement unlocked !", "content": "
\nachievement logo\n
\n

Serial examiner

\n

Effectuer 10 soutenances en une journ\u00e9e en tant que correcteur.

\n
\n
\n", "identifier": "achievement-83", "duration": 4320, "selector": "" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/flashes/create", "name": "create", "apis": [ { "api_url": "/v2/flashes", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "flash", "full_name": "flash", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "content", "full_name": "flash[content]", "description": "\n

The content.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "selector", "full_name": "flash[selector]", "description": "\n

The selector.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "identifier", "full_name": "flash[identifier]", "description": "\n

The identifier.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "title", "full_name": "flash[title]", "description": "\n

The title.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "url", "full_name": "flash[url]", "description": "\n

The url.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "duration", "full_name": "flash[duration]", "description": "\n

The duration.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/flashes", "versions": [ "2.0" ], "query": "", "request_data": { "flash": { "title": "Almost the end!", "content": "One of our member is leaving us in few days...", "identifier": "the_end", "duration": 4200 } }, "response_data": { "id": 53, "title": "Almost the end!", "content": "One of our member is leaving us in few days...", "identifier": "the_end", "duration": 4200 }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "groups": { "doc_url": "/apidoc/2.0/groups", "api_url": "/api", "name": "Groups", "short_description": "Groups in which users belong to. It will display a label on their profile and on the forum.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/groups/index", "name": "index", "apis": [ { "api_url": "/v2/groups", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/groups", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/groups", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 1, "name": "gnomes" }, { "id": 2, "name": "vampires" }, { "id": 3, "name": "sons" } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/groups/show", "name": "show", "apis": [ { "api_url": "/v2/groups/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/groups/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 1, "name": "gnomes" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/groups/create", "name": "create", "apis": [ { "api_url": "/v2/groups", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "group", "full_name": "group", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "group[name]", "description": "\n

The name.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "color", "full_name": "group[color]", "description": "\n

The color.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "important", "full_name": "group[important]", "description": "\n

Is it important ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/groups", "versions": [ "2.0" ], "query": null, "request_data": { "group": { "color": "#ed5462", "important": "true", "name": "tigers" } }, "response_data": { "id": 5, "name": "tigers" }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/groups/update", "name": "update", "apis": [ { "api_url": "/v2/groups/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/groups/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "group", "full_name": "group", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "group[name]", "description": "\n

The name.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "color", "full_name": "group[color]", "description": "\n

The color.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "important", "full_name": "group[important]", "description": "\n

Is it important ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/groups/1", "versions": [ "2.0" ], "query": null, "request_data": { "group": { "color": "#ed5462", "important": "true", "name": "tigers" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/groups/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/groups/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/groups/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "groups_users": { "doc_url": "/apidoc/2.0/groups_users", "api_url": "/api", "name": "Groups users", "short_description": "Users who are in a group.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/groups_users/index", "name": "index", "apis": [ { "api_url": "/v2/groups_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/groups/:group_id/groups_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/groups_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "group_id", "full_name": "group_id", "description": "\n

The group id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/groups_users", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 1, "user_id": 33, "group_id": 1, "created_at": "2017-11-22T13:42:12.972Z", "updated_at": "2017-11-22T13:42:12.972Z" }, { "id": 2, "user_id": 119, "group_id": 2, "created_at": "2017-11-22T13:42:12.992Z", "updated_at": "2017-11-22T13:42:12.992Z" }, { "id": 3, "user_id": 44, "group_id": 3, "created_at": "2017-11-22T13:42:13.010Z", "updated_at": "2017-11-22T13:42:13.010Z" } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/groups_users/show", "name": "show", "apis": [ { "api_url": "/v2/groups_users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/groups_users/4", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 4, "user_id": 101, "group_id": 4, "created_at": "2017-11-22T13:42:13.028Z", "updated_at": "2017-11-22T13:42:13.028Z" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/groups_users/create", "name": "create", "apis": [ { "api_url": "/v2/groups_users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "groups_user", "full_name": "groups_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "group_id", "full_name": "groups_user[group_id]", "description": "\n

The group id. Must be unique in the scope of a given user.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "groups_user[user_id]", "description": "\n

The user id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/groups_users", "versions": [ "2.0" ], "query": null, "request_data": { "groups_user": { "group_id": "3", "user_id": "9" } }, "response_data": { "id": 5, "user_id": 9, "group_id": 3, "created_at": "2017-11-22T13:43:41.210Z", "updated_at": "2017-11-22T13:43:41.210Z" }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/groups_users/update", "name": "update", "apis": [ { "api_url": "/v2/groups_users/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/groups_users/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "groups_user", "full_name": "groups_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "group_id", "full_name": "groups_user[group_id]", "description": "\n

The group id. Must be unique in the scope of a given user.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "groups_user[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/groups_users/4", "versions": [ "2.0" ], "query": null, "request_data": { "groups_user": { "group_id": "1", "user_id": "97" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/groups_users/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/groups_users/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/groups_users/4", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "internships": { "doc_url": "/apidoc/2.0/internships", "api_url": "/api", "name": "Internships", "short_description": "The internship", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/internships/index", "name": "index", "apis": [ { "api_url": "/v2/internships", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/internships", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, administration_id, offer_id, language_id, state, days, user_address, user_postal, user_city, user_country, company_name, company_boss_user_first_name, company_boss_user_last_name, company_boss_user_email, company_boss_user_phone, company_user_first_name, company_user_last_name, company_user_post, company_user_email, company_user_phone, company_address, company_postal, company_city, company_country, company_siret, internship_address, internship_postal, internship_city, internship_country, contract_type, subject, start_at, end_at, duration, nb_days, nb_hours, movement, salary, currency, breach_at, convention, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "user_id", "administration_id", "offer_id", "language_id", "state", "days", "user_address", "user_postal", "user_city", "user_country", "company_name", "company_boss_user_first_name", "company_boss_user_last_name", "company_boss_user_email", "company_boss_user_phone", "company_user_first_name", "company_user_last_name", "company_user_post", "company_user_email", "company_user_phone", "company_address", "company_postal", "company_city", "company_country", "company_siret", "internship_address", "internship_postal", "internship_city", "internship_country", "contract_type", "subject", "start_at", "end_at", "duration", "nb_days", "nb_hours", "movement", "salary", "currency", "breach_at", "convention", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, administration_id, offer_id, language_id, state, days, user_address, user_postal, user_city, user_country, company_name, company_boss_user_first_name, company_boss_user_last_name, company_boss_user_email, company_boss_user_phone, company_user_first_name, company_user_last_name, company_user_post, company_user_email, company_user_phone, company_address, company_postal, company_city, company_country, company_siret, internship_address, internship_postal, internship_city, internship_country, contract_type, subject, start_at, end_at, duration, nb_days, nb_hours, movement, salary, currency, breach_at, convention, created_at, updated_at, start, end, breach.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "user_id", "administration_id", "offer_id", "language_id", "state", "days", "user_address", "user_postal", "user_city", "user_country", "company_name", "company_boss_user_first_name", "company_boss_user_last_name", "company_boss_user_email", "company_boss_user_phone", "company_user_first_name", "company_user_last_name", "company_user_post", "company_user_email", "company_user_phone", "company_address", "company_postal", "company_city", "company_country", "company_siret", "internship_address", "internship_postal", "internship_city", "internship_country", "contract_type", "subject", "start_at", "end_at", "duration", "nb_days", "nb_hours", "movement", "salary", "currency", "breach_at", "convention", "created_at", "updated_at", "start", "end", "breach" ], "additional": { "start": { "proc": {}, "all": [ "true", "false" ], "description": "Return only start internships" }, "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end internships" }, "breach": { "proc": {}, "all": [ "true", "false" ], "description": "Return only breach internships" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, administration_id, offer_id, language_id, state, days, user_address, user_postal, user_city, user_country, company_name, company_boss_user_first_name, company_boss_user_last_name, company_boss_user_email, company_boss_user_phone, company_user_first_name, company_user_last_name, company_user_post, company_user_email, company_user_phone, company_address, company_postal, company_city, company_country, company_siret, internship_address, internship_postal, internship_city, internship_country, contract_type, subject, start_at, end_at, duration, nb_days, nb_hours, movement, salary, currency, breach_at, convention, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "user_id", "administration_id", "offer_id", "language_id", "state", "days", "user_address", "user_postal", "user_city", "user_country", "company_name", "company_boss_user_first_name", "company_boss_user_last_name", "company_boss_user_email", "company_boss_user_phone", "company_user_first_name", "company_user_last_name", "company_user_post", "company_user_email", "company_user_phone", "company_address", "company_postal", "company_city", "company_country", "company_siret", "internship_address", "internship_postal", "internship_city", "internship_country", "contract_type", "subject", "start_at", "end_at", "duration", "nb_days", "nb_hours", "movement", "salary", "currency", "breach_at", "convention", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/internships/show", "name": "show", "apis": [ { "api_url": "/v2/internships/:id", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/internships/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/internships/2350", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 2350, "administration_id": 1, "offer_id": null, "language_id": 1, "state": "uploaded", "days": "[\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\"]", "user_address": "5 rue de la paix", "user_postal": "75001", "user_city": "Paris", "user_country": "France", "company_name": "Association 42", "company_boss_user_first_name": "FirstName", "company_boss_user_last_name": "LastName", "company_boss_user_email": "boss@42.fr", "company_boss_user_phone": "0123456789", "company_user_first_name": "Quentin", "company_user_last_name": "Bollache", "company_user_post": "Responsable technique et pedagogique", "company_user_email": "gargamel@42.fr", "company_user_phone": "0123456789", "company_address": "96 Boulevard Bessi\u00e8res", "company_postal": "75017", "company_city": "Paris", "company_country": "France", "company_siret": "0", "internship_address": "96 Boulevard Bessi\u00e8res", "internship_postal": "75017", "internship_city": "Paris", "internship_country": "France", "contract_type": "stage", "subject": "D\u00e9veloppement de tous les sites web reli\u00e9s \u00e0 42", "start_at": "2017-07-31T22:00:00.000Z", "end_at": "2018-01-30T23:00:00.000Z", "duration": 6, "nb_days": 5, "nb_hours": 35, "movement": null, "salary": 50000, "currency": "eur", "breach_at": null, "convention": { "convention": { "url": "/uploads/internship/convention/jgengo-9543c17018c04a7f99fd01bf62a478/2350/jgengo.zip" } }, "user": { "id": 19265, "login": "jgengo", "url": "http://localhost:13000/v2/users/jgengo" } }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "languages": { "doc_url": "/apidoc/2.0/languages", "api_url": "/api", "name": "Languages", "short_description": "The language", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/languages/graph", "name": "graph", "apis": [ { "api_url": "/v2/languages/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, identifier, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "name", "identifier", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, identifier, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "identifier", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, identifier, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "identifier", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/languages/index", "name": "index", "apis": [ { "api_url": "/v2/languages", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, identifier, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "name", "identifier", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, identifier, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "identifier", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, identifier, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "identifier", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/languages", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 3, "name": "Romanian", "identifier": "ro" }, { "id": 2, "name": "English", "identifier": "en" }, { "id": 1, "name": "Fran\u00e7ais", "identifier": "fr" } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/languages/show", "name": "show", "apis": [ { "api_url": "/v2/languages/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/languages/3", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 3, "name": "Romanian", "identifier": "ro" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/languages/create", "name": "create", "apis": [ { "api_url": "/v2/languages", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "language", "full_name": "language", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "language[name]", "description": "\n

The name.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "identifier", "full_name": "language[identifier]", "description": "\n

The identifier.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/languages/update", "name": "update", "apis": [ { "api_url": "/v2/languages/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/languages/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language", "full_name": "language", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "language[name]", "description": "\n

The name.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "identifier", "full_name": "language[identifier]", "description": "\n

The identifier.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/languages/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/languages/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "languages_users": { "doc_url": "/apidoc/2.0/languages_users", "api_url": "/api", "name": "Languages users", "short_description": "The languages of a user", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/languages_users/graph", "name": "graph", "apis": [ { "api_url": "/v2/languages_users/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, language_id, user_id, position, created_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "language_id", "user_id", "position", "created_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, language_id, user_id, position, created_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "language_id", "user_id", "position", "created_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, language_id, user_id, position, created_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "language_id", "user_id", "position", "created_at" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/languages_users/graph/on/created_at/by/day", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "2017-11-22": 126 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/languages_users/index", "name": "index", "apis": [ { "api_url": "/v2/users/:user_id/languages_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/languages_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, language_id, user_id, position, created_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "language_id", "user_id", "position", "created_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, language_id, user_id, position, created_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "language_id", "user_id", "position", "created_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, language_id, user_id, position, created_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "language_id", "user_id", "position", "created_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/languages_users", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 126, "language_id": 3, "user_id": 126, "position": 1, "created_at": "2017-11-22T13:41:20.168Z" }, { "id": 125, "language_id": 2, "user_id": 125, "position": 1, "created_at": "2017-11-22T13:41:20.041Z" }, { "id": 124, "language_id": 3, "user_id": 124, "position": 1, "created_at": "2017-11-22T13:41:19.915Z" } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/languages_users/show", "name": "show", "apis": [ { "api_url": "/v2/users/:user_id/languages_users/:id", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/languages_users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/languages_users/70", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 70, "language_id": 2, "user_id": 70, "position": 1, "created_at": "2017-11-22T13:41:12.367Z" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/languages_users/create", "name": "create", "apis": [ { "api_url": "/v2/users/:user_id/languages_users", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/languages_users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "languages_user", "full_name": "languages_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "language_id", "full_name": "languages_user[language_id]", "description": "\n

The language id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "languages_user[user_id]", "description": "\n

The user id. Must be unique in the scope of a given language.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "position", "full_name": "languages_user[position]", "description": "\n

The position.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/languages_users", "versions": [ "2.0" ], "query": null, "request_data": { "languages_user": { "language_id": "3", "position": "1", "user_id": "7" } }, "response_data": { "id": 127, "language_id": 3, "user_id": 7, "position": 1, "created_at": "2017-11-22T13:43:42.355Z" }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/languages_users/update", "name": "update", "apis": [ { "api_url": "/v2/users/:user_id/languages_users/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/languages_users/:id", "http_method": "PUT", "short_description": null, "deprecated": null }, { "api_url": "/v2/languages_users/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/languages_users/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "languages_user", "full_name": "languages_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "language_id", "full_name": "languages_user[language_id]", "description": "\n

The language id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "languages_user[user_id]", "description": "\n

The user id. Must be unique in the scope of a given language.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "position", "full_name": "languages_user[position]", "description": "\n

The position.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/languages_users/70", "versions": [ "2.0" ], "query": null, "request_data": { "languages_user": { "language_id": "3", "position": "1", "user_id": "7" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/languages_users/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/users/:user_id/languages_users/:id", "http_method": "DELETE", "short_description": null, "deprecated": null }, { "api_url": "/v2/languages_users/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/languages_users/70", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "levels": { "doc_url": "/apidoc/2.0/levels", "api_url": "/api", "name": "Levels", "short_description": "A level indicator for a cursus.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/levels/index", "name": "index", "apis": [ { "api_url": "/v2/levels", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/cursus/:cursus_id/levels", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "cursus_id", "full_name": "cursus_id", "description": "\n

The cursus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, lvl, xp, cursus_id, created_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "lvl", "xp", "cursus_id", "created_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, lvl, xp, cursus_id, created_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "lvl", "xp", "cursus_id", "created_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, lvl, xp, cursus_id, created_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "lvl", "xp", "cursus_id", "created_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "locations": { "doc_url": "/apidoc/2.0/locations", "api_url": "/api", "name": "Locations", "short_description": "The location of an user in a campus", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/locations/graph", "name": "graph", "apis": [ { "api_url": "/v2/locations/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on begin_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to begin_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: begin_at, end_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by begin_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, end_at, primary, host, campus_id.", "expected_type": "string", "metadata": { "sort": { "default": { "begin_at": "desc", "id": "desc" }, "keys": [ "id", "user_id", "begin_at", "end_at", "primary", "host", "campus_id" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, end_at, primary, host, campus_id, active, inactive, future, end.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "user_id", "begin_at", "end_at", "primary", "host", "campus_id", "active", "inactive", "future", "end" ], "additional": { "active": { "proc": {}, "all": [ "true", "false" ], "description": "Keep only active locations" }, "inactive": { "proc": {}, "all": [ "true", "false" ], "description": "Keep only inactive locations" }, "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only locations which begins in the future" }, "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end locations" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, end_at, primary, host, campus_id.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "user_id", "begin_at", "end_at", "primary", "host", "campus_id" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/locations/graph/on/begin_at/by/day", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "2017-11-13": 1, "2017-11-14": 1, "2017-11-15": 1, "2017-11-16": 1, "2017-11-17": 1, "2017-11-18": 2, "2017-11-19": 2, "2017-11-20": 2, "2017-11-21": 2, "2017-11-22": 2 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/locations/index", "name": "index", "apis": [ { "api_url": "/v2/locations", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/locations", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:campus_id/locations", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "campus_id", "description": "\n

The campus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by begin_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, end_at, primary, host, campus_id.", "expected_type": "string", "metadata": { "sort": { "default": { "begin_at": "desc", "id": "desc" }, "keys": [ "id", "user_id", "begin_at", "end_at", "primary", "host", "campus_id" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, end_at, primary, host, campus_id, active, inactive, future, end.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "user_id", "begin_at", "end_at", "primary", "host", "campus_id", "active", "inactive", "future", "end" ], "additional": { "active": { "proc": {}, "all": [ "true", "false" ], "description": "Keep only active locations" }, "inactive": { "proc": {}, "all": [ "true", "false" ], "description": "Keep only inactive locations" }, "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only locations which begins in the future" }, "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end locations" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, end_at, primary, host, campus_id.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "user_id", "begin_at", "end_at", "primary", "host", "campus_id" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/locations", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 6, "begin_at": "2017-11-22T13:42:10.248Z", "end_at": "2017-11-22T13:42:10.248Z", "primary": true, "floor": null, "row": null, "post": null, "host": "ariel", "campus_id": 1, "user": { "id": 120, "login": "obkenobi", "url": "https://api.intra.42.fr/v2/users/obkenobi" } }, { "id": 1, "begin_at": "2017-11-22T13:42:09.406Z", "end_at": "2017-11-22T13:42:09.406Z", "primary": true, "floor": null, "row": null, "post": null, "host": "puck", "campus_id": 1, "user": { "id": 73, "login": "padmamid", "url": "https://api.intra.42.fr/v2/users/padmamid" } }, { "id": 7, "begin_at": "2017-11-21T13:42:10.737Z", "end_at": "2017-11-21T14:42:10.737Z", "primary": true, "floor": null, "row": null, "post": null, "host": "ganymede", "campus_id": 1, "user": { "id": 53, "login": "dvader", "url": "https://api.intra.42.fr/v2/users/dvader" } } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/locations/show", "name": "show", "apis": [ { "api_url": "/v2/locations/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/locations/4", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 4, "begin_at": "2017-11-19T13:42:09.511Z", "end_at": "2017-11-19T16:42:09.511Z", "primary": true, "floor": null, "row": null, "post": null, "host": "oberon", "campus_id": 1, "user": { "id": 59, "login": "davader", "url": "https://api.intra.42.fr/v2/users/davader" } }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/locations/create", "name": "create", "apis": [ { "api_url": "/v2/locations", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/locations", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "location", "full_name": "location", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "location[user_id]", "description": "\n

The user id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "location[begin_at]", "description": "\n

The begin at. If not set default value is the current date.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "location[end_at]", "description": "\n

The end at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "primary", "full_name": "location[primary]", "description": "\n

Is it primary?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "host", "full_name": "location[host]", "description": "\n

The host. Must be unique in the scope of a given campus_id and end_at.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "location[campus_id]", "description": "\n

The campus id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/locations", "versions": [ "2.0" ], "query": null, "request_data": { "location": { "begin_at": "2017-11-22 11:43:10 UTC", "campus_id": "2", "host": "burrito", "user_id": "56" } }, "response_data": { "id": 16, "begin_at": "2017-11-22T11:43:10.000Z", "end_at": null, "primary": true, "floor": null, "row": null, "post": null, "host": "burrito", "campus_id": 2, "user": { "id": 56, "login": "pdameron", "url": "https://api.intra.42.fr/v2/users/pdameron" } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/locations/update", "name": "update", "apis": [ { "api_url": "/v2/locations/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/locations/:id", "http_method": "PUT", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/locations/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/locations/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "location", "full_name": "location", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "location[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "location[begin_at]", "description": "\n

The begin at.

\n", "required": false, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "location[end_at]", "description": "\n

The end at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "primary", "full_name": "location[primary]", "description": "\n

Is it primary ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "host", "full_name": "location[host]", "description": "\n

The host. Must be unique in the scope of a given campus id and end at.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "location[campus_id]", "description": "\n

The campus id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/locations/4", "versions": [ "2.0" ], "query": null, "request_data": { "location": { "begin_at": "2017-11-22 11:43:10 UTC", "campus_id": "1", "host": "burrito", "user_id": "49" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/locations/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/locations/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/locations/4", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/locations/end_all", "name": "end_all", "apis": [ { "api_url": "/v2/campus/:campus_id/locations/end_all", "http_method": "DELETE", "short_description": "End all locations.", "deprecated": null } ], "formats": null, "full_description": "\n

Will end all locations of a given campus.

\n", "errors": [], "params": [ { "name": "campus_id", "full_name": "campus_id", "description": "\n

The campus id or slug

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_staff" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "mailings": { "doc_url": "/apidoc/2.0/mailings", "api_url": "/api", "name": "Mailings", "short_description": "Mails from and between 42 entities", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/mailings/index", "name": "index", "apis": [ { "api_url": "/v2/mailings", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/mailings", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, subject, created_at, updated_at, identifier, meta, title, subtitle, attachment, from, to, cc, bcc, content, html_content, attachments.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "subject", "created_at", "updated_at", "identifier", "meta", "title", "subtitle", "attachment", "from", "to", "cc", "bcc", "content", "html_content", "attachments" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, subject, created_at, updated_at, identifier, meta, title, subtitle, attachment, from, to, cc, bcc, content, html_content, attachments.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "subject", "created_at", "updated_at", "identifier", "meta", "title", "subtitle", "attachment", "from", "to", "cc", "bcc", "content", "html_content", "attachments" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, subject, created_at, updated_at, identifier, meta, title, subtitle, attachment, from, to, cc, bcc, content, html_content, attachments.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "subject", "created_at", "updated_at", "identifier", "meta", "title", "subtitle", "attachment", "from", "to", "cc", "bcc", "content", "html_content", "attachments" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/mailings", "versions": [ "2.0" ], "query": "page=1", "request_data": null, "response_data": [ { "id": 1725549, "subject": "Evaluation imminent", "created_at": "2016-04-28T12:30:10.116Z", "updated_at": "2016-04-28T12:30:10.116Z", "identifier": "imminent_correction_correctors", "meta": { "id": 268129, "date": "2016-04-28T14:45:00+02:00", "name": "Defense for ft_ls", "user": "Romain Baran", "other_user": "thifranc" }, "title": "Evaluation imminent", "subtitle": null, "attachment": null, "from": "noreply@42.fr", "to": [ "rbaran@student.42.fr" ], "cc": [], "bcc": [], "content": "Hi,\nYou will review thifranc's code in 15 minutes!", "html_content": "

Hi,\nYou will review thifranc's code in 15 minutes!

\n", "attachments": null }, { "id": 1725550, "subject": "Evaluation imminent", "created_at": "2016-04-28T12:30:11.252Z", "updated_at": "2016-04-28T12:30:11.252Z", "identifier": "imminent_correction_correcteds", "meta": { "id": 268140, "date": "2016-04-28T14:45:00+02:00", "name": "Defense for ft_traceroute", "user": "Jean Alexandre Bert", "other_user": "pnoyelle" }, "title": "Evaluation imminent", "subtitle": null, "attachment": null, "from": "noreply@42.fr", "to": [ "jbert@student.42.fr" ], "cc": [], "bcc": [], "content": "Hi,\nYour code will be reviewed by pnoyelle in 15 minutes!", "html_content": "

Hi,\nYour code will be reviewed by pnoyelle in 15 minutes!

\n", "attachments": null }, { "id": 1725551, "subject": "Evaluation imminent", "created_at": "2016-04-28T12:30:11.292Z", "updated_at": "2016-04-28T12:30:11.292Z", "identifier": "imminent_correction_correctors", "meta": { "id": 268140, "date": "2016-04-28T14:45:00+02:00", "name": "Defense for ft_traceroute", "user": "Pierre Noyelle", "other_user": "jbert" }, "title": "Evaluation imminent", "subtitle": null, "attachment": null, "from": "noreply@42.fr", "to": [ "pnoyelle@student.42.fr" ], "cc": [], "bcc": [], "content": "Hi,\nYou will review jbert's code in 15 minutes!", "html_content": "

Hi,\nYou will review jbert's code in 15 minutes!

\n", "attachments": null } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_staff", "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/mailings/show", "name": "show", "apis": [ { "api_url": "/v2/mailings/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/mailings/42", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 42, "subject": "Evaluation imminent", "created_at": "2016-04-28T12:30:10.116Z", "updated_at": "2016-04-28T12:30:10.116Z", "identifier": "imminent_correction_correctors", "meta": { "id": 268129, "date": "2016-04-28T14:45:00+02:00", "name": "Defense for ft_ls", "user": "Romain Baran", "other_user": "thifranc" }, "title": "Evaluation imminent", "subtitle": null, "attachment": null, "from": "noreply@42.fr", "to": [ "rbaran@student.42.fr" ], "cc": [], "bcc": [], "content": "Hi,\nYou will review thifranc's code in 15 minutes!", "html_content": "

Hi,\nYou will review thifranc's code in 15 minutes!

\n", "attachments": null }, "code": "200", "show_in_doc": 1, "recorded": true }, { "verb": "GET", "path": "/v2/mailings/7", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 7, "subject": "Judge me by my size, do you?", "created_at": "2017-11-22T13:42:11.054Z", "updated_at": "2017-11-22T13:42:11.054Z", "identifier": "spec-mail", "meta": {}, "title": "I'll copy the wireless AGP pixel, that should interface the RSS application!", "subtitle": null, "attachment": null, "from": "kenton@schmeler.co", "to": [ "bohutt2@student.42.fr" ], "cc": [], "bcc": [], "content": "Banh mi mixtape distillery gentrify post-ironic pour-over. Deep v fixie hella selfies irony direct trade paleo migas. Mumblecore kitsch hella selvage bicycle rights green juice. Keffiyeh salvia wolf vhs umami 90's. Cred lumbersexual chia hoodie pbr&b.\nSlow-carb sustainable cliche. Squid ennui kombucha yuccie biodiesel. Vhs cliche deep v mustache jean shorts trust fund fashion axe. Keffiyeh squid pbr&b fixie selvage.\nRoof blue bottle stumptown godard drinking yuccie. Craft beer artisan bushwick kale chips selvage. Kickstarter ethical asymmetrical franzen brooklyn etsy.", "html_content": "

Banh mi mixtape distillery gentrify post-ironic pour-over. Deep v fixie hella selfies irony direct trade paleo migas. Mumblecore kitsch hella selvage bicycle rights green juice. Keffiyeh salvia wolf vhs umami 90's. Cred lumbersexual chia hoodie pbr&b.\nSlow-carb sustainable cliche. Squid ennui kombucha yuccie biodiesel. Vhs cliche deep v mustache jean shorts trust fund fashion axe. Keffiyeh squid pbr&b fixie selvage.\nRoof blue bottle stumptown godard drinking yuccie. Craft beer artisan bushwick kale chips selvage. Kickstarter ethical asymmetrical franzen brooklyn etsy.

\n", "attachments": null }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_staff", "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/mailings/create", "name": "create", "apis": [ { "api_url": "/v2/mailings", "http_method": "POST", "short_description": "Create a new mail", "deprecated": null } ], "formats": null, "full_description": "\n

Create a new, authenticated mail, from 42.

\n", "errors": [], "params": [ { "name": "mailing", "full_name": "mailing", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "subject", "full_name": "mailing[subject]", "description": "\n

The subject of the mail

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "content", "full_name": "mailing[content]", "description": "\n

The content of the mail, supports Markdown.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "from", "full_name": "mailing[from]", "description": "\n

The mail sender, with the sender <sender@email> format. If none, set from no-reply@42.fr

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "to", "full_name": "mailing[to]", "description": "\n

An array of emails for the mail\u2019s to field

\n", "required": false, "allow_nil": true, "validator": "Must be an array of any type", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "cc", "full_name": "mailing[cc]", "description": "\n

An array of emails for the mail\u2019s cc field

\n", "required": false, "allow_nil": true, "validator": "Must be an array of any type", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "bcc", "full_name": "mailing[bcc]", "description": "\n

An array of emails for the mail\u2019s bcc field

\n", "required": false, "allow_nil": true, "validator": "Must be an array of any type", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "title", "full_name": "mailing[title]", "description": "\n

The title of the mail. If none, set to the subject

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "subtitle", "full_name": "mailing[subtitle]", "description": "\n

The subtitle of the mail

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "identifier", "full_name": "mailing[identifier]", "description": "\n

The identifier of the mail, used with meta

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "meta", "full_name": "mailing[meta]", "description": "\n

The meta of the mail

\n", "required": false, "allow_nil": true, "validator": "Must be Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [] } ] }, { "name": "at", "full_name": "at", "description": "\n

The time to send the mail. If none, send it now.

\n", "required": false, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "POST", "path": "/v2/mailings", "versions": [ "2.0" ], "query": null, "request_data": { "mailing": { "content": "Hi andre,\nYou just *won* the mego jackpot !\nCheck [this link](http://spam.prizepool-game-lottery.xxx/winner.php)", "from": "superwin-ultimate-@prizepool-game-lottery.sexy", "identifier": "an_unique_identifier", "subject": "You are the super online contest winner !!!", "subtitle": "And it's kinda awesome", "title": "You won the big jackpot", "to": [ "andre@42.fr" ] } }, "response_data": { "id": 11, "subject": "You are the super online contest winner !!!", "created_at": "2017-11-22T13:43:44.207Z", "updated_at": "2017-11-22T13:43:44.207Z", "identifier": "an_unique_identifier", "meta": {}, "title": "You won the big jackpot", "subtitle": "And it's kinda awesome", "attachment": null, "from": "superwin-ultimate-@prizepool-game-lottery.sexy", "to": [ "andre@42.fr" ], "cc": null, "bcc": null, "content": "Hi andre,\nYou just *won* the mego jackpot !\nCheck [this link](http://spam.prizepool-game-lottery.xxx/winner.php)", "html_content": "

Hi andre,\nYou just won the mego jackpot !\nCheck this link

\n", "attachments": null }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor", "avanced_staff" ], "async": true }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/mailings/update", "name": "update", "apis": [ { "api_url": "/v2/mailings/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/mailings/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "mailing", "full_name": "mailing", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "subject", "full_name": "mailing[subject]", "description": "\n

The subject of the mail

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "content", "full_name": "mailing[content]", "description": "\n

The content of the mail, supports Markdown.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "from", "full_name": "mailing[from]", "description": "\n

The mail sender, with the sender <sender@email> format. If none, set from no-reply@42.fr

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "to", "full_name": "mailing[to]", "description": "\n

An array of emails for the mail\u2019s to field

\n", "required": false, "allow_nil": true, "validator": "Must be an array of any type", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "cc", "full_name": "mailing[cc]", "description": "\n

An array of emails for the mail\u2019s cc field

\n", "required": false, "allow_nil": true, "validator": "Must be an array of any type", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "bcc", "full_name": "mailing[bcc]", "description": "\n

An array of emails for the mail\u2019s bcc field

\n", "required": false, "allow_nil": true, "validator": "Must be an array of any type", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "title", "full_name": "mailing[title]", "description": "\n

The title of the mail. If none, set to the subject

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "subtitle", "full_name": "mailing[subtitle]", "description": "\n

The subtitle of the mail

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "identifier", "full_name": "mailing[identifier]", "description": "\n

The identifier of the mail, used with meta

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "meta", "full_name": "mailing[meta]", "description": "\n

The meta of the mail

\n", "required": false, "allow_nil": true, "validator": "Must be Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [] } ] }, { "name": "at", "full_name": "at", "description": "\n

The time to send the mail. If none, send it now.

\n", "required": false, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "PUT", "path": "/v2/mailings/7", "versions": [ "2.0" ], "query": null, "request_data": { "mailing": { "content": "Hi andre,\nYou just *won* the mego jackpot !\nCheck [this link](http://spam.prizepool-game-lottery.xxx/winner.php)", "from": "superwin-ultimate-@prizepool-game-lottery.sexy", "identifier": "an_unique_identifier", "subject": "You are the super online contest winner !!!", "subtitle": "And it's kinda awesome", "title": "You won the big jackpot", "to": [ "andre@42.fr" ] } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_staff", "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/mailings/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/mailings/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/mailings/7", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_staff", "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "notes": { "doc_url": "/apidoc/2.0/notes", "api_url": "/api", "name": "Notes", "short_description": "A note for an user", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/notes/index", "name": "index", "apis": [ { "api_url": "/v2/users/:user_id/notes", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:campus_id/notes", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/notes", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "campus_id", "description": "\n

The campus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, from, subject, content, created_at, updated_at, kind, approved_at, approver_id, from_user_id.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "user_id", "from", "subject", "content", "created_at", "updated_at", "kind", "approved_at", "approver_id", "from_user_id" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, from, subject, content, created_at, updated_at, kind, approved_at, approver_id, from_user_id, approved.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "user_id", "from", "subject", "content", "created_at", "updated_at", "kind", "approved_at", "approver_id", "from_user_id", "approved" ], "additional": { "approved": { "proc": {}, "all": [ "true", "false" ], "description": "Return only approved notes" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, from, subject, content, created_at, updated_at, kind, approved_at, approver_id, from_user_id.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "user_id", "from", "subject", "content", "created_at", "updated_at", "kind", "approved_at", "approver_id", "from_user_id" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/notes", "versions": [ "2.0" ], "query": "page=1", "request_data": null, "response_data": [ { "id": 1, "from_user": { "id": 74, "login": "andre", "url": "https://api.intra.42.fr/v2/users/andre" }, "subject": "Chevelure abondante", "content": "Mathieu n'aime pas se faire appeler princesse \u2665\ufe0f", "created_at": "2016-04-27T07:26:38.254Z", "user": { "id": 22, "login": "mathieu", "url": "https://api.intra.42.fr/v2/users/mathieu" } }, { "id": 2, "from_user": { "id": 22, "login": "mathieu", "url": "https://api.intra.42.fr/v2/users/mathieu" }, "subject": "Amour cach\u00e9", "content": "Est secretement amoureux de flav\ufe0f", "created_at": "2016-04-27T07:26:38.254Z", "user": { "id": 74, "login": "andre", "url": "https://api.intra.42.fr/v2/users/andre" } }, { "id": 3, "from_user": { "id": 22, "login": "mathieu", "url": "https://api.intra.42.fr/v2/users/mathieu" }, "subject": "Amour cach\u00e9 (2)", "content": "Est secretement amoureux de andr\u00e9", "created_at": "2016-04-27T07:26:38.254Z", "user": { "id": 10935, "login": "fguilloc", "url": "https://api.intra.42.fr/v2/users/fguilloc" } } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "notes_manager", "advanced_notes_manager" ], "authentication": "user" }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/notes/show", "name": "show", "apis": [ { "api_url": "/v2/notes/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/notes/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 1, "from_user": { "id": 74, "login": "andre", "url": "https://api.intra.42.fr/v2/users/andre" }, "subject": "Chevelure abondante", "content": "Mathieu n'aime pas se faire apeller princesse \u2665\ufe0f", "created_at": "2016-04-27T07:26:38.254Z", "user": { "id": 22, "login": "mathieu", "url": "https://api.intra.42.fr/v2/users/mathieu" } }, "code": "200", "show_in_doc": 1, "recorded": true }, { "verb": "GET", "path": "/v2/notes/9", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 9, "from_user": { "id": 74, "login": "andre", "url": "https://api.intra.42.fr/v2/users/andre" }, "subject": "We need to back up the haptic XSS feed!", "content": "You know, that little droid is going to cause me a lot of trouble.", "created_at": "2017-11-22T13:42:11.225Z", "user": { "id": 116, "login": "mwindu2", "url": "https://api.intra.42.fr/v2/users/mwindu2" } }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "notes_manager", "advanced_notes_manager" ], "authentication": "user" }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/notes/create", "name": "create", "apis": [ { "api_url": "/v2/notes", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "note", "full_name": "note", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "note[user_id]", "description": "\n

The user who receives the note.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "subject", "full_name": "note[subject]", "description": "\n

The subject.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "content", "full_name": "note[content]", "description": "\n

The content.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "note[kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: manual, black_hole, school_record.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "approved_at", "full_name": "note[approved_at]", "description": "\n

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

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "approver_id", "full_name": "note[approver_id]", "description": "\n

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

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/notes", "versions": [ "2.0" ], "query": null, "request_data": { "note": { "content": "gentrify roof beard keffiyeh squid franzen cold-pressed farm-to-table retro fingerstache hoodie health", "subject": "quinoa", "user_id": "10" } }, "response_data": { "id": 11, "from_user": { "id": 74, "login": "andre", "url": "https://api.intra.42.fr/v2/users/andre" }, "subject": "quinoa", "content": "gentrify roof beard keffiyeh squid franzen cold-pressed farm-to-table retro fingerstache hoodie health", "created_at": "2017-11-22T13:43:47.322Z", "user": { "id": 10, "login": "ssebulba", "url": "https://api.intra.42.fr/v2/users/ssebulba" } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "notes_manager", "advanced_notes_manager" ], "authentication": "user" }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/notes/update", "name": "update", "apis": [ { "api_url": "/v2/notes/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/notes/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "note", "full_name": "note", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "note[user_id]", "description": "\n

The user who receives the note.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "subject", "full_name": "note[subject]", "description": "\n

The subject.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "content", "full_name": "note[content]", "description": "\n

The content.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "note[kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: manual, black_hole, school_record.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "approved_at", "full_name": "note[approved_at]", "description": "\n

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

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "approver_id", "full_name": "note[approver_id]", "description": "\n

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

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/notes/9", "versions": [ "2.0" ], "query": null, "request_data": { "note": { "content": "waistcoat sartorial cornhole dreamcatcher pop-up scenester cleanse hammock shoreditch pug iPhone freegan", "subject": "swag", "user_id": "109" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "notes_manager", "advanced_notes_manager" ], "authentication": "user" }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/notes/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/notes/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/notes/9", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "notes_manager", "advanced_notes_manager" ], "authentication": "user" }, "see": [], "headers": [], "show": true } ], "headers": [] }, "notions": { "doc_url": "/apidoc/2.0/notions", "api_url": "/api", "name": "Notions", "short_description": "The elearning notion in a cursus", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/notions/index", "name": "index", "apis": [ { "api_url": "/v2/cursus/:cursus_id/notions", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/tags/:tag_id/notions", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/notions", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "cursus_id", "full_name": "cursus_id", "description": "\n

The cursus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "tag_id", "full_name": "tag_id", "description": "\n

The tag id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, slug.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "name", "created_at", "updated_at", "slug" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, slug.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "created_at", "updated_at", "slug" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, slug.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "created_at", "updated_at", "slug" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/notions", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 10, "name": "Piscine OCaml - D08 - Object oriented programming 2/2", "slug": "piscine-ocaml-d08-object-oriented-programming-2-2", "created_at": "2017-11-22T13:41:24.091Z", "subnotions": [], "tags": [ { "id": 6, "name": "Jour 13", "kind": "project" } ], "cursus": [ { "id": 2, "created_at": "2017-11-22T13:41:00.825Z", "name": "42", "slug": "42" } ] }, { "id": 9, "name": "Piscine Unity - D07 - GUI 3D, navmesh and raycasting", "slug": "piscine-unity-d07-gui-3d-navmesh-and-raycasting", "created_at": "2017-11-22T13:41:24.053Z", "subnotions": [], "tags": [ { "id": 7, "name": "Bocal", "kind": "general" } ], "cursus": [ { "id": 2, "created_at": "2017-11-22T13:41:00.825Z", "name": "42", "slug": "42" } ] }, { "id": 8, "name": "Piscine OCaml - D05 - Imperative traits", "slug": "piscine-ocaml-d05-imperative-traits", "created_at": "2017-11-22T13:41:24.021Z", "subnotions": [], "tags": [ { "id": 7, "name": "Bocal", "kind": "general" } ], "cursus": [ { "id": 1, "created_at": "2017-11-22T13:41:00.750Z", "name": "Piscine C", "slug": "piscine-c" } ] } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/notions/show", "name": "show", "apis": [ { "api_url": "/v2/notions/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/notions/3", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 3, "name": "Piscine OCaml - D01 - MOAR functions", "slug": "piscine-ocaml-d01-moar-functions", "created_at": "2017-11-22T13:41:23.822Z", "subnotions": [], "tags": [ { "id": 3, "name": "GBmu", "kind": "project" } ], "cursus": [ { "id": 2, "created_at": "2017-11-22T13:41:00.825Z", "name": "42", "slug": "42" } ] }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/notions/create", "name": "create", "apis": [ { "api_url": "/v2/notions", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "notion", "full_name": "notion", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "notion[name]", "description": "\n

The name. Must be unique.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "tag_ids", "full_name": "notion[tag_ids]", "description": "\n

The tag ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_ids", "full_name": "notion[cursus_ids]", "description": "\n

The cursus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "subnotions_attributes", "full_name": "notion[subnotions_attributes]", "description": "\n

The subnotions attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "notion[subnotions_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "notion[subnotions_attributes][name]", "description": "\n

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

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "notion[subnotions_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "attachments_attributes", "full_name": "notion[subnotions_attributes][attachments_attributes]", "description": "\n

The attachments attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "notion[subnotions_attributes][attachments_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "notion[subnotions_attributes][attachments_attributes][kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: code, pdf, link, document, video.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "notion[subnotions_attributes][attachments_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language_id", "full_name": "notion[subnotions_attributes][attachments_attributes][language_id]", "description": "\n

The language id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "untranslatable", "full_name": "notion[subnotions_attributes][attachments_attributes][untranslatable]", "description": "\n

Is it untranslatable ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "attachable_attributes", "full_name": "notion[subnotions_attributes][attachments_attributes][attachable_attributes]", "description": "\n

The attachable attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [] } ] } ] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/notions", "versions": [ "2.0" ], "query": null, "request_data": { "notion": { "cursus_ids": [ "2" ], "name": "Metafiction", "subnotions_attributes": [ { "name": "Postern of Fate" } ], "tag_ids": [ "2", "3", "6" ] } }, "response_data": { "id": 11, "name": "Metafiction", "slug": "metafiction", "created_at": "2017-11-22T13:43:48.180Z", "subnotions": [ { "id": 11, "name": "Postern of Fate", "slug": "postern-of-fate", "created_at": "2017-11-22T13:43:48.192Z", "notepad": null } ], "tags": [ { "id": 2, "name": "Friends with Benefits", "kind": "project" }, { "id": 3, "name": "GBmu", "kind": "project" }, { "id": 6, "name": "Jour 13", "kind": "project" } ], "cursus": [ { "id": 2, "created_at": "2017-11-22T13:41:00.825Z", "name": "42", "slug": "42" } ] }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor", "video_manager" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/notions/update", "name": "update", "apis": [ { "api_url": "/v2/notions/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/notions/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "notion", "full_name": "notion", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "notion[name]", "description": "\n

The name. Must be unique.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "tag_ids", "full_name": "notion[tag_ids]", "description": "\n

The tag ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_ids", "full_name": "notion[cursus_ids]", "description": "\n

The cursus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "subnotions_attributes", "full_name": "notion[subnotions_attributes]", "description": "\n

The subnotions attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "notion[subnotions_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "notion[subnotions_attributes][name]", "description": "\n

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

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "notion[subnotions_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "attachments_attributes", "full_name": "notion[subnotions_attributes][attachments_attributes]", "description": "\n

The attachments attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "notion[subnotions_attributes][attachments_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "notion[subnotions_attributes][attachments_attributes][kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: code, pdf, link, document, video.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "notion[subnotions_attributes][attachments_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language_id", "full_name": "notion[subnotions_attributes][attachments_attributes][language_id]", "description": "\n

The language id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "untranslatable", "full_name": "notion[subnotions_attributes][attachments_attributes][untranslatable]", "description": "\n

Is it untranslatable ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "attachable_attributes", "full_name": "notion[subnotions_attributes][attachments_attributes][attachable_attributes]", "description": "\n

The attachable attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [] } ] } ] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/notions/3", "versions": [ "2.0" ], "query": null, "request_data": { "notion": { "cursus_ids": [ "2" ], "name": "Metafiction", "subnotions_attributes": [ { "name": "The Millstone" } ], "tag_ids": [ "1", "11", "10" ] } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor", "video_manager" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/notions/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/notions/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/notions/3", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor", "video_manager" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "params_project_sessions_rules": { "doc_url": "/apidoc/2.0/params_project_sessions_rules", "api_url": "/api", "name": "Params project sessions rules", "short_description": "The value of a parameter for a project sessions rule.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/params_project_sessions_rules/index", "name": "index", "apis": [ { "api_url": "/v2/project_sessions_rules/:project_sessions_rule_id/params_project_sessions_rules", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/params_project_sessions_rules", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_sessions_rule_id", "full_name": "project_sessions_rule_id", "description": "\n

The project_sessions_rule id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, param_id, project_sessions_rule_id, value, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "param_id", "project_sessions_rule_id", "value", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, param_id, project_sessions_rule_id, value, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "param_id", "project_sessions_rule_id", "value", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, param_id, project_sessions_rule_id, value, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "param_id", "project_sessions_rule_id", "value", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/params_project_sessions_rules/show", "name": "show", "apis": [ { "api_url": "/v2/params_project_sessions_rules/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/params_project_sessions_rules/create", "name": "create", "apis": [ { "api_url": "/v2/project_sessions_rules/:project_sessions_rule_id/params_project_sessions_rules", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/params_project_sessions_rules", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_sessions_rule_id", "full_name": "project_sessions_rule_id", "description": "\n

The project_sessions_rule id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "params_project_sessions_rule", "full_name": "params_project_sessions_rule", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "params_project_sessions_rule[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "param_id", "full_name": "params_project_sessions_rule[param_id]", "description": "\n

The param id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "params_project_sessions_rule[value]", "description": "\n

The value.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_sessions_rule_id", "full_name": "params_project_sessions_rule[project_sessions_rule_id]", "description": "\n

The project sessions rule id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/params_project_sessions_rules/update", "name": "update", "apis": [ { "api_url": "/v2/params_project_sessions_rules/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/params_project_sessions_rules/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "params_project_sessions_rule", "full_name": "params_project_sessions_rule", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "params_project_sessions_rule[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "param_id", "full_name": "params_project_sessions_rule[param_id]", "description": "\n

The param id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "params_project_sessions_rule[value]", "description": "\n

The value.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_sessions_rule_id", "full_name": "params_project_sessions_rule[project_sessions_rule_id]", "description": "\n

The project sessions rule id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/params_project_sessions_rules/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/params_project_sessions_rules/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "partnerships": { "doc_url": "/apidoc/2.0/partnerships", "api_url": "/api", "name": "Partnerships", "short_description": "Pedagogic partnerships", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/partnerships/index", "name": "index", "apis": [ { "api_url": "/v2/partnerships", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, description, difficulty, created_at, updated_at, slug, file, cursus_id.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "name", "description", "difficulty", "created_at", "updated_at", "slug", "file", "cursus_id" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, description, difficulty, created_at, updated_at, slug, file, cursus_id, tier, difficulty.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "description", "difficulty", "created_at", "updated_at", "slug", "file", "cursus_id", "tier", "difficulty" ], "additional": { "tier": { "proc": {}, "all": [ 0, 1, 2, 3, 4, 5, 6, 7 ], "description": "Filter on a project's tier" }, "difficulty": { "proc": {}, "all": [ 0, 1, 2, 3, 4, 5, 6, 7 ], "description": "Filter on a project's tier" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, description, difficulty, created_at, updated_at, slug, file, cursus_id, difficulty.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "description", "difficulty", "created_at", "updated_at", "slug", "file", "cursus_id", "difficulty" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/partnerships", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 1, "name": "Strosin-Kiehn", "slug": "strosin-kiehn", "tier": 1, "url": "https://api.intra.42.fr/v2/partnerships/strosin-kiehn", "partnerships_users_url": "https://api.intra.42.fr/v2/partnerships/strosin-kiehn/partnerships_users" } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/partnerships/show", "name": "show", "apis": [ { "api_url": "/v2/partnerships/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/partnerships/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 1, "name": "Strosin-Kiehn", "slug": "strosin-kiehn", "tier": 1, "url": "https://api.intra.42.fr/v2/partnerships/strosin-kiehn", "partnerships_users_url": "https://api.intra.42.fr/v2/partnerships/strosin-kiehn/partnerships_users" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/partnerships/create", "name": "create", "apis": [ { "api_url": "/v2/partnerships", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "partnership", "full_name": "partnership", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "partnership[name]", "description": "\n

The name. Must be unique.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "partnership[description]", "description": "\n

The description.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "difficulty", "full_name": "partnership[difficulty]", "description": "\n

The difficulty.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "file", "full_name": "partnership[file]", "description": "\n

The file.

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "partnership[cursus_id]", "description": "\n

The cursus id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_ids", "full_name": "partnership[user_ids]", "description": "\n

The user ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "partnerships_skills_attributes", "full_name": "partnership[partnerships_skills_attributes]", "description": "\n

The partnerships skills attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "partnership[partnerships_skills_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "skill_id", "full_name": "partnership[partnerships_skills_attributes][skill_id]", "description": "\n

The skill id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "partnership[partnerships_skills_attributes][value]", "description": "\n

The value.

\n", "required": true, "allow_nil": false, "validator": "Must be Float", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "partnership[partnerships_skills_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/partnerships", "versions": [ "2.0" ], "query": null, "request_data": { "partnership": { "cursus_id": "2", "description": "indexing the hard drive won't do anything, we need to parse the solid state PNG application!", "difficulty": "100", "name": "Western Arkansas College", "partnerships_skills_attributes": [ { "skill_id": "2", "value": "100.0" } ] } }, "response_data": { "id": 2, "name": "Western Arkansas College", "slug": "western-arkansas-college", "tier": 1, "url": "https://api.intra.42.fr/v2/partnerships/western-arkansas-college", "partnerships_users_url": "https://api.intra.42.fr/v2/partnerships/western-arkansas-college/partnerships_users" }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "student_tutor", "advanced_tutor", "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/partnerships/update", "name": "update", "apis": [ { "api_url": "/v2/partnerships/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/partnerships/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "partnership", "full_name": "partnership", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "partnership[name]", "description": "\n

The name. Must be unique.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "partnership[description]", "description": "\n

The description.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "difficulty", "full_name": "partnership[difficulty]", "description": "\n

The difficulty.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "file", "full_name": "partnership[file]", "description": "\n

The file.

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "partnership[cursus_id]", "description": "\n

The cursus id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_ids", "full_name": "partnership[user_ids]", "description": "\n

The user ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "partnerships_skills_attributes", "full_name": "partnership[partnerships_skills_attributes]", "description": "\n

The partnerships skills attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "partnership[partnerships_skills_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "skill_id", "full_name": "partnership[partnerships_skills_attributes][skill_id]", "description": "\n

The skill id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "partnership[partnerships_skills_attributes][value]", "description": "\n

The value.

\n", "required": false, "allow_nil": false, "validator": "Must be Float", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "partnership[partnerships_skills_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/partnerships/1", "versions": [ "2.0" ], "query": null, "request_data": { "partnership": { "description": "indexing the hard drive won't do anything, we need to parse the solid state PNG application!", "name": "Western Arkansas College" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "student_tutor", "advanced_tutor", "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/partnerships/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/partnerships/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/partnerships/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "student_tutor", "advanced_tutor", "advanced_staff" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "partnerships_users": { "doc_url": "/apidoc/2.0/partnerships_users", "api_url": "/api", "name": "Partnerships users", "short_description": "Users doing a partnership", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/partnerships_users/index", "name": "index", "apis": [ { "api_url": "/v2/partnerships/:partnership_id/partnerships_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/partnerships_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "partnership_id", "full_name": "partnership_id", "description": "\n

The partnership id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, partnership_id, user_id, created_at, updated_at, final_mark.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "partnership_id", "user_id", "created_at", "updated_at", "final_mark" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, partnership_id, user_id, created_at, updated_at, final_mark.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "partnership_id", "user_id", "created_at", "updated_at", "final_mark" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, partnership_id, user_id, created_at, updated_at, final_mark.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "partnership_id", "user_id", "created_at", "updated_at", "final_mark" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/partnerships_users", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 5, "partnership_id": 1, "final_mark": null, "user": { "id": 77, "login": "bofett", "url": "https://api.intra.42.fr/v2/users/bofett" } }, { "id": 4, "partnership_id": 1, "final_mark": null, "user": { "id": 12, "login": "kiki-adi", "url": "https://api.intra.42.fr/v2/users/kiki-adi" } }, { "id": 3, "partnership_id": 1, "final_mark": null, "user": { "id": 14, "login": "pamidala", "url": "https://api.intra.42.fr/v2/users/pamidala" } } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/partnerships_users/show", "name": "show", "apis": [ { "api_url": "/v2/partnerships_users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/partnerships_users/5", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 5, "partnership_id": 1, "final_mark": null, "user": { "id": 77, "login": "bofett", "url": "https://api.intra.42.fr/v2/users/bofett" } }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/partnerships_users/create", "name": "create", "apis": [ { "api_url": "/v2/partnerships/:partnership_id/partnerships_users", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/partnerships_users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "partnership_id", "full_name": "partnership_id", "description": "\n

The partnership id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "partnerships_user", "full_name": "partnerships_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "partnership_id", "full_name": "partnerships_user[partnership_id]", "description": "\n

The partnership id. Must be unique in the scope of a given user.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "partnerships_user[user_id]", "description": "\n

The user id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "final_mark", "full_name": "partnerships_user[final_mark]", "description": "\n

The final mark.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/partnerships_users", "versions": [ "2.0" ], "query": null, "request_data": { "partnerships_user": { "partnership_id": "1", "user_id": "107" } }, "response_data": { "id": 6, "partnership_id": 1, "final_mark": null, "user": { "id": 107, "login": "lukeskyw", "url": "https://api.intra.42.fr/v2/users/lukeskyw" } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "student_tutor", "advanced_tutor", "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/partnerships_users/update", "name": "update", "apis": [ { "api_url": "/v2/partnerships_users/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/partnerships_users/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "partnerships_user", "full_name": "partnerships_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "partnership_id", "full_name": "partnerships_user[partnership_id]", "description": "\n

The partnership id. Must be unique in the scope of a given user.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "partnerships_user[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "final_mark", "full_name": "partnerships_user[final_mark]", "description": "\n

The final mark.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/partnerships_users/5", "versions": [ "2.0" ], "query": null, "request_data": { "partnerships_user": { "partnership_id": "1", "user_id": "99" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "student_tutor", "advanced_tutor", "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/partnerships_users/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/partnerships_users/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/partnerships_users/5", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "student_tutor", "advanced_tutor", "advanced_staff" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "patronages": { "doc_url": "/apidoc/2.0/patronages", "api_url": "/api", "name": "Patronages", "short_description": "A patronage between two users", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/patronages/index", "name": "index", "apis": [ { "api_url": "/v2/patronages", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/patronages", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, godfather_id, ongoing, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "user_id", "godfather_id", "ongoing", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, godfather_id, ongoing, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "user_id", "godfather_id", "ongoing", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, godfather_id, ongoing, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "user_id", "godfather_id", "ongoing", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/patronages", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 122, "user_id": 124, "godfather_id": 39, "ongoing": true, "created_at": "2017-11-22T13:42:12.790Z", "updated_at": "2017-11-22T13:42:12.796Z", "user": { "id": 124, "login": "hsolo2", "url": "https://api.intra.42.fr/v2/users/hsolo2" }, "godfather": { "id": 39, "login": "anskywal", "url": "https://api.intra.42.fr/v2/users/anskywal" } }, { "id": 121, "user_id": 116, "godfather_id": 15, "ongoing": true, "created_at": "2017-11-22T13:42:12.779Z", "updated_at": "2017-11-22T13:42:12.786Z", "user": { "id": 116, "login": "mwindu2", "url": "https://api.intra.42.fr/v2/users/mwindu2" }, "godfather": { "id": 15, "login": "mwindu", "url": "https://api.intra.42.fr/v2/users/mwindu" } }, { "id": 120, "user_id": 123, "godfather_id": 96, "ongoing": true, "created_at": "2017-11-22T13:42:12.769Z", "updated_at": "2017-11-22T13:42:12.774Z", "user": { "id": 123, "login": "chewbche", "url": "https://api.intra.42.fr/v2/users/chewbche" }, "godfather": { "id": 96, "login": "wattwatt", "url": "https://api.intra.42.fr/v2/users/wattwatt" } } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/patronages/show", "name": "show", "apis": [ { "api_url": "/v2/patronages/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/patronages/113", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 113, "user_id": 119, "godfather_id": 85, "ongoing": true, "created_at": "2017-11-22T13:42:12.697Z", "updated_at": "2017-11-22T13:42:12.704Z", "user": { "id": 119, "login": "hasolo", "url": "https://api.intra.42.fr/v2/users/hasolo" }, "godfather": { "id": 85, "login": "chewchew", "url": "https://api.intra.42.fr/v2/users/chewchew" } }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/patronages/create", "name": "create", "apis": [ { "api_url": "/v2/patronages", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/patronages", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "patronage", "full_name": "patronage", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "patronage[user_id]", "description": "\n

The user id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "godfather_id", "full_name": "patronage[godfather_id]", "description": "\n

The godfather id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "ongoing", "full_name": "patronage[ongoing]", "description": "\n

Is it ongoing ? Default to true.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/patronages", "versions": [ "2.0" ], "query": null, "request_data": { "patronage": { "godfather_id": "4", "user_id": "3" } }, "response_data": { "id": 123, "user_id": 3, "godfather_id": 4, "ongoing": true, "created_at": "2017-11-22T13:43:50.782Z", "updated_at": "2017-11-22T13:43:50.794Z", "user": { "id": 3, "login": "gargamel", "url": "https://api.intra.42.fr/v2/users/gargamel" }, "godfather": { "id": 4, "login": "kpedro", "url": "https://api.intra.42.fr/v2/users/kpedro" } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/patronages/update", "name": "update", "apis": [ { "api_url": "/v2/patronages/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/patronages/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "patronage", "full_name": "patronage", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "patronage[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "godfather_id", "full_name": "patronage[godfather_id]", "description": "\n

The godfather id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "ongoing", "full_name": "patronage[ongoing]", "description": "\n

Is it ongoing ? Default to true.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/patronages/113", "versions": [ "2.0" ], "query": null, "request_data": { "patronage": { "godfather_id": "4", "user_id": "3" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/patronages/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/patronages/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/patronages/113", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "patronages_reports": { "doc_url": "/apidoc/2.0/patronages_reports", "api_url": "/api", "name": "Patronages reports", "short_description": "A report for a patronage", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/patronages_reports/graph", "name": "graph", "apis": [ { "api_url": "/v2/patronages_reports/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at, begin_at, validated_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, created_at, updated_at, patronage_id, report_id, validated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "user_id", "begin_at", "created_at", "updated_at", "patronage_id", "report_id", "validated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, created_at, updated_at, patronage_id, report_id, validated_at, future, validated.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "user_id", "begin_at", "created_at", "updated_at", "patronage_id", "report_id", "validated_at", "future", "validated" ], "additional": { "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only patronages reports which begins in the future" }, "validated": { "proc": {}, "all": [ "true", "false" ], "description": "Return only validated patronages reports" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, created_at, updated_at, patronage_id, report_id, validated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "user_id", "begin_at", "created_at", "updated_at", "patronage_id", "report_id", "validated_at" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/patronages_reports/graph/on/created_at/by/day", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "2017-11-22": 124 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/patronages_reports/index", "name": "index", "apis": [ { "api_url": "/v2/patronages_reports", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/patronages_reports", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/patronages/:patronage_id/patronages_reports", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/reports/:report_id/patronages_reports", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "patronage_id", "full_name": "patronage_id", "description": "\n

The patronage id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "report_id", "full_name": "report_id", "description": "\n

The report id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, created_at, updated_at, patronage_id, report_id, validated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "user_id", "begin_at", "created_at", "updated_at", "patronage_id", "report_id", "validated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, created_at, updated_at, patronage_id, report_id, validated_at, future, validated.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "user_id", "begin_at", "created_at", "updated_at", "patronage_id", "report_id", "validated_at", "future", "validated" ], "additional": { "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only patronages reports which begins in the future" }, "validated": { "proc": {}, "all": [ "true", "false" ], "description": "Return only validated patronages reports" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, created_at, updated_at, patronage_id, report_id, validated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "user_id", "begin_at", "created_at", "updated_at", "patronage_id", "report_id", "validated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/patronages_reports/show", "name": "show", "apis": [ { "api_url": "/v2/patronages_reports/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/patronages_reports/67", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 67, "user_id": 39, "begin_at": "2018-06-20T13:42:12.179Z", "created_at": "2017-11-22T13:42:12.179Z", "updated_at": "2017-11-22T13:42:12.179Z", "patronage_id": 67, "report_id": 0, "validated_at": null, "patronage": { "id": 67, "user_id": 63, "godfather_id": 39, "ongoing": true, "created_at": "2017-11-22T13:42:12.177Z", "updated_at": "2017-11-22T13:42:12.181Z" }, "report": { "id": 0, "name": "Final Debriefing", "comment": "", "introduction_md": "", "disclaimer_md": "", "guidelines_md": "Schlitz stumptown tacos locavore ennui chartreuse pork belly. Polaroid vice readymade everyday next level. Jean shorts venmo cold-pressed crucifix.\nRamps truffaut tousled biodiesel sriracha shoreditch ugh actually. Celiac street sartorial normcore gentrify chia fingerstache photo booth. Vinyl next level locavore stumptown truffaut vice.\nEveryday keffiyeh pinterest flannel. Five dollar toast yr listicle trust fund franzen salvia. Humblebrag umami aesthetic pour-over blog before they sold out. Humblebrag occupy deep v.", "created_at": "2017-11-22T13:42:11.309Z", "updated_at": "2017-11-22T13:42:11.416Z", "slug": "final-debriefing", "delay_days": 210 }, "user": { "id": 39, "login": "anskywal", "url": "https://api.intra.42.fr/v2/users/anskywal" }, "answers": [] }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/patronages_reports/create", "name": "create", "apis": [ { "api_url": "/v2/patronages_reports", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/patronages_reports", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/patronages/:patronage_id/patronages_reports", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/reports/:report_id/patronages_reports", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "patronage_id", "full_name": "patronage_id", "description": "\n

The patronage id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "report_id", "full_name": "report_id", "description": "\n

The report id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "patronages_report", "full_name": "patronages_report", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "patronages_report[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "patronages_report[begin_at]", "description": "\n

The begin at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "patronage_id", "full_name": "patronages_report[patronage_id]", "description": "\n

The patronage id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "report_id", "full_name": "patronages_report[report_id]", "description": "\n

The report id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "validated_at", "full_name": "patronages_report[validated_at]", "description": "\n

The validated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "comment", "full_name": "patronages_report[comment]", "description": "\n

The comment.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "answers_attributes", "full_name": "patronages_report[answers_attributes]", "description": "\n

The answers attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "question_id", "full_name": "patronages_report[answers_attributes][question_id]", "description": "\n

The question id. Must be unique in the scope of a given scalable entity.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "patronages_report[answers_attributes][value]", "description": "\n

The value.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "answer", "full_name": "patronages_report[answers_attributes][answer]", "description": "\n

The answer.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "patronages_report[answers_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/patronages_reports", "versions": [ "2.0" ], "query": null, "request_data": { "patronages_report": { "begin_at": "2017-11-22 13:43:10 UTC", "patronage_id": "98", "report_id": "0", "user_id": "27" } }, "response_data": { "id": 127, "user_id": 27, "begin_at": "2017-11-22T13:43:10.000Z", "created_at": "2017-11-22T13:43:51.496Z", "updated_at": "2017-11-22T13:43:51.496Z", "patronage_id": 98, "report_id": 0, "validated_at": null, "patronage": { "id": 98, "user_id": 107, "godfather_id": 96, "ongoing": true, "created_at": "2017-11-22T13:42:12.541Z", "updated_at": "2017-11-22T13:43:51.499Z" }, "report": { "id": 0, "name": "Final Debriefing", "comment": "", "introduction_md": "", "disclaimer_md": "", "guidelines_md": "Schlitz stumptown tacos locavore ennui chartreuse pork belly. Polaroid vice readymade everyday next level. Jean shorts venmo cold-pressed crucifix.\nRamps truffaut tousled biodiesel sriracha shoreditch ugh actually. Celiac street sartorial normcore gentrify chia fingerstache photo booth. Vinyl next level locavore stumptown truffaut vice.\nEveryday keffiyeh pinterest flannel. Five dollar toast yr listicle trust fund franzen salvia. Humblebrag umami aesthetic pour-over blog before they sold out. Humblebrag occupy deep v.", "created_at": "2017-11-22T13:42:11.309Z", "updated_at": "2017-11-22T13:42:11.416Z", "slug": "final-debriefing", "delay_days": 210 }, "user": { "id": 27, "login": "dcaedus", "url": "https://api.intra.42.fr/v2/users/dcaedus" }, "answers": [] }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/patronages_reports/update", "name": "update", "apis": [ { "api_url": "/v2/patronages_reports/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/patronages_reports/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "patronages_report", "full_name": "patronages_report", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "patronages_report[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "patronages_report[begin_at]", "description": "\n

The begin at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "patronage_id", "full_name": "patronages_report[patronage_id]", "description": "\n

The patronage id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "report_id", "full_name": "patronages_report[report_id]", "description": "\n

The report id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "validated_at", "full_name": "patronages_report[validated_at]", "description": "\n

The validated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "comment", "full_name": "patronages_report[comment]", "description": "\n

The comment.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "answers_attributes", "full_name": "patronages_report[answers_attributes]", "description": "\n

The answers attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "question_id", "full_name": "patronages_report[answers_attributes][question_id]", "description": "\n

The question id. Must be unique in the scope of a given scalable entity.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "patronages_report[answers_attributes][value]", "description": "\n

The value.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "answer", "full_name": "patronages_report[answers_attributes][answer]", "description": "\n

The answer.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "patronages_report[answers_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/patronages_reports/67", "versions": [ "2.0" ], "query": null, "request_data": { "patronages_report": { "begin_at": "2017-11-22 13:43:10 UTC", "patronage_id": "112", "report_id": "0", "user_id": "53" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/patronages_reports/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/patronages_reports/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/patronages_reports/67", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "pools": { "doc_url": "/apidoc/2.0/pools", "api_url": "/api", "name": "Pools", "short_description": "The pool of evaluation points.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/pools/index", "name": "index", "apis": [ { "api_url": "/v2/pools", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, current_points, max_points, created_at, updated_at, cursus_id, campus_id.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "current_points", "max_points", "created_at", "updated_at", "cursus_id", "campus_id" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, current_points, max_points, created_at, updated_at, cursus_id, campus_id.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "current_points", "max_points", "created_at", "updated_at", "cursus_id", "campus_id" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/pools", "versions": [ "2.0" ], "query": "page=1", "request_data": null, "response_data": [ { "id": 25, "current_points": 0, "max_points": 400, "cursus_id": 1, "campus_id": 12 }, { "id": 19, "current_points": 110, "max_points": 400, "cursus_id": 1, "campus_id": 9 }, { "id": 18, "current_points": 40, "max_points": 600, "cursus_id": 1, "campus_id": 8 } ] } ], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/pools/show", "name": "show", "apis": [ { "api_url": "/v2/pools/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/pools/25", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 25, "current_points": 0, "max_points": 400, "cursus_id": 1, "campus_id": 12 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "products": { "doc_url": "/apidoc/2.0/products", "api_url": "/api", "name": "Products", "short_description": "Products are sold on the intranet shop", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/products/index", "name": "index", "apis": [ { "api_url": "/v2/products", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:campus_id/products", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "campus_id", "full_name": "campus_id", "description": "\n

The campus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, description, price, quantity, begin_at, end_at, category_id, created_at, updated_at, kind, slug, image, is_uniq, one_time_purchase.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "name", "description", "price", "quantity", "begin_at", "end_at", "category_id", "created_at", "updated_at", "kind", "slug", "image", "is_uniq", "one_time_purchase" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, description, price, quantity, begin_at, end_at, category_id, created_at, updated_at, kind, slug, image, is_uniq, one_time_purchase, future, end.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "description", "price", "quantity", "begin_at", "end_at", "category_id", "created_at", "updated_at", "kind", "slug", "image", "is_uniq", "one_time_purchase", "future", "end" ], "additional": { "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only products which begins in the future" }, "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end products" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, description, price, quantity, begin_at, end_at, category_id, created_at, updated_at, kind, slug, image, is_uniq, one_time_purchase.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "description", "price", "quantity", "begin_at", "end_at", "category_id", "created_at", "updated_at", "kind", "slug", "image", "is_uniq", "one_time_purchase" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/products", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 1, "name": "Jakku", "description": "Utapau", "price": 100, "quantity": 20, "begin_at": null, "end_at": null, "category_id": 1, "created_at": "2017-11-22T13:41:20.457Z", "updated_at": "2017-11-22T13:41:20.498Z", "kind": "auto", "slug": "jakku", "image": { "url": "/uploads/product/image/1/logo.png", "thumb": { "url": "/uploads/product/image/1/thumb_logo.png" } }, "is_uniq": true, "one_time_purchase": false }, { "id": 2, "name": "Sullust", "description": "Lothal", "price": 100, "quantity": 20, "begin_at": null, "end_at": null, "category_id": 1, "created_at": "2017-11-22T13:41:20.528Z", "updated_at": "2017-11-22T13:41:20.561Z", "kind": "auto", "slug": "sullust", "image": { "url": "/uploads/product/image/2/logo.png", "thumb": { "url": "/uploads/product/image/2/thumb_logo.png" } }, "is_uniq": true, "one_time_purchase": false }, { "id": 3, "name": "Geonosis", "description": "Naboo", "price": 100, "quantity": 20, "begin_at": null, "end_at": null, "category_id": 1, "created_at": "2017-11-22T13:41:20.590Z", "updated_at": "2017-11-22T13:41:20.621Z", "kind": "auto", "slug": "geonosis", "image": { "url": "/uploads/product/image/3/logo.png", "thumb": { "url": "/uploads/product/image/3/thumb_logo.png" } }, "is_uniq": true, "one_time_purchase": false } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/products/show", "name": "show", "apis": [ { "api_url": "/v2/products/:id", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:campus_id/products/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "campus_id", "description": "\n

The campus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/products/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 1, "name": "Jakku", "description": "Utapau", "price": 100, "quantity": 20, "begin_at": null, "end_at": null, "category_id": 1, "created_at": "2017-11-22T13:41:20.457Z", "updated_at": "2017-11-22T13:41:20.498Z", "kind": "auto", "slug": "jakku", "image": { "url": "/uploads/product/image/1/logo.png", "thumb": { "url": "/uploads/product/image/1/thumb_logo.png" } }, "is_uniq": true, "one_time_purchase": false }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/products/create", "name": "create", "apis": [ { "api_url": "/v2/products", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:campus_id/products", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "campus_id", "full_name": "campus_id", "description": "\n

The campus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "product", "full_name": "product", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "product[name]", "description": "\n

The name. Must be unique.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "product[description]", "description": "\n

The description.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "price", "full_name": "product[price]", "description": "\n

The price.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "quantity", "full_name": "product[quantity]", "description": "\n

The quantity.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "product[begin_at]", "description": "\n

The begin at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "product[end_at]", "description": "\n

The end at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "category_id", "full_name": "product[category_id]", "description": "\n

The category id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "product[kind]", "description": "\n

The kind.

\n", "required": true, "allow_nil": false, "validator": "Must be one of: user, manager, auto.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "product[slug]", "description": "\n

The slug.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "image", "full_name": "product[image]", "description": "\n

The image.

\n", "required": true, "allow_nil": false, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "is_uniq", "full_name": "product[is_uniq]", "description": "\n

Is it is uniq ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "one_time_purchase", "full_name": "product[one_time_purchase]", "description": "\n

Is it one time purchase ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_products_attributes", "full_name": "product[campus_products_attributes]", "description": "\n

The campus products attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "campus_id", "full_name": "product[campus_products_attributes][campus_id]", "description": "\n

The campus id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "product[campus_products_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/products", "versions": [ "2.0" ], "query": null, "request_data": { "product": { "campus_products_attributes": [ { "campus_id": "5" } ], "name": "Chuck Norris's keyboard doesn't have a Ctrl key because nothing controls Chuck Norris.", "description": "Utapau", "price": "10", "quantity": "10", "begin_at": "2017-05-22 13:43:51 UTC", "end_at": "2023-11-22 13:43:51 UTC", "category_id": "3", "kind": "auto", "slug": "Kashyyyk", "image": { "tempfile": [], "original_filename": "logo.png", "content_type": "image/png+xml", "headers": "Content-Disposition: form-data; name=\"product[image]\"; filename=\"logo.png\"\r\nContent-Type: image/png+xml\r\nContent-Length: 3058\r\n" }, "is_uniq": "true", "one_time_purchase": "true" } }, "response_data": { "id": 6, "name": "Chuck Norris's keyboard doesn't have a Ctrl key because nothing controls Chuck Norris.", "description": "Utapau", "price": 10, "quantity": 10, "begin_at": "2017-05-22T13:43:51.000Z", "end_at": "2023-11-22T13:43:51.000Z", "category_id": 3, "created_at": "2017-11-22T13:43:52.063Z", "updated_at": "2017-11-22T13:43:52.097Z", "kind": "auto", "slug": "chuck-norris-s-keyboard-doesn-t-have-a-ctrl-key-because-nothing-controls-chuck-norris", "image": { "url": "/uploads/product/image/6/logo.png", "thumb": { "url": "/uploads/product/image/6/thumb_logo.png" } }, "is_uniq": true, "one_time_purchase": true }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "shop_manager", "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/products/update", "name": "update", "apis": [ { "api_url": "/v2/products/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/products/:id", "http_method": "PUT", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:campus_id/products/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:campus_id/products/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "campus_id", "description": "\n

The campus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "product", "full_name": "product", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "product[name]", "description": "\n

The name. Must be unique.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "product[description]", "description": "\n

The description.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "price", "full_name": "product[price]", "description": "\n

The price.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "quantity", "full_name": "product[quantity]", "description": "\n

The quantity.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "product[begin_at]", "description": "\n

The begin at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "product[end_at]", "description": "\n

The end at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "category_id", "full_name": "product[category_id]", "description": "\n

The category id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "product[kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: user, manager, auto.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "product[slug]", "description": "\n

The slug.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "image", "full_name": "product[image]", "description": "\n

The image.

\n", "required": false, "allow_nil": false, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "is_uniq", "full_name": "product[is_uniq]", "description": "\n

Is it is uniq ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "one_time_purchase", "full_name": "product[one_time_purchase]", "description": "\n

Is it one time purchase ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_products_attributes", "full_name": "product[campus_products_attributes]", "description": "\n

The campus products attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "campus_id", "full_name": "product[campus_products_attributes][campus_id]", "description": "\n

The campus id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "product[campus_products_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/products/1", "versions": [ "2.0" ], "query": null, "request_data": { "product": { "campus_products_attributes": [ { "campus_id": "3" } ], "name": "Chuck Norris programs do not accept input.", "description": "Kamino", "price": "10", "quantity": "10", "begin_at": "2017-05-22 13:43:52 UTC", "end_at": "2023-11-22 13:43:52 UTC", "category_id": "1", "kind": "auto", "slug": "DQar", "image": { "tempfile": [], "original_filename": "logo.png", "content_type": "image/png+xml", "headers": "Content-Disposition: form-data; name=\"product[image]\"; filename=\"logo.png\"\r\nContent-Type: image/png+xml\r\nContent-Length: 3058\r\n" }, "is_uniq": "true", "one_time_purchase": "true" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "shop_manager", "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/products/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/products/:id", "http_method": "DELETE", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:campus_id/products/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "campus_id", "description": "\n

The campus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "product", "full_name": "product", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "product[name]", "description": "\n

The name. Must be unique.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "product[description]", "description": "\n

The description.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "price", "full_name": "product[price]", "description": "\n

The price.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "quantity", "full_name": "product[quantity]", "description": "\n

The quantity.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "product[begin_at]", "description": "\n

The begin at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "product[end_at]", "description": "\n

The end at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "category_id", "full_name": "product[category_id]", "description": "\n

The category id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "product[kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: user, manager, auto.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "product[slug]", "description": "\n

The slug.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "image", "full_name": "product[image]", "description": "\n

The image.

\n", "required": false, "allow_nil": false, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "is_uniq", "full_name": "product[is_uniq]", "description": "\n

Is it is uniq ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "one_time_purchase", "full_name": "product[one_time_purchase]", "description": "\n

Is it one time purchase ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_products_attributes", "full_name": "product[campus_products_attributes]", "description": "\n

The campus products attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "campus_id", "full_name": "product[campus_products_attributes][campus_id]", "description": "\n

The campus id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "product[campus_products_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "DELETE", "path": "/v2/products/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "shop_manager", "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "project_data": { "doc_url": "/apidoc/2.0/project_data", "api_url": "/api", "name": "Project data", "short_description": "Project data for the graph", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/project_data/index", "name": "index", "apis": [ { "api_url": "/v2/project_data", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/project_sessions/:project_session_id/project_data", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_session_id", "full_name": "project_session_id", "description": "\n

The project_session id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, coordinates, created_at, updated_at, by, kind, project_session_id.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "coordinates", "created_at", "updated_at", "by", "kind", "project_session_id" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/project_data", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 6, "coordinates": [ 73.0, 53.0 ], "by": [], "kind": "project", "project_session_id": 3 }, { "id": 4, "coordinates": [ 63.0, 81.0 ], "by": [], "kind": "exam", "project_session_id": 2 }, { "id": 5, "coordinates": [ 80.0, 76.0 ], "by": [], "kind": "exam", "project_session_id": 2 } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/project_data/show", "name": "show", "apis": [ { "api_url": "/v2/project_data/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/project_data/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 1, "coordinates": [ 11.0, 14.0 ], "by": [], "kind": "rush", "project_session_id": 1 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/project_data/create", "name": "create", "apis": [ { "api_url": "/v2/project_data", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [], "examples": [ { "verb": "POST", "path": "/v2/project_data", "versions": [ "2.0" ], "query": null, "request_data": { "project_data": { "by": "[[7, 3000, 1900, 3000, 1725], [36, 3000, 1725, 3100, 1725]]", "coordinates": "[2350.0, 3450.0]", "kind": "project", "project_session_id": "5" } }, "response_data": { "id": 8, "coordinates": [ 2350.0, 3450.0 ], "by": [ [ 7, 3000, 1900, 3000, 1725 ], [ 36, 3000, 1725, 3100, 1725 ] ], "kind": "project", "project_session_id": 5 }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ], "required_scopes": [ "projects" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "project_sessions": { "doc_url": "/apidoc/2.0/project_sessions", "api_url": "/api", "name": "Project sessions", "short_description": "A project session defines a particular behaviour for a project, based on the cursus and / or the campus .", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/project_sessions/graph", "name": "graph", "apis": [ { "api_url": "/v2/projects/:project_id/project_sessions/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/project_sessions/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at, begin_at, end_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_id, campus_id, cursus_id, estimate_time, created_at, updated_at, begin_at, end_at, max_people, duration_days, terminating_after, solo, is_subscriptable, minimum_mark, team_behaviour, commit, difficulty, description, objectives.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "project_id", "campus_id", "cursus_id", "estimate_time", "created_at", "updated_at", "begin_at", "end_at", "max_people", "duration_days", "terminating_after", "solo", "is_subscriptable", "minimum_mark", "team_behaviour", "commit", "difficulty", "description", "objectives" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_id, campus_id, cursus_id, estimate_time, created_at, updated_at, begin_at, end_at, max_people, duration_days, terminating_after, solo, is_subscriptable, team_behaviour, future, end.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "project_id", "campus_id", "cursus_id", "estimate_time", "created_at", "updated_at", "begin_at", "end_at", "max_people", "duration_days", "terminating_after", "solo", "is_subscriptable", "team_behaviour", "future", "end" ], "additional": { "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only project sessions which begins in the future" }, "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end project sessions" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_id, campus_id, cursus_id, estimate_time, created_at, updated_at, begin_at, end_at, max_people, duration_days, terminating_after, solo, is_subscriptable, team_behaviour.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "project_id", "campus_id", "cursus_id", "estimate_time", "created_at", "updated_at", "begin_at", "end_at", "max_people", "duration_days", "terminating_after", "solo", "is_subscriptable", "team_behaviour" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/project_sessions/graph/on/created_at/by/day", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "2017-11-22": 5 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/project_sessions/index", "name": "index", "apis": [ { "api_url": "/v2/projects/:project_id/project_sessions", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/project_sessions", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_id", "full_name": "project_id", "description": "\n

The project id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_id, campus_id, cursus_id, estimate_time, created_at, updated_at, begin_at, end_at, max_people, duration_days, terminating_after, solo, is_subscriptable, minimum_mark, team_behaviour, commit, difficulty, description, objectives.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "project_id", "campus_id", "cursus_id", "estimate_time", "created_at", "updated_at", "begin_at", "end_at", "max_people", "duration_days", "terminating_after", "solo", "is_subscriptable", "minimum_mark", "team_behaviour", "commit", "difficulty", "description", "objectives" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_id, campus_id, cursus_id, estimate_time, created_at, updated_at, begin_at, end_at, max_people, duration_days, terminating_after, solo, is_subscriptable, team_behaviour, future, end.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "project_id", "campus_id", "cursus_id", "estimate_time", "created_at", "updated_at", "begin_at", "end_at", "max_people", "duration_days", "terminating_after", "solo", "is_subscriptable", "team_behaviour", "future", "end" ], "additional": { "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only project sessions which begins in the future" }, "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end project sessions" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_id, campus_id, cursus_id, estimate_time, created_at, updated_at, begin_at, end_at, max_people, duration_days, terminating_after, solo, is_subscriptable, team_behaviour.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "project_id", "campus_id", "cursus_id", "estimate_time", "created_at", "updated_at", "begin_at", "end_at", "max_people", "duration_days", "terminating_after", "solo", "is_subscriptable", "team_behaviour" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/project_sessions", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 5, "solo": false, "begin_at": null, "end_at": null, "estimate_time": null, "duration_days": null, "terminating_after": null, "project_id": 5, "campus_id": null, "cursus_id": null, "created_at": "2017-11-22T13:41:26.911Z", "updated_at": "2017-11-22T13:41:26.911Z", "max_people": null, "is_subscriptable": true, "scales": [], "uploads": [], "team_behaviour": "user", "project": { "id": 5, "name": "Quarter Finals", "slug": "hogwarts-quidditch-cup-quarter-finals", "description": null, "parent": { "name": "Hogwarts Quidditch Cup", "id": 4, "slug": "hogwarts-quidditch-cup", "url": "https://projects.intra.42.fr/hogwarts-quidditch-cup/mine" }, "children": [], "objectives": null, "tier": null, "attachments": [], "created_at": "2017-11-22T13:41:26.895Z", "updated_at": "2017-11-22T13:41:26.973Z", "exam": false }, "campus": null, "cursus": null, "evaluations": [ { "id": 5, "kind": "scale" } ] }, { "id": 4, "solo": false, "begin_at": null, "end_at": null, "estimate_time": null, "duration_days": null, "terminating_after": null, "project_id": 4, "campus_id": null, "cursus_id": null, "created_at": "2017-11-22T13:41:26.786Z", "updated_at": "2017-11-22T13:41:26.786Z", "max_people": null, "is_subscriptable": true, "scales": [], "uploads": [], "team_behaviour": "user", "project": { "id": 4, "name": "Hogwarts Quidditch Cup", "slug": "hogwarts-quidditch-cup", "description": "The game starts with the referee releasing all four balls from the central circle. The Bludgers and the Snitch, having been bewitched, fly off of their own accord, the Snitch to hide itself quickly and the Bludgers to attack the nearest players. The Quaffle is thrown into the air by the referee to signal the start of play.", "parent": null, "children": [ { "name": "Quarter Finals", "id": 5, "slug": "hogwarts-quidditch-cup-quarter-finals", "url": "https://projects.intra.42.fr/hogwarts-quidditch-cup-quarter-finals/mine" } ], "objectives": [ "Quidditch" ], "tier": 1, "attachments": [], "created_at": "2017-11-22T13:41:26.765Z", "updated_at": "2017-11-22T13:41:26.975Z", "exam": false }, "campus": null, "cursus": null, "evaluations": [] }, { "id": 3, "solo": true, "begin_at": null, "end_at": null, "estimate_time": 2592000, "duration_days": null, "terminating_after": null, "project_id": 3, "campus_id": null, "cursus_id": null, "created_at": "2017-11-22T13:41:26.545Z", "updated_at": "2017-11-22T13:41:26.545Z", "max_people": null, "is_subscriptable": true, "scales": [], "uploads": [], "team_behaviour": "user", "project": { "id": 3, "name": "Metaprogramming in OCaml", "slug": "metaprogramming-in-ocaml", "description": "Something you shouldn't see", "parent": null, "children": [], "objectives": [ "Run away" ], "tier": 1, "attachments": [], "created_at": "2017-11-22T13:41:26.537Z", "updated_at": "2017-11-22T13:41:26.616Z", "exam": true }, "campus": null, "cursus": null, "evaluations": [ { "id": 4, "kind": "scale" } ] } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/project_sessions/show", "name": "show", "apis": [ { "api_url": "/v2/project_sessions/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/project_sessions/2", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 2, "solo": true, "begin_at": null, "end_at": null, "estimate_time": 2592000, "duration_days": null, "terminating_after": null, "project_id": 2, "campus_id": null, "cursus_id": null, "created_at": "2017-11-22T13:41:26.375Z", "updated_at": "2017-11-22T13:41:28.347Z", "max_people": null, "is_subscriptable": true, "scales": [ { "id": 2, "correction_number": 3, "is_primary": true } ], "uploads": [], "team_behaviour": "user", "project": { "id": 2, "name": "Ordinary Wizarding Levels", "slug": "ordinary-wizarding-levels", "description": "Ordinary Wizarding Level (often abbreviated O.W.L.) is a subject-specific test taken during Hogwarts School of Witchcraft and Wizardry students' fifth year, administrated by the Wizarding Examinations Authority. The score made by a student on a particular O.W.L. determines whether or not he or she will be allowed to continue taking that subject in subsequent school years.", "parent": null, "children": [], "objectives": [ "Wizarding" ], "tier": 1, "attachments": [], "created_at": "2017-11-22T13:41:26.356Z", "updated_at": "2017-11-22T13:41:26.441Z", "exam": true }, "campus": null, "cursus": null, "evaluations": [ { "id": 3, "kind": "scale" } ] }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/project_sessions/create", "name": "create", "apis": [ { "api_url": "/v2/project_sessions", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_session", "full_name": "project_session", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project_session[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "project_session[campus_id]", "description": "\n

The campus id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "project_id", "full_name": "project_session[project_id]", "description": "\n

The project id. Must be unique in the scope of a given cursus id and campus.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "project_session[cursus_id]", "description": "\n

The cursus id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "estimate_time", "full_name": "project_session[estimate_time]", "description": "\n

The estimate time.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "project_session[created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "updated_at", "full_name": "project_session[updated_at]", "description": "\n

The updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "project_session[begin_at]", "description": "\n

The begin at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "project_session[end_at]", "description": "\n

The end at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "max_people", "full_name": "project_session[max_people]", "description": "\n

The max people.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "duration_days", "full_name": "project_session[duration_days]", "description": "\n

The duration days.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "terminating_after", "full_name": "project_session[terminating_after]", "description": "\n

The terminating after.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "solo", "full_name": "project_session[solo]", "description": "\n

Is it solo ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "is_subscriptable", "full_name": "project_session[is_subscriptable]", "description": "\n

Is it is subscriptable ? Default to true.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "minimum_mark", "full_name": "project_session[minimum_mark]", "description": "\n

The minimum mark.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "team_behaviour", "full_name": "project_session[team_behaviour]", "description": "\n

The team behaviour.

\n", "required": true, "allow_nil": false, "validator": "Must be one of: user, upload, by_rule, none.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "difficulty", "full_name": "project_session[difficulty]", "description": "\n

The difficulty.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "commit", "full_name": "project_session[commit]", "description": "\n

The commit.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "evaluations_attributes", "full_name": "project_session[evaluations_attributes]", "description": "\n

The evaluations attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project_session[evaluations_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "project_session[evaluations_attributes][kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: scale, upload.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project_session[evaluations_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] }, { "name": "project_sessions_skills_attributes", "full_name": "project_session[project_sessions_skills_attributes]", "description": "\n

The project sessions skills attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project_session[project_sessions_skills_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "project_session[project_sessions_skills_attributes][value]", "description": "\n

The value.

\n", "required": true, "allow_nil": false, "validator": "Must be Float", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "project_id", "full_name": "project_session[project_sessions_skills_attributes][project_id]", "description": "\n

The project id.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "skill_id", "full_name": "project_session[project_sessions_skills_attributes][skill_id]", "description": "\n

The skill id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project_session[project_sessions_skills_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] }, { "name": "evaluations_project_sessions_attributes", "full_name": "project_session[evaluations_project_sessions_attributes]", "description": "\n

The evaluations project sessions attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "evaluation_id", "full_name": "project_session[evaluations_project_sessions_attributes][evaluation_id]", "description": "\n

The evaluation id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "project_session_id", "full_name": "project_session[evaluations_project_sessions_attributes][project_session_id]", "description": "\n

The project session id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project_session[evaluations_project_sessions_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "project_session[evaluations_project_sessions_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] }, { "name": "project_sessions_rules_attributes", "full_name": "project_session[project_sessions_rules_attributes]", "description": "\n

The project sessions rules attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project_session[project_sessions_rules_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "rule_id", "full_name": "project_session[project_sessions_rules_attributes][rule_id]", "description": "\n

The rule id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "required", "full_name": "project_session[project_sessions_rules_attributes][required]", "description": "\n

Is it required ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project_session[project_sessions_rules_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "params_project_sessions_rules_attributes", "full_name": "project_session[project_sessions_rules_attributes][params_project_sessions_rules_attributes]", "description": "\n

The params project sessions rules attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project_session[project_sessions_rules_attributes][params_project_sessions_rules_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "param_id", "full_name": "project_session[project_sessions_rules_attributes][params_project_sessions_rules_attributes][param_id]", "description": "\n

The param id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "project_session[project_sessions_rules_attributes][params_project_sessions_rules_attributes][value]", "description": "\n

The value.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project_session[project_sessions_rules_attributes][params_project_sessions_rules_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/project_sessions", "versions": [ "2.0" ], "query": null, "request_data": { "project_session": { "campus_id": "4", "cursus_id": "1", "estimate_time": "2592000", "is_subscriptable": "true", "minimum_mark": "77", "project_id": "1", "solo": "true", "team_behaviour": "user" } }, "response_data": { "id": 6, "solo": true, "begin_at": null, "end_at": null, "estimate_time": 2592000, "duration_days": null, "terminating_after": null, "project_id": 1, "campus_id": 4, "cursus_id": 1, "created_at": "2017-11-22T13:43:53.741Z", "updated_at": "2017-11-22T13:43:53.741Z", "max_people": null, "is_subscriptable": true, "scales": [], "uploads": [], "team_behaviour": "user", "minimum_mark": 77, "project": { "id": 1, "name": "Libft", "slug": "libft", "description": "The first project of 42 !", "parent": null, "children": [], "objectives": [ "initiation" ], "tier": 1, "attachments": [ { "id": 1, "name": "New Jersey zombies", "pdf": { "pdf": { "url": null, "thumb": { "url": null } } }, "page_count": 1, "created_at": "2017-11-22T13:41:25.981Z", "pdf_processing": true, "slug": "new-jersey-zombies", "url": null, "thumb_url": null, "base_id": 1, "language": { "id": 3, "name": "Romanian", "identifier": "ro" }, "type": "Pdf" } ], "created_at": "2017-11-22T13:41:25.963Z", "updated_at": "2017-11-22T13:43:53.749Z", "exam": false }, "campus": { "id": 4, "name": "Kiev", "time_zone": "Europe/Kiev", "language": { "id": 2, "name": "English", "identifier": "en", "created_at": "2017-11-22T13:40:59.465Z", "updated_at": "2017-11-22T13:40:59.465Z" }, "users_count": 22, "vogsphere_id": null }, "cursus": { "id": 1, "created_at": "2017-11-22T13:41:00.750Z", "name": "Piscine C", "slug": "piscine-c" }, "evaluations": [], "project_sessions_rules": [] }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/project_sessions/update", "name": "update", "apis": [ { "api_url": "/v2/project_sessions/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/project_sessions/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_session", "full_name": "project_session", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project_session[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "project_session[campus_id]", "description": "\n

The campus id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "project_id", "full_name": "project_session[project_id]", "description": "\n

The project id. Must be unique in the scope of a given cursus id and campus.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "project_session[cursus_id]", "description": "\n

The cursus id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "estimate_time", "full_name": "project_session[estimate_time]", "description": "\n

The estimate time.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "project_session[created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "updated_at", "full_name": "project_session[updated_at]", "description": "\n

The updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "project_session[begin_at]", "description": "\n

The begin at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "project_session[end_at]", "description": "\n

The end at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "max_people", "full_name": "project_session[max_people]", "description": "\n

The max people.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "duration_days", "full_name": "project_session[duration_days]", "description": "\n

The duration days.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "terminating_after", "full_name": "project_session[terminating_after]", "description": "\n

The terminating after.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "solo", "full_name": "project_session[solo]", "description": "\n

Is it solo ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "is_subscriptable", "full_name": "project_session[is_subscriptable]", "description": "\n

Is it is subscriptable ? Default to true.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "minimum_mark", "full_name": "project_session[minimum_mark]", "description": "\n

The minimum mark.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "team_behaviour", "full_name": "project_session[team_behaviour]", "description": "\n

The team behaviour.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: user, upload, by_rule, none.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "difficulty", "full_name": "project_session[difficulty]", "description": "\n

The difficulty.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "commit", "full_name": "project_session[commit]", "description": "\n

The commit.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "evaluations_attributes", "full_name": "project_session[evaluations_attributes]", "description": "\n

The evaluations attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project_session[evaluations_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "project_session[evaluations_attributes][kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: scale, upload.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project_session[evaluations_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] }, { "name": "project_sessions_skills_attributes", "full_name": "project_session[project_sessions_skills_attributes]", "description": "\n

The project sessions skills attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project_session[project_sessions_skills_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "project_session[project_sessions_skills_attributes][value]", "description": "\n

The value.

\n", "required": false, "allow_nil": false, "validator": "Must be Float", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "project_id", "full_name": "project_session[project_sessions_skills_attributes][project_id]", "description": "\n

The project id.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "skill_id", "full_name": "project_session[project_sessions_skills_attributes][skill_id]", "description": "\n

The skill id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project_session[project_sessions_skills_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] }, { "name": "evaluations_project_sessions_attributes", "full_name": "project_session[evaluations_project_sessions_attributes]", "description": "\n

The evaluations project sessions attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "evaluation_id", "full_name": "project_session[evaluations_project_sessions_attributes][evaluation_id]", "description": "\n

The evaluation id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "project_session_id", "full_name": "project_session[evaluations_project_sessions_attributes][project_session_id]", "description": "\n

The project session id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project_session[evaluations_project_sessions_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "project_session[evaluations_project_sessions_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] }, { "name": "project_sessions_rules_attributes", "full_name": "project_session[project_sessions_rules_attributes]", "description": "\n

The project sessions rules attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project_session[project_sessions_rules_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "rule_id", "full_name": "project_session[project_sessions_rules_attributes][rule_id]", "description": "\n

The rule id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "required", "full_name": "project_session[project_sessions_rules_attributes][required]", "description": "\n

Is it required ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project_session[project_sessions_rules_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "params_project_sessions_rules_attributes", "full_name": "project_session[project_sessions_rules_attributes][params_project_sessions_rules_attributes]", "description": "\n

The params project sessions rules attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project_session[project_sessions_rules_attributes][params_project_sessions_rules_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "param_id", "full_name": "project_session[project_sessions_rules_attributes][params_project_sessions_rules_attributes][param_id]", "description": "\n

The param id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "project_session[project_sessions_rules_attributes][params_project_sessions_rules_attributes][value]", "description": "\n

The value.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project_session[project_sessions_rules_attributes][params_project_sessions_rules_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/project_sessions/2", "versions": [ "2.0" ], "query": null, "request_data": { "project_session": { "campus_id": "", "cursus_id": "", "estimate_time": "2592000", "is_subscriptable": "true", "minimum_mark": "77", "solo": "true", "team_behaviour": "user" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/project_sessions/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/project_sessions/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/project_sessions/2", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "project_sessions_rules": { "doc_url": "/apidoc/2.0/project_sessions_rules", "api_url": "/api", "name": "Project sessions rules", "short_description": "A rule linked to a project session.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/project_sessions_rules/index", "name": "index", "apis": [ { "api_url": "/v2/project_sessions/:project_session_id/project_sessions_rules", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/project_sessions_rules", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_session_id", "full_name": "project_session_id", "description": "\n

The project_session id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, rule_id, created_at, updated_at, required, position, project_session_id.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "rule_id", "created_at", "updated_at", "required", "position", "project_session_id" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, rule_id, created_at, updated_at, required, position, project_session_id.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "rule_id", "created_at", "updated_at", "required", "position", "project_session_id" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, rule_id, created_at, updated_at, required, position, project_session_id.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "rule_id", "created_at", "updated_at", "required", "position", "project_session_id" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/project_sessions_rules/show", "name": "show", "apis": [ { "api_url": "/v2/project_sessions_rules/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/project_sessions_rules/create", "name": "create", "apis": [ { "api_url": "/v2/project_sessions/:project_session_id/project_sessions_rules", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/project_sessions_rules", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_session_id", "full_name": "project_session_id", "description": "\n

The project_session id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_sessions_rule", "full_name": "project_sessions_rule", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project_sessions_rule[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "rule_id", "full_name": "project_sessions_rule[rule_id]", "description": "\n

The rule id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "required", "full_name": "project_sessions_rule[required]", "description": "\n

Is it required ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_session_id", "full_name": "project_sessions_rule[project_session_id]", "description": "\n

The project session id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "params_project_sessions_rules_attributes", "full_name": "project_sessions_rule[params_project_sessions_rules_attributes]", "description": "\n

The params project sessions rules attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project_sessions_rule[params_project_sessions_rules_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "param_id", "full_name": "project_sessions_rule[params_project_sessions_rules_attributes][param_id]", "description": "\n

The param id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "project_sessions_rule[params_project_sessions_rules_attributes][value]", "description": "\n

The value.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project_sessions_rule[params_project_sessions_rules_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/project_sessions_rules/update", "name": "update", "apis": [ { "api_url": "/v2/project_sessions_rules/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/project_sessions_rules/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_sessions_rule", "full_name": "project_sessions_rule", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project_sessions_rule[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "rule_id", "full_name": "project_sessions_rule[rule_id]", "description": "\n

The rule id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "required", "full_name": "project_sessions_rule[required]", "description": "\n

Is it required ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_session_id", "full_name": "project_sessions_rule[project_session_id]", "description": "\n

The project session id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "params_project_sessions_rules_attributes", "full_name": "project_sessions_rule[params_project_sessions_rules_attributes]", "description": "\n

The params project sessions rules attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project_sessions_rule[params_project_sessions_rules_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "param_id", "full_name": "project_sessions_rule[params_project_sessions_rules_attributes][param_id]", "description": "\n

The param id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "project_sessions_rule[params_project_sessions_rules_attributes][value]", "description": "\n

The value.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project_sessions_rule[params_project_sessions_rules_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/project_sessions_rules/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/project_sessions_rules/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "project_sessions_skills": { "doc_url": "/apidoc/2.0/project_sessions_skills", "api_url": "/api", "name": "Project sessions skills", "short_description": "A skill linked to a project session.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/project_sessions_skills/index", "name": "index", "apis": [ { "api_url": "/v2/project_sessions_skills", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/project_sessions/:project_session_id/project_sessions_skills", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/skills/:skill_id/project_sessions_skills", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_session_id", "full_name": "project_session_id", "description": "\n

The project_session id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "skill_id", "full_name": "skill_id", "description": "\n

The skill id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_session_id, skill_id, value, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "project_session_id", "skill_id", "value", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_session_id, skill_id, value, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "project_session_id", "skill_id", "value", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_session_id, skill_id, value, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "project_session_id", "skill_id", "value", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/project_sessions_skills", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 1, "project_session_id": 1979, "skill_id": 2, "value": 15, "created_at": "2019-07-03T12:21:11.956Z", "updated_at": "2019-07-03T12:21:11.956Z" } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/project_sessions_skills/show", "name": "show", "apis": [ { "api_url": "/v2/project_sessions_skills/:id", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/project_sessions/:project_session_id/project_sessions_skills/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_session_id", "full_name": "project_session_id", "description": "\n

The project_session id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/project_sessions_skills/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 1, "project_session_id": 1979, "skill_id": 2, "value": 15, "created_at": "2019-07-03T12:21:11.956Z", "updated_at": "2019-07-03T12:21:11.956Z" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true } ], "headers": [] }, "projects": { "doc_url": "/apidoc/2.0/projects", "api_url": "/api", "name": "Projects", "short_description": "Pedagogic projects of a cursus", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/projects/index", "name": "index", "apis": [ { "api_url": "/v2/cursus/:cursus_id/projects", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects/:project_id/projects", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/me/projects", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "cursus_id", "full_name": "cursus_id", "description": "\n

The cursus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_id", "full_name": "project_id", "description": "\n

The project id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by position asc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, visible, exam, parent_id, slug, inherited_team, position, has_git, has_mark, repository, git_id, cached_repository_path.", "expected_type": "string", "metadata": { "sort": { "default": { "position": "asc", "id": "desc" }, "keys": [ "id", "name", "created_at", "updated_at", "visible", "exam", "parent_id", "slug", "inherited_team", "position", "has_git", "has_mark", "repository", "git_id", "cached_repository_path" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, visible, exam, parent_id, slug, inherited_team, position, has_git, has_mark, description, tier.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "created_at", "updated_at", "visible", "exam", "parent_id", "slug", "inherited_team", "position", "has_git", "has_mark", "description", "tier" ], "additional": { "tier": { "proc": {}, "all": [ 0, 1, 2, 3, 4, 5, 6, 7 ], "description": "Filter on a project's tier" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, parent_id, slug, position, description.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "created_at", "updated_at", "parent_id", "slug", "position", "description" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/cursus/1/projects", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 1, "name": "Libft", "slug": "libft", "description": "The first project of 42 !", "parent": null, "children": [], "objectives": [ "initiation" ], "tier": 1, "attachments": [], "created_at": "2017-11-22T13:41:25.963Z", "updated_at": "2017-11-22T13:41:26.243Z", "exam": false, "cursus": [ { "id": 1, "created_at": "2017-11-22T13:41:00.750Z", "name": "Piscine C", "slug": "piscine-c" } ], "campus": [ { "id": 1, "name": "Cluj", "time_zone": "Europe/Bucharest", "language": { "id": 3, "name": "Romanian", "identifier": "ro", "created_at": "2017-11-22T13:40:59.468Z", "updated_at": "2017-11-22T13:41:26.139Z" }, "users_count": 28, "vogsphere_id": 1 } ], "skills": [ { "id": 2, "name": "Company experience", "created_at": "2017-11-22T13:41:00.305Z" }, { "id": 1, "name": "Parallel computing", "created_at": "2017-11-22T13:41:00.257Z" } ], "videos": [], "tags": [ { "id": 12, "name": "Libft", "kind": "general" } ], "project_sessions": [ { "id": 1, "solo": true, "begin_at": null, "end_at": null, "estimate_time": 2592000, "duration_days": null, "terminating_after": null, "project_id": 1, "campus_id": null, "cursus_id": null, "created_at": "2017-11-22T13:41:26.149Z", "updated_at": "2017-11-22T13:42:09.376Z", "max_people": null, "is_subscriptable": true, "scales": [ { "id": 1, "correction_number": 3, "is_primary": true } ], "uploads": [ { "id": 1, "name": "Idaho kangaroos" } ], "team_behaviour": "user" } ] }, { "id": 2, "name": "Ordinary Wizarding Levels", "slug": "ordinary-wizarding-levels", "description": "Ordinary Wizarding Level (often abbreviated O.W.L.) is a subject-specific test taken during Hogwarts School of Witchcraft and Wizardry students' fifth year, administrated by the Wizarding Examinations Authority. The score made by a student on a particular O.W.L. determines whether or not he or she will be allowed to continue taking that subject in subsequent school years.", "parent": null, "children": [], "objectives": [ "Wizarding" ], "tier": 1, "attachments": [], "created_at": "2017-11-22T13:41:26.356Z", "updated_at": "2017-11-22T13:41:26.441Z", "exam": true, "cursus": [ { "id": 1, "created_at": "2017-11-22T13:41:00.750Z", "name": "Piscine C", "slug": "piscine-c" } ], "campus": [ { "id": 1, "name": "Cluj", "time_zone": "Europe/Bucharest", "language": { "id": 3, "name": "Romanian", "identifier": "ro", "created_at": "2017-11-22T13:40:59.468Z", "updated_at": "2017-11-22T13:41:26.139Z" }, "users_count": 28, "vogsphere_id": 1 } ], "skills": [ { "id": 1, "name": "Parallel computing", "created_at": "2017-11-22T13:41:00.257Z" }, { "id": 6, "name": "Basics", "created_at": "2017-11-22T13:41:00.448Z" } ], "videos": [], "tags": [ { "id": 13, "name": "Ordinary Wizarding Levels", "kind": "general" } ], "project_sessions": [ { "id": 2, "solo": true, "begin_at": null, "end_at": null, "estimate_time": 2592000, "duration_days": null, "terminating_after": null, "project_id": 2, "campus_id": null, "cursus_id": null, "created_at": "2017-11-22T13:41:26.375Z", "updated_at": "2017-11-22T13:41:28.347Z", "max_people": null, "is_subscriptable": true, "scales": [ { "id": 2, "correction_number": 3, "is_primary": true } ], "uploads": [], "team_behaviour": "user" } ] }, { "id": 4, "name": "Hogwarts Quidditch Cup", "slug": "hogwarts-quidditch-cup", "description": "The game starts with the referee releasing all four balls from the central circle. The Bludgers and the Snitch, having been bewitched, fly off of their own accord, the Snitch to hide itself quickly and the Bludgers to attack the nearest players. The Quaffle is thrown into the air by the referee to signal the start of play.", "parent": null, "children": [ { "name": "Quarter Finals", "id": 5, "slug": "hogwarts-quidditch-cup-quarter-finals", "url": "https://projects.intra.42.fr/hogwarts-quidditch-cup-quarter-finals/mine" } ], "objectives": [ "Quidditch" ], "tier": 1, "attachments": [], "created_at": "2017-11-22T13:41:26.765Z", "updated_at": "2017-11-22T13:41:26.975Z", "exam": false, "cursus": [ { "id": 1, "created_at": "2017-11-22T13:41:00.750Z", "name": "Piscine C", "slug": "piscine-c" } ], "campus": [ { "id": 1, "name": "Cluj", "time_zone": "Europe/Bucharest", "language": { "id": 3, "name": "Romanian", "identifier": "ro", "created_at": "2017-11-22T13:40:59.468Z", "updated_at": "2017-11-22T13:41:26.139Z" }, "users_count": 28, "vogsphere_id": 1 } ], "skills": [ { "id": 6, "name": "Basics", "created_at": "2017-11-22T13:41:00.448Z" }, { "id": 1, "name": "Parallel computing", "created_at": "2017-11-22T13:41:00.257Z" } ], "videos": [], "tags": [ { "id": 15, "name": "Hogwarts Quidditch Cup", "kind": "general" } ], "project_sessions": [ { "id": 4, "solo": false, "begin_at": null, "end_at": null, "estimate_time": null, "duration_days": null, "terminating_after": null, "project_id": 4, "campus_id": null, "cursus_id": null, "created_at": "2017-11-22T13:41:26.786Z", "updated_at": "2017-11-22T13:41:26.786Z", "max_people": null, "is_subscriptable": true, "scales": [], "uploads": [], "team_behaviour": "user" } ] } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/projects/show", "name": "show", "apis": [ { "api_url": "/v2/projects/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/projects/2", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 2, "name": "Ordinary Wizarding Levels", "slug": "ordinary-wizarding-levels", "description": "Ordinary Wizarding Level (often abbreviated O.W.L.) is a subject-specific test taken during Hogwarts School of Witchcraft and Wizardry students' fifth year, administrated by the Wizarding Examinations Authority. The score made by a student on a particular O.W.L. determines whether or not he or she will be allowed to continue taking that subject in subsequent school years.", "parent": null, "children": [], "objectives": [ "Wizarding" ], "tier": 1, "attachments": [], "created_at": "2017-11-22T13:41:26.356Z", "updated_at": "2017-11-22T13:41:26.441Z", "exam": true, "cursus": [ { "id": 1, "created_at": "2017-11-22T13:41:00.750Z", "name": "Piscine C", "slug": "piscine-c" } ], "campus": [ { "id": 1, "name": "Cluj", "time_zone": "Europe/Bucharest", "language": { "id": 3, "name": "Romanian", "identifier": "ro", "created_at": "2017-11-22T13:40:59.468Z", "updated_at": "2017-11-22T13:41:26.139Z" }, "users_count": 28, "vogsphere_id": 1 } ], "skills": [ { "id": 6, "name": "Basics", "created_at": "2017-11-22T13:41:00.448Z" }, { "id": 1, "name": "Parallel computing", "created_at": "2017-11-22T13:41:00.257Z" } ], "videos": [], "tags": [ { "id": 13, "name": "Ordinary Wizarding Levels", "kind": "general" } ], "project_sessions": [ { "id": 2, "solo": true, "begin_at": null, "end_at": null, "estimate_time": 2592000, "duration_days": null, "terminating_after": null, "project_id": 2, "campus_id": null, "cursus_id": null, "created_at": "2017-11-22T13:41:26.375Z", "updated_at": "2017-11-22T13:41:28.347Z", "max_people": null, "is_subscriptable": true, "scales": [ { "id": 2, "correction_number": 3, "is_primary": true } ], "uploads": [], "team_behaviour": "user" } ] }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/projects/create", "name": "create", "apis": [ { "api_url": "/v2/projects", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project", "full_name": "project", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "project[name]", "description": "\n

The name.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "terminating_after", "full_name": "project[terminating_after]", "description": "\n

The terminating after.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "exam", "full_name": "project[exam]", "description": "\n

Is it exam ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "has_mark", "full_name": "project[has_mark]", "description": "\n

Is it has mark ? Default to true.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "repository", "full_name": "project[repository]", "description": "\n

The repository.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "git_id", "full_name": "project[git_id]", "description": "\n

The git id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "has_git", "full_name": "project[has_git]", "description": "\n

Is it has git ? Default to true.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "is_subscriptable", "full_name": "project[is_subscriptable]", "description": "\n

The is subscriptable.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "inherited_team", "full_name": "project[inherited_team]", "description": "\n

Is it inherited team ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "minimum_mark", "full_name": "project[minimum_mark]", "description": "\n

The minimum mark.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "parent_id", "full_name": "project[parent_id]", "description": "\n

The parent id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "max_people", "full_name": "project[max_people]", "description": "\n

The max people.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "visible", "full_name": "project[visible]", "description": "\n

Is it visible ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_ids", "full_name": "project[cursus_ids]", "description": "\n

The cursus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "campus_ids", "full_name": "project[campus_ids]", "description": "\n

The campus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "authors_user_ids", "full_name": "project[authors_user_ids]", "description": "\n

The authors user ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "notion_ids", "full_name": "project[notion_ids]", "description": "\n

The notion ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "project_sessions_attributes", "full_name": "project[project_sessions_attributes]", "description": "\n

The project sessions attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project[project_sessions_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "project[project_sessions_attributes][campus_id]", "description": "\n

The campus id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "project[project_sessions_attributes][cursus_id]", "description": "\n

The cursus id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "estimate_time", "full_name": "project[project_sessions_attributes][estimate_time]", "description": "\n

The estimate time.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "project[project_sessions_attributes][created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "updated_at", "full_name": "project[project_sessions_attributes][updated_at]", "description": "\n

The updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "project[project_sessions_attributes][begin_at]", "description": "\n

The begin at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "project[project_sessions_attributes][end_at]", "description": "\n

The end at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "max_people", "full_name": "project[project_sessions_attributes][max_people]", "description": "\n

The max people.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "duration_days", "full_name": "project[project_sessions_attributes][duration_days]", "description": "\n

The duration days.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "terminating_after", "full_name": "project[project_sessions_attributes][terminating_after]", "description": "\n

The terminating after.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "solo", "full_name": "project[project_sessions_attributes][solo]", "description": "\n

Is it solo ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "is_subscriptable", "full_name": "project[project_sessions_attributes][is_subscriptable]", "description": "\n

Is it is subscriptable ? Default to true.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "minimum_mark", "full_name": "project[project_sessions_attributes][minimum_mark]", "description": "\n

The minimum mark.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "team_behaviour", "full_name": "project[project_sessions_attributes][team_behaviour]", "description": "\n

The team behaviour.

\n", "required": true, "allow_nil": false, "validator": "Must be one of: user, upload, by_rule, none.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project[project_sessions_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] }, { "name": "evaluations_attributes", "full_name": "project[evaluations_attributes]", "description": "\n

The evaluations attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project[evaluations_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "project[evaluations_attributes][kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: scale, upload.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project[evaluations_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] }, { "name": "attachments_attributes", "full_name": "project[attachments_attributes]", "description": "\n

The attachments attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project[attachments_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "language_id", "full_name": "project[attachments_attributes][language_id]", "description": "\n

The language id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "project[attachments_attributes][kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: code, pdf, link, document, video.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project[attachments_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "untranslatable", "full_name": "project[attachments_attributes][untranslatable]", "description": "\n

Is it untranslatable ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "attachable_attributes", "full_name": "project[attachments_attributes][attachable_attributes]", "description": "\n

The attachable attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [] } ] }, { "name": "projects_rules_attributes", "full_name": "project[projects_rules_attributes]", "description": "\n

The projects rules attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/projects", "versions": [ "2.0" ], "query": null, "request_data": { "project": { "campus_ids": [ "6", "4", "2" ], "cursus_ids": [ "2" ], "description": "Cleanse williamsburg brooklyn shabby chic pinterest kickstarter diy.", "difficulty": "0", "has_git": "true", "has_mark": "true", "is_subscriptable": "true", "name": "Butter In a Lordly Dish", "project_sessions_attributes": [ { "campus_id": "", "cursus_id": "", "estimate_time": "2592000", "is_subscriptable": "true", "minimum_mark": "77", "solo": "true", "team_behaviour": "user" }, { "campus_id": "", "cursus_id": "2", "estimate_time": "2592000", "is_subscriptable": "true", "minimum_mark": "77", "solo": "true", "team_behaviour": "user" } ], "visible": "true" } }, "response_data": { "id": 6, "name": "Butter In a Lordly Dish", "slug": "butter-in-a-lordly-dish", "description": "Cleanse williamsburg brooklyn shabby chic pinterest kickstarter diy.", "parent": null, "children": [], "objectives": null, "tier": 0, "attachments": [], "created_at": "2017-11-22T13:43:54.544Z", "updated_at": "2017-11-22T13:43:54.647Z", "exam": false, "cursus": [ { "id": 2, "created_at": "2017-11-22T13:41:00.825Z", "name": "42", "slug": "42" } ], "campus": [ { "id": 6, "name": "Paris", "time_zone": "Europe/Paris", "language": { "id": 1, "name": "Fran\u00e7ais", "identifier": "fr", "created_at": "2017-11-22T13:40:59.462Z", "updated_at": "2017-11-22T13:40:59.462Z" }, "users_count": 19, "vogsphere_id": 1 }, { "id": 4, "name": "Kiev", "time_zone": "Europe/Kiev", "language": { "id": 2, "name": "English", "identifier": "en", "created_at": "2017-11-22T13:40:59.465Z", "updated_at": "2017-11-22T13:40:59.465Z" }, "users_count": 22, "vogsphere_id": null }, { "id": 2, "name": "Johannesburg", "time_zone": "Africa/Johannesburg", "language": { "id": 2, "name": "English", "identifier": "en", "created_at": "2017-11-22T13:40:59.465Z", "updated_at": "2017-11-22T13:40:59.465Z" }, "users_count": 26, "vogsphere_id": 1 } ], "skills": [], "videos": [], "tags": [], "project_sessions": [ { "id": 7, "solo": true, "begin_at": null, "end_at": null, "estimate_time": 2592000, "duration_days": null, "terminating_after": null, "project_id": 6, "campus_id": null, "cursus_id": null, "created_at": "2017-11-22T13:43:54.566Z", "updated_at": "2017-11-22T13:43:54.566Z", "max_people": null, "is_subscriptable": true, "scales": [], "uploads": [], "team_behaviour": "user", "minimum_mark": 77 }, { "id": 8, "solo": true, "begin_at": null, "end_at": null, "estimate_time": 2592000, "duration_days": null, "terminating_after": null, "project_id": 6, "campus_id": null, "cursus_id": 2, "created_at": "2017-11-22T13:43:54.574Z", "updated_at": "2017-11-22T13:43:54.574Z", "max_people": null, "is_subscriptable": true, "scales": [], "uploads": [], "team_behaviour": "user", "minimum_mark": 77 } ] }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/projects/update", "name": "update", "apis": [ { "api_url": "/v2/projects/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project", "full_name": "project", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "project[name]", "description": "\n

The name.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "terminating_after", "full_name": "project[terminating_after]", "description": "\n

The terminating after.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "exam", "full_name": "project[exam]", "description": "\n

Is it exam ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "has_mark", "full_name": "project[has_mark]", "description": "\n

Is it has mark ? Default to true.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "repository", "full_name": "project[repository]", "description": "\n

The repository.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "git_id", "full_name": "project[git_id]", "description": "\n

The git id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "has_git", "full_name": "project[has_git]", "description": "\n

Is it has git ? Default to true.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "is_subscriptable", "full_name": "project[is_subscriptable]", "description": "\n

The is subscriptable.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "inherited_team", "full_name": "project[inherited_team]", "description": "\n

Is it inherited team ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "minimum_mark", "full_name": "project[minimum_mark]", "description": "\n

The minimum mark.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "parent_id", "full_name": "project[parent_id]", "description": "\n

The parent id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "max_people", "full_name": "project[max_people]", "description": "\n

The max people.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "visible", "full_name": "project[visible]", "description": "\n

Is it visible ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_ids", "full_name": "project[cursus_ids]", "description": "\n

The cursus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "campus_ids", "full_name": "project[campus_ids]", "description": "\n

The campus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "authors_user_ids", "full_name": "project[authors_user_ids]", "description": "\n

The authors user ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "notion_ids", "full_name": "project[notion_ids]", "description": "\n

The notion ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "project_sessions_attributes", "full_name": "project[project_sessions_attributes]", "description": "\n

The project sessions attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project[project_sessions_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "project[project_sessions_attributes][campus_id]", "description": "\n

The campus id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "project[project_sessions_attributes][cursus_id]", "description": "\n

The cursus id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "estimate_time", "full_name": "project[project_sessions_attributes][estimate_time]", "description": "\n

The estimate time.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "project[project_sessions_attributes][created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "updated_at", "full_name": "project[project_sessions_attributes][updated_at]", "description": "\n

The updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "project[project_sessions_attributes][begin_at]", "description": "\n

The begin at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "project[project_sessions_attributes][end_at]", "description": "\n

The end at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "max_people", "full_name": "project[project_sessions_attributes][max_people]", "description": "\n

The max people.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "duration_days", "full_name": "project[project_sessions_attributes][duration_days]", "description": "\n

The duration days.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "terminating_after", "full_name": "project[project_sessions_attributes][terminating_after]", "description": "\n

The terminating after.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "solo", "full_name": "project[project_sessions_attributes][solo]", "description": "\n

Is it solo ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "is_subscriptable", "full_name": "project[project_sessions_attributes][is_subscriptable]", "description": "\n

Is it is subscriptable ? Default to true.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "minimum_mark", "full_name": "project[project_sessions_attributes][minimum_mark]", "description": "\n

The minimum mark.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "team_behaviour", "full_name": "project[project_sessions_attributes][team_behaviour]", "description": "\n

The team behaviour.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: user, upload, by_rule, none.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project[project_sessions_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] }, { "name": "evaluations_attributes", "full_name": "project[evaluations_attributes]", "description": "\n

The evaluations attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project[evaluations_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "project[evaluations_attributes][kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: scale, upload.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project[evaluations_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] }, { "name": "attachments_attributes", "full_name": "project[attachments_attributes]", "description": "\n

The attachments attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "project[attachments_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "language_id", "full_name": "project[attachments_attributes][language_id]", "description": "\n

The language id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "project[attachments_attributes][kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: code, pdf, link, document, video.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "project[attachments_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "untranslatable", "full_name": "project[attachments_attributes][untranslatable]", "description": "\n

Is it untranslatable ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "attachable_attributes", "full_name": "project[attachments_attributes][attachable_attributes]", "description": "\n

The attachable attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [] } ] }, { "name": "projects_rules_attributes", "full_name": "project[projects_rules_attributes]", "description": "\n

The projects rules attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/projects/2", "versions": [ "2.0" ], "query": null, "request_data": { "project": { "description": "Cliche kinfolk kickstarter chia.", "difficulty": "0", "has_git": "true", "has_mark": "true", "is_subscriptable": "true", "name": "Butter In a Lordly Dish", "visible": "true" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/projects/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/projects/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/projects/2", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/projects/retry", "name": "retry", "apis": [ { "api_url": "/v2/projects/:id/retry", "http_method": "PATCH", "short_description": "Retry the project user for the current resource owner", "deprecated": null }, { "api_url": "/v2/projects/:id/retry", "http_method": "PUT", "short_description": "Retry the project user for the current resource owner", "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [], "examples": [], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "advanced_tutor", "advanced_staff" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "projects_users": { "doc_url": "/apidoc/2.0/projects_users", "api_url": "/api", "name": "Projects users", "short_description": "Users which did or are doing a project", "full_description": "\n

The ProjectsUser represents a user\u2019s subscription to a project. A subscribed user can have one team or more based on his number of attempts to this project. Be careful to always select the active team (the last team).

\n\n

Here are basically the different states a user can have on a project:

\n\n\n\n

If the user has a locked team, then either he did, or he is doing the project. At this point, the available states are:

\n\n\n\n

Some exceptional cases happen when a project has children (like piscines), or begins at a specific time (like rushes).

\n\n\n", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/projects_users/graph", "name": "graph", "apis": [ { "api_url": "/v2/projects/:project_id/projects_users/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/projects_users/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects_users/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at, retriable_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_id, user_id, created_at, updated_at, occurrence, final_mark, retriable_at, marked_at, cursus, campus, retriable, marked.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "project_id", "user_id", "created_at", "updated_at", "occurrence", "final_mark", "retriable_at", "marked_at", "cursus", "campus", "retriable", "marked" ], "additional": { "cursus": { "proc": {}, "all": [ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 ], "description": "Only return projects users with users in the given cursus" }, "campus": { "proc": {}, "all": [ 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47 ], "description": "Only return projects users with users in the given campus" }, "retriable": { "proc": {}, "all": [ "true", "false" ], "description": "Return only retriable projects users" }, "marked": { "proc": {}, "all": [ "true", "false" ], "description": "Return only marked projects users" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_id, user_id, created_at, updated_at, occurrence, final_mark, retriable_at, marked_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "project_id", "user_id", "created_at", "updated_at", "occurrence", "final_mark", "retriable_at", "marked_at" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/projects_users/graph/on/created_at/by/day", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "2017-11-22": 68 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/projects_users/index", "name": "index", "apis": [ { "api_url": "/v2/projects/:project_id/projects_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/projects_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_id", "full_name": "project_id", "description": "\n

The project id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_id, user_id, created_at, updated_at, occurrence, final_mark, retriable_at, marked_at, cursus, campus, retriable, marked.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "project_id", "user_id", "created_at", "updated_at", "occurrence", "final_mark", "retriable_at", "marked_at", "cursus", "campus", "retriable", "marked" ], "additional": { "cursus": { "proc": {}, "all": [ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 ], "description": "Only return projects users with users in the given cursus" }, "campus": { "proc": {}, "all": [ 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47 ], "description": "Only return projects users with users in the given campus" }, "retriable": { "proc": {}, "all": [ "true", "false" ], "description": "Return only retriable projects users" }, "marked": { "proc": {}, "all": [ "true", "false" ], "description": "Return only marked projects users" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_id, user_id, created_at, updated_at, occurrence, final_mark, retriable_at, marked_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "project_id", "user_id", "created_at", "updated_at", "occurrence", "final_mark", "retriable_at", "marked_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/projects_users", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 1, "occurrence": 0, "final_mark": null, "status": "in_progress", "validated?": null, "current_team_id": 1, "project": { "id": 2, "name": "Ordinary Wizarding Levels", "slug": "ordinary-wizarding-levels", "parent_id": null }, "cursus_ids": [ 1 ], "user": { "id": 111, "login": "jabinks2", "url": "https://api.intra.42.fr/v2/users/jabinks2" }, "teams": [ { "id": 1, "name": "jabinks2's group", "url": "https://api.intra.42.fr/v2/teams/1", "final_mark": null, "project_id": 2, "created_at": "2017-11-22T13:41:28.447Z", "updated_at": "2017-11-22T13:41:28.519Z", "status": "in_progress", "terminating_at": null, "users": [ { "id": 111, "login": "coundook", "url": "https://api.intra.42.fr/v2/users/coundook", "leader": true, "occurrence": 0, "validated": true, "projects_user_id": 1 } ], "locked?": true, "validated?": null, "closed?": false, "repo_url": null, "repo_uuid": "intra-uuid-e8f23ddc-8e52-47a8-87e9-9bd490621cfd-1", "locked_at": "2017-11-22T13:41:28.487Z", "closed_at": null, "project_session_id": 2 } ] }, { "id": 2, "occurrence": 0, "final_mark": null, "status": "in_progress", "validated?": null, "current_team_id": 2, "project": { "id": 4, "name": "Hogwarts Quidditch Cup", "slug": "hogwarts-quidditch-cup", "parent_id": null }, "cursus_ids": [ 1 ], "user": { "id": 108, "login": "podamer2", "url": "https://api.intra.42.fr/v2/users/podamer2" }, "teams": [ { "id": 2, "name": "podamer2's group", "url": "https://api.intra.42.fr/v2/teams/2", "final_mark": null, "project_id": 4, "created_at": "2017-11-22T13:41:28.554Z", "updated_at": "2017-11-22T13:41:28.608Z", "status": "in_progress", "terminating_at": null, "users": [ { "id": 108, "login": "podamer2", "url": "https://api.intra.42.fr/v2/users/podamer2", "leader": true, "occurrence": 0, "validated": true, "projects_user_id": 2 } ], "locked?": false, "validated?": null, "closed?": true, "repo_url": null, "repo_uuid": "intra-uuid-ae9bdbbc-9c16-4c27-8f18-eccee5a31020-2", "locked_at": null, "closed_at": "2017-11-22T13:41:28.578Z", "project_session_id": 4 } ] }, { "id": 3, "occurrence": 0, "final_mark": null, "status": "creating_group", "validated?": null, "current_team_id": 3, "project": { "id": 5, "name": "Quarter Finals", "slug": "hogwarts-quidditch-cup-quarter-finals", "parent_id": 4 }, "cursus_ids": [ 1 ], "user": { "id": 108, "login": "podamer2", "url": "https://api.intra.42.fr/v2/users/podamer2" }, "teams": [ { "id": 3, "name": "podamer2's group", "url": "https://api.intra.42.fr/v2/teams/3", "final_mark": null, "project_id": 5, "created_at": "2017-11-22T13:41:28.661Z", "updated_at": "2017-11-22T13:41:28.704Z", "status": "creating_group", "terminating_at": null, "users": [ { "id": 108, "login": "podamer2", "url": "https://api.intra.42.fr/v2/users/podamer2", "leader": true, "occurrence": 0, "validated": true, "projects_user_id": 3 } ], "locked?": false, "validated?": null, "closed?": false, "repo_url": null, "repo_uuid": "intra-uuid-d6aded82-d02e-4597-a33a-acd2544ec015-3", "locked_at": null, "closed_at": null, "project_session_id": 5 } ] } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/projects_users/show", "name": "show", "apis": [ { "api_url": "/v2/projects_users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/projects_users/18", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 18, "occurrence": 0, "final_mark": null, "status": "waiting_for_correction", "validated?": null, "current_team_id": 18, "project": { "id": 1, "name": "Libft", "slug": "libft", "parent_id": null }, "cursus_ids": [ 1 ], "user": { "id": 25, "login": "bhutt", "url": "https://api.intra.42.fr/v2/users/bhutt" }, "teams": [ { "id": 18, "name": "bhutt's group", "url": "https://api.intra.42.fr/v2/teams/18", "final_mark": null, "project_id": 1, "created_at": "2017-11-22T13:41:30.835Z", "updated_at": "2017-11-22T13:41:30.920Z", "status": "waiting_for_correction", "terminating_at": null, "users": [ { "id": 25, "login": "bhutt", "url": "https://api.intra.42.fr/v2/users/bhutt", "leader": true, "occurrence": 0, "validated": true, "projects_user_id": 18 } ], "locked?": true, "validated?": null, "closed?": true, "repo_url": null, "repo_uuid": "intra-uuid-0d4153cd-21b7-4f1a-a526-297314ddc61d-18", "locked_at": "2017-11-22T13:41:30.895Z", "closed_at": "2017-11-22T13:41:30.919Z", "project_session_id": 1 } ] }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/projects_users/create", "name": "create", "apis": [ { "api_url": "/v2/projects/:project_id/projects_users", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/projects_users", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects_users", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects/:project_id/register", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_id", "full_name": "project_id", "description": "\n

The project id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "projects_user", "full_name": "projects_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "projects_user[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "project_id", "full_name": "projects_user[project_id]", "description": "\n

The project id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "projects_user[user_id]", "description": "\n

The user id. Must be unique in the scope of a given project.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "projects_user[created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "updated_at", "full_name": "projects_user[updated_at]", "description": "\n

The updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "occurrence", "full_name": "projects_user[occurrence]", "description": "\n

The occurrence. Default to 0.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "final_mark", "full_name": "projects_user[final_mark]", "description": "\n

The final mark.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "retriable_at", "full_name": "projects_user[retriable_at]", "description": "\n

The retriable at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "marked_at", "full_name": "projects_user[marked_at]", "description": "\n

The marked at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "skip_check_permission", "full_name": "projects_user[skip_check_permission]", "description": "\n

The skip check permission.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/projects_users", "versions": [ "2.0" ], "query": null, "request_data": { "projects_user": { "project_id": "1", "user_id": "1" } }, "response_data": { "id": 69, "occurrence": 0, "final_mark": null, "status": "in_progress", "validated?": null, "current_team_id": 69, "project": { "id": 1, "name": "Libft", "slug": "libft", "parent_id": null }, "cursus_ids": [ 1 ], "user": { "id": 1, "login": "jeanne", "url": "https://api.intra.42.fr/v2/users/jeanne" }, "teams": [ { "id": 69, "name": "jeanne's group", "url": "https://api.intra.42.fr/v2/teams/69", "final_mark": null, "project_id": 1, "created_at": "2017-11-22T13:43:56.555Z", "updated_at": "2017-11-22T13:43:56.625Z", "status": "in_progress", "terminating_at": null, "users": [ { "id": 1, "login": "jeanne", "url": "https://api.intra.42.fr/v2/users/jeanne", "leader": true, "occurrence": 0, "validated": true, "projects_user_id": 69 } ], "locked?": true, "validated?": null, "closed?": false, "repo_url": null, "repo_uuid": "intra-uuid-d9a02ebd-ecdb-46fd-8ce8-ecdc4ef9352c-69", "locked_at": "2017-11-22T13:43:56.581Z", "closed_at": null, "project_session_id": 1 } ] }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "advanced_tutor", "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/projects_users/update", "name": "update", "apis": [ { "api_url": "/v2/projects_users/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects_users/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "projects_user", "full_name": "projects_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "projects_user[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "project_id", "full_name": "projects_user[project_id]", "description": "\n

The project id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "projects_user[user_id]", "description": "\n

The user id. Must be unique in the scope of a given project.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "projects_user[created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "updated_at", "full_name": "projects_user[updated_at]", "description": "\n

The updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "occurrence", "full_name": "projects_user[occurrence]", "description": "\n

The occurrence. Default to 0.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "final_mark", "full_name": "projects_user[final_mark]", "description": "\n

The final mark.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "retriable_at", "full_name": "projects_user[retriable_at]", "description": "\n

The retriable at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "marked_at", "full_name": "projects_user[marked_at]", "description": "\n

The marked at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "skip_check_permission", "full_name": "projects_user[skip_check_permission]", "description": "\n

The skip check permission.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/projects_users/18", "versions": [ "2.0" ], "query": null, "request_data": { "projects_user": { "project_id": "1", "user_id": "1" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor", "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/projects_users/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/projects_users/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/projects_users/18", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "advanced_tutor", "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/projects_users/compile", "name": "compile", "apis": [ { "api_url": "/v2/projects_users/:id/compile", "http_method": "PATCH", "short_description": "Compile a projects user", "deprecated": null }, { "api_url": "/v2/projects_users/:id/compile", "http_method": "PUT", "short_description": "Compile a projects user", "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_users_id", "full_name": "project_users_id", "description": "\n

The projects_user id

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/projects_users/retry", "name": "retry", "apis": [ { "api_url": "/v2/projects_users/:id/retry", "http_method": "PATCH", "short_description": "Retry a projects user", "deprecated": null }, { "api_url": "/v2/projects_users/:id/retry", "http_method": "PUT", "short_description": "Retry a projects user", "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_users_id", "full_name": "project_users_id", "description": "\n

The projects_user id

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "force", "full_name": "force", "description": "\n

Will force the retry if true

\n", "required": false, "allow_nil": false, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "advanced_tutor", "advanced_staff" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "quests": { "doc_url": "/apidoc/2.0/quests", "api_url": "/api", "name": "Quests", "short_description": "Quests which can or must be done by users", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/quests/index", "name": "index", "apis": [ { "api_url": "/v2/quests", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/cursus/:cursus_id/quests", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:campus_id/quests", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/quests", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "cursus_id", "full_name": "cursus_id", "description": "\n

The cursus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "campus_id", "description": "\n

The campus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id asc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, slug, kind, internal_name, duration, ancestry, description, guild_size, guild_prct, cursus_id, campus_id, created_at, updated_at, grade_id, position, mails, certificate_id, unlock_all_projects, tries_number, success_number, close_on_fail, mails_from.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "asc" }, "keys": [ "id", "name", "slug", "kind", "internal_name", "duration", "ancestry", "description", "guild_size", "guild_prct", "cursus_id", "campus_id", "created_at", "updated_at", "grade_id", "position", "mails", "certificate_id", "unlock_all_projects", "tries_number", "success_number", "close_on_fail", "mails_from" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, slug, kind, internal_name, description, cursus_id, campus_id, created_at, updated_at, grade_id, position.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "slug", "kind", "internal_name", "description", "cursus_id", "campus_id", "created_at", "updated_at", "grade_id", "position" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, slug, kind, internal_name, description, cursus_id, campus_id, created_at, updated_at, grade_id, position.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "slug", "kind", "internal_name", "description", "cursus_id", "campus_id", "created_at", "updated_at", "grade_id", "position" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/quests", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 1, "name": "Level 14", "slug": "level-14", "kind": "main", "internal_name": null, "description": "Reach the level 14.", "cursus_id": 2, "campus_id": null, "created_at": "2017-11-22T13:42:11.464Z", "updated_at": "2017-11-22T13:42:11.464Z", "grade_id": null, "position": 1, "grade": null, "cursus": { "id": 2, "created_at": "2017-11-22T13:41:00.825Z", "name": "42", "slug": "42" }, "campus": null } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/quests/show", "name": "show", "apis": [ { "api_url": "/v2/quests/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/quests/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 1, "name": "Level 14", "slug": "level-14", "kind": "main", "internal_name": null, "description": "Reach the level 14.", "cursus_id": 2, "campus_id": null, "created_at": "2017-11-22T13:42:11.464Z", "updated_at": "2017-11-22T13:42:11.464Z", "grade_id": null, "position": 1, "grade": null, "cursus": { "id": 2, "created_at": "2017-11-22T13:41:00.825Z", "name": "42", "slug": "42" }, "campus": null }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/quests/create", "name": "create", "apis": [ { "api_url": "/v2/quests", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "quest", "full_name": "quest", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "quest[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "quest[name]", "description": "\n

The name.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "quest[slug]", "description": "\n

The slug.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "quest[kind]", "description": "\n

The kind.

\n", "required": true, "allow_nil": false, "validator": "Must be one of: main, optional, mandatory, repeatable.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "internal_name", "full_name": "quest[internal_name]", "description": "\n

The internal name.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "duration", "full_name": "quest[duration]", "description": "\n

The duration.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "ancestry", "full_name": "quest[ancestry]", "description": "\n

The ancestry.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "quest[description]", "description": "\n

The description.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "guild_size", "full_name": "quest[guild_size]", "description": "\n

The guild size.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "guild_prct", "full_name": "quest[guild_prct]", "description": "\n

The guild prct.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "quest[cursus_id]", "description": "\n

The cursus id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "quest[campus_id]", "description": "\n

The campus id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "certificate_id", "full_name": "quest[certificate_id]", "description": "\n

The certificate id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "quest[created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "updated_at", "full_name": "quest[updated_at]", "description": "\n

The updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "grade_id", "full_name": "quest[grade_id]", "description": "\n

The grade id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "position", "full_name": "quest[position]", "description": "\n

The position.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "tries_number", "full_name": "quest[tries_number]", "description": "\n

The tries number.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "success_number", "full_name": "quest[success_number]", "description": "\n

The success number.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "close_on_fail", "full_name": "quest[close_on_fail]", "description": "\n

Is it close on fail ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "mails_from", "full_name": "quest[mails_from]", "description": "\n

The mails from.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "parent_id", "full_name": "quest[parent_id]", "description": "\n

The parent id.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/quests", "versions": [ "2.0" ], "query": null, "request_data": { "quest": { "close_on_fail": "", "cursus_id": "1", "description": "You must take a coffee.", "kind": "main", "mails": "", "mails_from": "", "name": "Take a coffee \u2615\ufe0f", "success_number": "", "tries_number": "" } }, "response_data": { "id": 2, "name": "Take a coffee \u2615\ufe0f", "slug": "take-a-coffee", "kind": "main", "internal_name": null, "description": "You must take a coffee.", "cursus_id": 1, "campus_id": null, "created_at": "2017-11-22T13:43:57.270Z", "updated_at": "2017-11-22T13:43:57.270Z", "grade_id": null, "position": 2, "guild_size": null, "guild_prct": null, "mails": null, "duration": null, "ancestry": null, "grade": null, "cursus": { "id": 1, "created_at": "2017-11-22T13:41:00.750Z", "name": "Piscine C", "slug": "piscine-c" }, "campus": null }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/quests/update", "name": "update", "apis": [ { "api_url": "/v2/quests/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/quests/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "quest", "full_name": "quest", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "quest[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "quest[name]", "description": "\n

The name.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "quest[slug]", "description": "\n

The slug.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "quest[kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: main, optional, mandatory, repeatable.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "internal_name", "full_name": "quest[internal_name]", "description": "\n

The internal name.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "duration", "full_name": "quest[duration]", "description": "\n

The duration.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "ancestry", "full_name": "quest[ancestry]", "description": "\n

The ancestry.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "quest[description]", "description": "\n

The description.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "guild_size", "full_name": "quest[guild_size]", "description": "\n

The guild size.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "guild_prct", "full_name": "quest[guild_prct]", "description": "\n

The guild prct.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "quest[cursus_id]", "description": "\n

The cursus id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "quest[campus_id]", "description": "\n

The campus id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "certificate_id", "full_name": "quest[certificate_id]", "description": "\n

The certificate id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "quest[created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "updated_at", "full_name": "quest[updated_at]", "description": "\n

The updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "grade_id", "full_name": "quest[grade_id]", "description": "\n

The grade id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "position", "full_name": "quest[position]", "description": "\n

The position.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "tries_number", "full_name": "quest[tries_number]", "description": "\n

The tries number.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "success_number", "full_name": "quest[success_number]", "description": "\n

The success number.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "close_on_fail", "full_name": "quest[close_on_fail]", "description": "\n

Is it close on fail ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "mails_from", "full_name": "quest[mails_from]", "description": "\n

The mails from.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "parent_id", "full_name": "quest[parent_id]", "description": "\n

The parent id.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/quests/1", "versions": [ "2.0" ], "query": null, "request_data": { "quest": { "close_on_fail": "", "cursus_id": "2", "description": "You must take a coffee.", "kind": "main", "mails": "", "mails_from": "", "name": "Take a coffee \u2615\ufe0f", "success_number": "", "tries_number": "" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/quests/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/quests/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/quests/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "quests_users": { "doc_url": "/apidoc/2.0/quests_users", "api_url": "/api", "name": "Quests users", "short_description": "Users which earned an quest", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/quests_users/graph", "name": "graph", "apis": [ { "api_url": "/v2/quests_users/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at, end_at, validated_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, quest_id, user_id, end_at, validated_at, prct, advancement, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "quest_id", "user_id", "end_at", "validated_at", "prct", "advancement", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, quest_id, user_id, end_at, validated_at, prct, advancement, created_at, updated_at, campus_id, end, validated.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "quest_id", "user_id", "end_at", "validated_at", "prct", "advancement", "created_at", "updated_at", "campus_id", "end", "validated" ], "additional": { "campus_id": { "proc": {}, "all": [], "description": "Return quests_users with primary campus of user equal to him" }, "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end quests users" }, "validated": { "proc": {}, "all": [ "true", "false" ], "description": "Return only validated quests users" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, quest_id, user_id, end_at, validated_at, prct, advancement, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "quest_id", "user_id", "end_at", "validated_at", "prct", "advancement", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/quests_users/graph/on/created_at/by/day", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "2017-11-22": 5 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/quests_users/index", "name": "index", "apis": [ { "api_url": "/v2/quests/:quest_id/quests_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/quests_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/quests_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "quest_id", "full_name": "quest_id", "description": "\n

The quest id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, quest_id, user_id, end_at, validated_at, prct, advancement, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "quest_id", "user_id", "end_at", "validated_at", "prct", "advancement", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, quest_id, user_id, end_at, validated_at, prct, advancement, created_at, updated_at, campus_id, end, validated.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "quest_id", "user_id", "end_at", "validated_at", "prct", "advancement", "created_at", "updated_at", "campus_id", "end", "validated" ], "additional": { "campus_id": { "proc": {}, "all": [], "description": "Return quests_users with primary campus of user equal to him" }, "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end quests users" }, "validated": { "proc": {}, "all": [ "true", "false" ], "description": "Return only validated quests users" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, quest_id, user_id, end_at, validated_at, prct, advancement, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "quest_id", "user_id", "end_at", "validated_at", "prct", "advancement", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/quests_users", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 5, "end_at": null, "quest_id": 1, "validated_at": null, "prct": null, "advancement": null, "created_at": "2017-11-22T13:42:11.488Z", "updated_at": "2017-11-22T13:42:11.488Z", "user": { "id": 113, "login": "bhutt3", "url": "https://api.intra.42.fr/v2/users/bhutt3" }, "quest": { "id": 1, "name": "Level 14", "slug": "level-14", "kind": "main", "internal_name": null, "description": "Reach the level 14.", "cursus_id": 2, "campus_id": null, "created_at": "2017-11-22T13:42:11.464Z", "updated_at": "2017-11-22T13:42:11.464Z", "grade_id": null, "position": 1 } }, { "id": 4, "end_at": null, "quest_id": 1, "validated_at": null, "prct": null, "advancement": null, "created_at": "2017-11-22T13:42:11.484Z", "updated_at": "2017-11-22T13:42:11.484Z", "user": { "id": 53, "login": "dvader", "url": "https://api.intra.42.fr/v2/users/dvader" }, "quest": { "id": 1, "name": "Level 14", "slug": "level-14", "kind": "main", "internal_name": null, "description": "Reach the level 14.", "cursus_id": 2, "campus_id": null, "created_at": "2017-11-22T13:42:11.464Z", "updated_at": "2017-11-22T13:42:11.464Z", "grade_id": null, "position": 1 } }, { "id": 3, "end_at": null, "quest_id": 1, "validated_at": null, "prct": null, "advancement": null, "created_at": "2017-11-22T13:42:11.480Z", "updated_at": "2017-11-22T13:42:11.480Z", "user": { "id": 15, "login": "mwindu", "url": "https://api.intra.42.fr/v2/users/mwindu" }, "quest": { "id": 1, "name": "Level 14", "slug": "level-14", "kind": "main", "internal_name": null, "description": "Reach the level 14.", "cursus_id": 2, "campus_id": null, "created_at": "2017-11-22T13:42:11.464Z", "updated_at": "2017-11-22T13:42:11.464Z", "grade_id": null, "position": 1 } } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/quests_users/show", "name": "show", "apis": [ { "api_url": "/v2/quests_users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/quests_users/3", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 3, "end_at": null, "quest_id": 1, "validated_at": null, "prct": null, "advancement": null, "created_at": "2017-11-22T13:42:11.480Z", "updated_at": "2017-11-22T13:42:11.480Z", "user": { "id": 15, "login": "mwindu", "url": "https://api.intra.42.fr/v2/users/mwindu" }, "quest": { "id": 1, "name": "Level 14", "slug": "level-14", "kind": "main", "internal_name": null, "description": "Reach the level 14.", "cursus_id": 2, "campus_id": null, "created_at": "2017-11-22T13:42:11.464Z", "updated_at": "2017-11-22T13:42:11.464Z", "grade_id": null, "position": 1 } }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/quests_users/create", "name": "create", "apis": [ { "api_url": "/v2/quests_users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "quests_user", "full_name": "quests_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "quest_id", "full_name": "quests_user[quest_id]", "description": "\n

The quest id. Must be unique in the scope of a given user.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "quests_user[user_id]", "description": "\n

The user id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "quests_user[end_at]", "description": "\n

The end at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "validated_at", "full_name": "quests_user[validated_at]", "description": "\n

The validated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "prct", "full_name": "quests_user[prct]", "description": "\n

The prct.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "advancement", "full_name": "quests_user[advancement]", "description": "\n

The advancement.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/quests_users", "versions": [ "2.0" ], "query": null, "request_data": { "quests_user": { "end_at": "2017-11-24 13:43:10 UTC", "prct": "42", "quest_id": "4", "user_id": "117" } }, "response_data": { "id": 6, "end_at": "2017-11-24T13:43:10.000Z", "quest_id": 4, "validated_at": null, "prct": 42, "advancement": null, "created_at": "2017-11-22T13:43:58.265Z", "updated_at": "2017-11-22T13:43:58.265Z", "user": { "id": 117, "login": "leiorgan", "url": "https://api.intra.42.fr/v2/users/leiorgan" }, "quest": { "id": 4, "name": "Take a coffee \u2615\ufe0f", "slug": "take-a-coffee", "kind": "main", "internal_name": null, "description": "You must take a coffee.", "cursus_id": 2, "campus_id": null, "created_at": "2017-11-22T13:43:58.221Z", "updated_at": "2017-11-22T13:43:58.221Z", "grade_id": null, "position": 2, "guild_size": null, "guild_prct": null, "mails": null, "duration": null, "ancestry": null } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/quests_users/update", "name": "update", "apis": [ { "api_url": "/v2/quests_users/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/quests_users/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "quests_user", "full_name": "quests_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "quest_id", "full_name": "quests_user[quest_id]", "description": "\n

The quest id. Must be unique in the scope of a given user.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "quests_user[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "quests_user[end_at]", "description": "\n

The end at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "validated_at", "full_name": "quests_user[validated_at]", "description": "\n

The validated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "prct", "full_name": "quests_user[prct]", "description": "\n

The prct.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "advancement", "full_name": "quests_user[advancement]", "description": "\n

The advancement.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/quests_users/3", "versions": [ "2.0" ], "query": null, "request_data": { "quests_user": { "end_at": "2017-11-24 13:43:10 UTC", "prct": "42", "quest_id": "5", "user_id": "31" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/quests_users/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/quests_users/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/quests_users/3", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "roles": { "doc_url": "/apidoc/2.0/roles", "api_url": "/api", "name": "Roles", "short_description": "Grants particular privileges to entities like users and applications", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/roles/index", "name": "index", "apis": [ { "api_url": "/v2/roles", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/roles", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, description, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "name", "description", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, description, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "description", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, description, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "description", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/roles", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 17, "name": "Companies Manager", "description": "Manage companies" }, { "id": 16, "name": "Official App", "description": "Approved application without rate limits" }, { "id": 15, "name": "Achievements Manager", "description": "Manage users achievements and titles" } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/roles/show", "name": "show", "apis": [ { "api_url": "/v2/roles/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/roles/13", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 13, "name": "Basic Tutor", "description": "Manage projects, scales and all cursus related data" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/roles/create", "name": "create", "apis": [ { "api_url": "/v2/roles", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "role", "full_name": "role", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "role[name]", "description": "\n

The name. Must be unique.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "role[description]", "description": "\n

The description.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/roles", "versions": [ "2.0" ], "query": null, "request_data": { "role": { "description": "Synchronised uniform parallelism", "name": "astronomer" } }, "response_data": { "id": 18, "name": "astronomer", "description": "Synchronised uniform parallelism" }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor", "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/roles/update", "name": "update", "apis": [ { "api_url": "/v2/roles/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/roles/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "role", "full_name": "role", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "role[name]", "description": "\n

The name. Must be unique.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "role[description]", "description": "\n

The description.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/roles/13", "versions": [ "2.0" ], "query": null, "request_data": { "role": { "description": "Synchronised uniform parallelism", "name": "astronomer" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor", "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/roles/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/roles/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/roles/13", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "intrateam" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "roles_entities": { "doc_url": "/apidoc/2.0/roles_entities", "api_url": "/api", "name": "Roles entities", "short_description": "The users and applications of a role", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/roles_entities/graph", "name": "graph", "apis": [ { "api_url": "/v2/roles_entities/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at, expires_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, role_id, entity_id, expires_at, created_at, updated_at, entity_type.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "role_id", "entity_id", "expires_at", "created_at", "updated_at", "entity_type" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, role_id, entity_id, expires_at, created_at, updated_at, entity_type, expires.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "role_id", "entity_id", "expires_at", "created_at", "updated_at", "entity_type", "expires" ], "additional": { "expires": { "proc": {}, "all": [ "true", "false" ], "description": "Return only expires roles entities" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, role_id, entity_id, expires_at, created_at, updated_at, entity_type.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "role_id", "entity_id", "expires_at", "created_at", "updated_at", "entity_type" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/roles_entities/graph/on/created_at/by/day", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "2017-11-22": 20 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/roles_entities/index", "name": "index", "apis": [ { "api_url": "/v2/roles/:role_id/roles_entities", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/roles_entities", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "role_id", "full_name": "role_id", "description": "\n

The role id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, role_id, entity_id, expires_at, created_at, updated_at, entity_type.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "role_id", "entity_id", "expires_at", "created_at", "updated_at", "entity_type" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, role_id, entity_id, expires_at, created_at, updated_at, entity_type, expires.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "role_id", "entity_id", "expires_at", "created_at", "updated_at", "entity_type", "expires" ], "additional": { "expires": { "proc": {}, "all": [ "true", "false" ], "description": "Return only expires roles entities" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, role_id, entity_id, expires_at, created_at, updated_at, entity_type.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "role_id", "entity_id", "expires_at", "created_at", "updated_at", "entity_type" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/roles_entities", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 20, "entity_id": 7, "entity_type": "Doorkeeper::Application", "created_at": "2017-11-22T13:43:11.431Z", "expires_at": null, "entity": { "id": 7, "name": "test intrateam staff oauth application", "description": null, "image": null, "website": null, "public": true, "scopes": [], "created_at": "2017-11-22T13:43:11.377Z", "updated_at": "2017-11-22T13:43:11.434Z", "owner": { "id": 74, "login": "pamidala", "url": "https://api.intra.42.fr/v2/users/pamidala" }, "rate_limit": 1800 }, "role": { "id": 1, "name": "Intrateam", "description": "manage all" } }, { "id": 19, "entity_id": 7, "entity_type": "Doorkeeper::Application", "created_at": "2017-11-22T13:43:11.413Z", "expires_at": null, "entity": { "id": 7, "name": "test intrateam staff oauth application", "description": null, "image": null, "website": null, "public": true, "scopes": [], "created_at": "2017-11-22T13:43:11.377Z", "updated_at": "2017-11-22T13:43:11.434Z", "owner": { "id": 74, "login": "pamidala", "url": "https://api.intra.42.fr/v2/users/pamidala" }, "rate_limit": 1800 }, "role": { "id": 11, "name": "Advanced Staff", "description": "Member of the staff, with higher privileges" } }, { "id": 18, "entity_id": 7, "entity_type": "Doorkeeper::Application", "created_at": "2017-11-22T13:43:11.399Z", "expires_at": null, "entity": { "id": 7, "name": "test intrateam staff oauth application", "description": null, "image": null, "website": null, "public": true, "scopes": [], "created_at": "2017-11-22T13:43:11.377Z", "updated_at": "2017-11-22T13:43:11.434Z", "owner": { "id": 74, "login": "pamidala", "url": "https://api.intra.42.fr/v2/users/pamidala" }, "rate_limit": 1800 }, "role": { "id": 7, "name": "Basic Staff", "description": "Member of the staff, can manage community services, closes, exams and access advanced student data" } } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/roles_entities/show", "name": "show", "apis": [ { "api_url": "/v2/roles_entities/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/roles_entities/9", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 9, "entity_id": 4, "entity_type": "Doorkeeper::Application", "created_at": "2017-11-22T13:43:11.249Z", "expires_at": null, "entity": { "id": 4, "name": "test shop staff oauth application", "description": null, "image": null, "website": null, "public": true, "scopes": [], "created_at": "2017-11-22T13:43:11.203Z", "updated_at": "2017-11-22T13:43:11.253Z", "owner": {}, "rate_limit": 1800 }, "role": { "id": 10, "name": "Shop Manager", "description": "je suis un super manager" } }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/roles_entities/create", "name": "create", "apis": [ { "api_url": "/v2/roles_entities", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "roles_entity", "full_name": "roles_entity", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "role_id", "full_name": "roles_entity[role_id]", "description": "\n

The role id. Must be unique in the scope of a given entity id and entity type.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "entity_id", "full_name": "roles_entity[entity_id]", "description": "\n

The entity id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "expires_at", "full_name": "roles_entity[expires_at]", "description": "\n

The expires at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "entity_type", "full_name": "roles_entity[entity_type]", "description": "\n

The entity type.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] }, { "name": "entity_type", "full_name": "entity_type", "description": "", "required": false, "allow_nil": false, "validator": "Must be one of: User, Doorkeeper::Application.", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "POST", "path": "/v2/roles_entities", "versions": [ "2.0" ], "query": null, "request_data": { "roles_entity": { "entity_id": "8", "entity_type": "Doorkeeper::Application", "role_id": "8" } }, "response_data": { "id": 21, "entity_id": 8, "entity_type": "Doorkeeper::Application", "created_at": "2017-11-22T13:43:59.468Z", "expires_at": null, "entity": { "id": 8, "name": "test forbidden application", "description": null, "image": null, "website": null, "public": false, "scopes": [], "created_at": "2017-11-22T13:43:11.638Z", "updated_at": "2017-11-22T13:43:59.474Z", "owner": { "id": 116, "login": "mwindu2", "url": "https://api.intra.42.fr/v2/users/mwindu2" }, "rate_limit": 1800 }, "role": { "id": 8, "name": "Translater", "description": "Ability to create and manage content translations" } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor", "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/roles_entities/update", "name": "update", "apis": [ { "api_url": "/v2/roles_entities/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/roles_entities/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "roles_entity", "full_name": "roles_entity", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "role_id", "full_name": "roles_entity[role_id]", "description": "\n

The role id. Must be unique in the scope of a given entity id and entity type.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "entity_id", "full_name": "roles_entity[entity_id]", "description": "\n

The entity id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "expires_at", "full_name": "roles_entity[expires_at]", "description": "\n

The expires at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "entity_type", "full_name": "roles_entity[entity_type]", "description": "\n

The entity type.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/roles_entities/9", "versions": [ "2.0" ], "query": null, "request_data": { "roles_entity": { "entity_id": "8", "entity_type": "Doorkeeper::Application", "role_id": "8" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor", "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/roles_entities/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/roles_entities/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/roles_entities/9", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor", "advanced_staff" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "rules": { "doc_url": "/apidoc/2.0/rules", "api_url": "/api", "name": "Rules", "short_description": "A rule for a project", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/rules/index", "name": "index", "apis": [ { "api_url": "/v2/rules", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/project_sessions/:project_session_id/rules", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_session_id", "full_name": "project_session_id", "description": "\n

The project_session id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, kind, name, description, created_at, updated_at, slug, internal_name.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "kind", "name", "description", "created_at", "updated_at", "slug", "internal_name" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, kind, name, description, created_at, updated_at, slug, internal_name.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "kind", "name", "description", "created_at", "updated_at", "slug", "internal_name" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, kind, name, description, created_at, updated_at, slug, internal_name.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "kind", "name", "description", "created_at", "updated_at", "slug", "internal_name" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/rules", "versions": [ "2.0" ], "query": "page=1", "request_data": null, "response_data": [ { "id": 34, "kind": "inscription", "name": "First name starting by", "description": "The user first name must start by the #{letter} letter", "created_at": "2016-05-31T15:00:49.898Z", "updated_at": "2016-05-31T15:00:49.898Z", "slug": "inscription-first-name-starting-by", "internal_name": "FirstNameStartingBy", "params": [ { "id": 27, "name": "letter", "default_value": "", "rule_id": 34, "created_at": "2016-05-31T15:00:49.905Z", "updated_at": "2016-05-31T15:00:49.905Z", "data_type": "string" } ], "project_sessions_rules": [] } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/rules/show", "name": "show", "apis": [ { "api_url": "/v2/rules/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/rules/34", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 34, "kind": "inscription", "name": "First name starting by", "description": "The user first name must start by the #{letter} letter", "created_at": "2016-05-31T15:00:49.898Z", "updated_at": "2016-05-31T15:00:49.898Z", "slug": "inscription-first-name-starting-by", "internal_name": "FirstNameStartingBy", "params": [ { "id": 27, "name": "letter", "default_value": "", "rule_id": 34, "created_at": "2016-05-31T15:00:49.905Z", "updated_at": "2016-05-31T15:00:49.905Z", "data_type": "string" } ], "project_sessions_rules": [] }, "code": "200", "show_in_doc": 1, "recorded": true }, { "verb": "GET", "path": "/v2/rules/6", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 6, "kind": "inscription", "name": "Skill level min", "description": "be at least level %{level} at %{skill} in cursus %{cursus}", "created_at": "2017-11-22T13:41:01.907Z", "updated_at": "2017-11-22T13:41:01.907Z", "slug": "inscription-skill-level-min", "internal_name": "SkillLevelMin", "params": [] }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/rules/create", "name": "create", "apis": [ { "api_url": "/v2/rules", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/project_sessions/:project_session_id/rules", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_session_id", "full_name": "project_session_id", "description": "\n

The project_session id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "rule", "full_name": "rule", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "rule[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "rule[kind]", "description": "\n

The kind.

\n", "required": true, "allow_nil": false, "validator": "Must be one of: inscription, retry_inscription, correction, final_compilation, eval_compilation, retriable, group_validation, team_generation, experience_modification.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "rule[name]", "description": "\n

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

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "rule[description]", "description": "\n

The description.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "rule[created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "updated_at", "full_name": "rule[updated_at]", "description": "\n

The updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "rule[slug]", "description": "\n

The slug.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "internal_name", "full_name": "rule[internal_name]", "description": "\n

The internal name.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "params_attributes", "full_name": "rule[params_attributes]", "description": "\n

The params attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "rule[params_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "rule[params_attributes][name]", "description": "\n

The name.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "default_value", "full_name": "rule[params_attributes][default_value]", "description": "\n

The default value.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "rule_id", "full_name": "rule[params_attributes][rule_id]", "description": "\n

The rule id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "data_type", "full_name": "rule[params_attributes][data_type]", "description": "\n

The data type.

\n", "required": true, "allow_nil": false, "validator": "Must be one of: string, parsed_string, integer, array.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "rule[params_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/rules", "versions": [ "2.0" ], "query": null, "request_data": { "rule": { "description": "The user first name must start by the #{letter} letter", "internal_name": "FirstNameStartingBy", "kind": "inscription", "name": "First name starting by", "params_attributes": [ { "data_type": "string", "default_value": "", "name": "letter" } ] } }, "response_data": { "id": 11, "kind": "inscription", "name": "First name starting by", "description": "The user first name must start by the #{letter} letter", "created_at": "2017-11-22T13:43:59.860Z", "updated_at": "2017-11-22T13:43:59.860Z", "slug": "inscription-first-name-starting-by", "internal_name": "FirstNameStartingBy", "params": [ { "id": 1, "name": "letter", "default_value": "", "rule_id": 11, "created_at": "2017-11-22T13:43:59.863Z", "updated_at": "2017-11-22T13:43:59.863Z", "data_type": "string" } ] }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/rules/update", "name": "update", "apis": [ { "api_url": "/v2/rules/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/rules/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "rule", "full_name": "rule", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "rule[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "rule[kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: inscription, retry_inscription, correction, final_compilation, eval_compilation, retriable, group_validation, team_generation, experience_modification.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "rule[name]", "description": "\n

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

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "rule[description]", "description": "\n

The description.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "rule[created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "updated_at", "full_name": "rule[updated_at]", "description": "\n

The updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "slug", "full_name": "rule[slug]", "description": "\n

The slug.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "internal_name", "full_name": "rule[internal_name]", "description": "\n

The internal name.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "params_attributes", "full_name": "rule[params_attributes]", "description": "\n

The params attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "rule[params_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "rule[params_attributes][name]", "description": "\n

The name.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "default_value", "full_name": "rule[params_attributes][default_value]", "description": "\n

The default value.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "rule_id", "full_name": "rule[params_attributes][rule_id]", "description": "\n

The rule id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "data_type", "full_name": "rule[params_attributes][data_type]", "description": "\n

The data type.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: string, parsed_string, integer, array.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "rule[params_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/rules/6", "versions": [ "2.0" ], "query": null, "request_data": { "rule": { "description": "The user first name must start by the #{letter} letter", "internal_name": "FirstNameStartingBy", "kind": "inscription", "name": "First name starting by", "params_attributes": [ { "data_type": "string", "default_value": "", "name": "letter" } ] } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/rules/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/rules/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/rules/6", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "scale_teams": { "doc_url": "/apidoc/2.0/scale_teams", "api_url": "/api", "name": "Scale teams", "short_description": "A defence of a team (on a project), involving an evaluator", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/scale_teams/graph", "name": "graph", "apis": [ { "api_url": "/v2/scale_teams/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects/:project_id/scale_teams/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/scale_teams/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at, begin_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by begin_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, created_at, updated_at, scale_id, team_id, comment, old_feedback, feedback_rating, final_mark, truant_id, flag_id, token, ip, internship_id, filled_at.", "expected_type": "string", "metadata": { "sort": { "default": { "begin_at": "desc", "id": "desc" }, "keys": [ "id", "user_id", "begin_at", "created_at", "updated_at", "scale_id", "team_id", "comment", "old_feedback", "feedback_rating", "final_mark", "truant_id", "flag_id", "token", "ip", "internship_id", "filled_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, created_at, updated_at, scale_id, team_id, comment, old_feedback, feedback_rating, final_mark, truant_id, flag_id, token, ip, internship_id, filled_at, future, filled.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "user_id", "begin_at", "created_at", "updated_at", "scale_id", "team_id", "comment", "old_feedback", "feedback_rating", "final_mark", "truant_id", "flag_id", "token", "ip", "internship_id", "filled_at", "future", "filled" ], "additional": { "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only scale teams which begins in the future" }, "filled": { "proc": {}, "all": [ "true", "false" ], "description": "Return only filled scale teams" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, created_at, updated_at, scale_id, team_id, comment, old_feedback, feedback_rating, final_mark, truant_id, flag_id, token, ip, internship_id, filled_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "user_id", "begin_at", "created_at", "updated_at", "scale_id", "team_id", "comment", "old_feedback", "feedback_rating", "final_mark", "truant_id", "flag_id", "token", "ip", "internship_id", "filled_at" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/scale_teams/graph/on/created_at/by/day", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "2017-11-22": 1 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/scale_teams/index", "name": "index", "apis": [ { "api_url": "/v2/scale_teams", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects/:project_id/scale_teams", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/scale_teams/as_corrector", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/scale_teams/as_corrected", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/scale_teams", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/me/scale_teams/as_corrector", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/me/scale_teams/as_corrected", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/me/scale_teams", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_id", "full_name": "project_id", "description": "\n

The project id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by begin_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, created_at, updated_at, scale_id, team_id, comment, old_feedback, feedback_rating, final_mark, truant_id, flag_id, token, ip, internship_id, filled_at.", "expected_type": "string", "metadata": { "sort": { "default": { "begin_at": "desc", "id": "desc" }, "keys": [ "id", "user_id", "begin_at", "created_at", "updated_at", "scale_id", "team_id", "comment", "old_feedback", "feedback_rating", "final_mark", "truant_id", "flag_id", "token", "ip", "internship_id", "filled_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, created_at, updated_at, scale_id, team_id, comment, old_feedback, feedback_rating, final_mark, truant_id, flag_id, token, ip, internship_id, filled_at, future, filled.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "user_id", "begin_at", "created_at", "updated_at", "scale_id", "team_id", "comment", "old_feedback", "feedback_rating", "final_mark", "truant_id", "flag_id", "token", "ip", "internship_id", "filled_at", "future", "filled" ], "additional": { "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only scale teams which begins in the future" }, "filled": { "proc": {}, "all": [ "true", "false" ], "description": "Return only filled scale teams" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, begin_at, created_at, updated_at, scale_id, team_id, comment, old_feedback, feedback_rating, final_mark, truant_id, flag_id, token, ip, internship_id, filled_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "user_id", "begin_at", "created_at", "updated_at", "scale_id", "team_id", "comment", "old_feedback", "feedback_rating", "final_mark", "truant_id", "flag_id", "token", "ip", "internship_id", "filled_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/scale_teams", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/scale_teams/show", "name": "show", "apis": [ { "api_url": "/v2/scale_teams/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/scale_teams/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 1, "scale_id": 1, "comment": null, "created_at": "2017-11-22T13:42:09.187Z", "updated_at": "2017-11-22T13:42:09.187Z", "feedback": null, "feedback_rating": null, "final_mark": null, "flag": { "id": 1, "name": "Ok", "positive": true, "icon": "check-4", "created_at": "2017-11-22T13:41:01.837Z", "updated_at": "2017-11-22T13:41:01.837Z" }, "begin_at": "2017-11-24T18:00:00.000Z", "correcteds": "invisible", "corrector": "invisible", "truant": {}, "filled_at": null, "scale": { "id": 1, "evaluation_id": 1, "name": "Utah ducks", "is_primary": true, "comment": "Perferendis maiores dreamcatcher. Pickled five dollar toast truffaut quis fashion axe.", "introduction_md": "Direct trade asperiores aut odit. Eius meh qui nihil reprehenderit. Before they sold out vegan molestias. Brooklyn rerum non architecto mumblecore franzen post-ironic.", "disclaimer_md": "Ipsa expedita gluten-free. Laboriosam ennui actually literally aut trust fund.", "guidelines_md": "Tumblr ethical eaque blanditiis eligendi. Dolores facere maiores hashtag pour-over architecto.", "created_at": "2017-11-22T13:41:27.388Z", "correction_number": 3, "duration": 1800, "manual_subscription": true, "languages": [ { "id": 3, "name": "Romanian", "identifier": "ro", "created_at": "2017-11-22T13:40:59.468Z", "updated_at": "2017-11-22T13:41:26.139Z" } ] }, "feedbacks": [] }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/scale_teams/create", "name": "create", "apis": [ { "api_url": "/v2/scale_teams", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

With this call, the evaluator is set as the token\u2019s user_id. If you want to set an evaluation for a particular user, use the multiple_create call

\n", "errors": [], "params": [ { "name": "scale_team", "full_name": "scale_team", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "team_id", "full_name": "scale_team[team_id]", "description": "\n

The team id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "scale_id", "full_name": "scale_team[scale_id]", "description": "\n

The scale id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "comment", "full_name": "scale_team[comment]", "description": "\n

The comment. Maximum length is 1024.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "flag", "full_name": "scale_team[flag]", "description": "\n

The flag.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "final_mark", "full_name": "scale_team[final_mark]", "description": "\n

The final mark.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "truant_id", "full_name": "scale_team[truant_id]", "description": "\n

The truant id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "answers_attributes", "full_name": "scale_team[answers_attributes]", "description": "\n

The answers attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "question_id", "full_name": "scale_team[answers_attributes][question_id]", "description": "\n

The question id. Must be unique in the scope of a given scalable entity.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "scale_team[answers_attributes][value]", "description": "\n

The value.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "scale_team[answers_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/scale_teams", "versions": [ "2.0" ], "query": null, "request_data": { "scale_team": { "begin_at": "2017-11-27 09:00:00 UTC", "scale_id": "1", "team_id": "68" } }, "response_data": { "id": 2, "scale_id": 1, "comment": null, "created_at": "2017-11-22T13:44:01.281Z", "updated_at": "2017-11-22T13:44:01.281Z", "feedback": null, "feedback_rating": null, "final_mark": null, "flag": { "id": 1, "name": "Ok", "positive": true, "icon": "check-4", "created_at": "2017-11-22T13:41:01.837Z", "updated_at": "2017-11-22T13:41:01.837Z" }, "begin_at": null, "correcteds": [ { "id": 125, "login": "sebulseb", "url": "https://api.intra.42.fr/v2/users/sebulseb" } ], "corrector": {}, "truant": {}, "filled_at": null, "scale": { "id": 1, "evaluation_id": 1, "name": "Utah ducks", "is_primary": true, "comment": "Perferendis maiores dreamcatcher. Pickled five dollar toast truffaut quis fashion axe.", "introduction_md": "Direct trade asperiores aut odit. Eius meh qui nihil reprehenderit. Before they sold out vegan molestias. Brooklyn rerum non architecto mumblecore franzen post-ironic.", "disclaimer_md": "Ipsa expedita gluten-free. Laboriosam ennui actually literally aut trust fund.", "guidelines_md": "Tumblr ethical eaque blanditiis eligendi. Dolores facere maiores hashtag pour-over architecto.", "created_at": "2017-11-22T13:41:27.388Z", "correction_number": 3, "duration": 1800, "manual_subscription": true, "languages": [ { "id": 3, "name": "Romanian", "identifier": "ro", "created_at": "2017-11-22T13:40:59.468Z", "updated_at": "2017-11-22T13:41:26.139Z" } ] }, "team": { "id": 68, "name": "sebulseb's group", "url": "https://api.intra.42.fr/v2/teams/68", "final_mark": null, "project_id": 1, "created_at": "2017-11-22T13:41:37.418Z", "updated_at": "2017-11-22T13:44:01.294Z", "status": "waiting_for_correction", "terminating_at": null, "users": [ { "id": 125, "login": "sebulseb", "url": "https://api.intra.42.fr/v2/users/sebulseb", "leader": true, "occurrence": 0, "validated": true, "projects_user_id": 68 } ], "locked?": true, "validated?": null, "closed?": true, "repo_url": null, "repo_uuid": "intra-uuid-5af5ca8d-e0dc-4791-9cfc-ed657e1984e0-68", "locked_at": "2017-11-22T13:41:37.471Z", "closed_at": "2017-11-22T13:41:37.496Z", "project_session_id": 1 }, "feedbacks": [] }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/scale_teams/update", "name": "update", "apis": [ { "api_url": "/v2/scale_teams/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/scale_teams/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "scale_team", "full_name": "scale_team", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "team_id", "full_name": "scale_team[team_id]", "description": "\n

The team id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "scale_id", "full_name": "scale_team[scale_id]", "description": "\n

The scale id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "comment", "full_name": "scale_team[comment]", "description": "\n

The comment. Maximum length is 1024.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "flag", "full_name": "scale_team[flag]", "description": "\n

The flag.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "final_mark", "full_name": "scale_team[final_mark]", "description": "\n

The final mark.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "truant_id", "full_name": "scale_team[truant_id]", "description": "\n

The truant id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "answers_attributes", "full_name": "scale_team[answers_attributes]", "description": "\n

The answers attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "question_id", "full_name": "scale_team[answers_attributes][question_id]", "description": "\n

The question id. Must be unique in the scope of a given scalable entity.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "scale_team[answers_attributes][value]", "description": "\n

The value.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "scale_team[answers_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/scale_teams/1", "versions": [ "2.0" ], "query": null, "request_data": { "scale_team": { "begin_at": "2017-11-27 09:00:00 UTC", "scale_id": "1", "team_id": "68" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/scale_teams/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/scale_teams/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/scale_teams/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/scale_teams/multiple_create", "name": "multiple_create", "apis": [ { "api_url": "/v2/scale_teams/multiple_create", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

This calls allow the creation of one or multiple scale_teams in a single call. Creating a new scale_team without an user_id and with a final_mark will act as a moulinette mark. To be more comfortable, and for readability, we recommend that you send the data as an array of JSON objects.

\n", "errors": [], "params": [ { "name": "scale_teams", "full_name": "scale_teams", "description": "", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [] } ], "examples": [ { "verb": "POST", "path": "/v2/scale_teams/multiple_create", "versions": [ "2.0" ], "query": null, "request_data": { "scale_teams": [ { "begin_at": "2017-11-27 09:00:00 UTC", "scale_id": "1", "team_id": "68" } ] }, "response_data": [ { "id": 4, "scale_id": 1, "comment": null, "created_at": "2017-11-22T13:44:01.678Z", "updated_at": "2017-11-22T13:44:01.678Z", "feedback": null, "feedback_rating": null, "final_mark": null, "flag": { "id": 1, "name": "Ok", "positive": true, "icon": "check-4", "created_at": "2017-11-22T13:41:01.837Z", "updated_at": "2017-11-22T13:41:01.837Z" }, "begin_at": "2017-11-27T09:00:00.000Z", "correcteds": [ { "id": 125, "login": "sebulseb", "url": "https://api.intra.42.fr/v2/users/sebulseb" } ], "corrector": {}, "truant": {}, "filled_at": null, "scale": { "id": 1, "evaluation_id": 1, "name": "Utah ducks", "is_primary": true, "comment": "Perferendis maiores dreamcatcher. Pickled five dollar toast truffaut quis fashion axe.", "introduction_md": "Direct trade asperiores aut odit. Eius meh qui nihil reprehenderit. Before they sold out vegan molestias. Brooklyn rerum non architecto mumblecore franzen post-ironic.", "disclaimer_md": "Ipsa expedita gluten-free. Laboriosam ennui actually literally aut trust fund.", "guidelines_md": "Tumblr ethical eaque blanditiis eligendi. Dolores facere maiores hashtag pour-over architecto.", "created_at": "2017-11-22T13:41:27.388Z", "correction_number": 3, "duration": 1800, "manual_subscription": true, "languages": [ { "id": 3, "name": "Romanian", "identifier": "ro", "created_at": "2017-11-22T13:40:59.468Z", "updated_at": "2017-11-22T13:41:26.139Z" } ] }, "team": { "id": 68, "name": "sebulseb's group", "url": "https://api.intra.42.fr/v2/teams/68", "final_mark": null, "project_id": 1, "created_at": "2017-11-22T13:41:37.418Z", "updated_at": "2017-11-22T13:44:01.687Z", "status": "waiting_for_correction", "terminating_at": null, "users": [ { "id": 125, "login": "sebulseb", "url": "https://api.intra.42.fr/v2/users/sebulseb", "leader": true, "occurrence": 0, "validated": true, "projects_user_id": 68 } ], "locked?": true, "validated?": null, "closed?": true, "repo_url": null, "repo_uuid": "intra-uuid-5af5ca8d-e0dc-4791-9cfc-ed657e1984e0-68", "locked_at": "2017-11-22T13:41:37.471Z", "closed_at": "2017-11-22T13:41:37.496Z", "project_session_id": 1 }, "feedbacks": [] } ], "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "scales": { "doc_url": "/apidoc/2.0/scales", "api_url": "/api", "name": "Scales", "short_description": "A scale is composed by questions which allows an users to rate the quality of a project .", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/scales/index", "name": "index", "apis": [ { "api_url": "/v2/project_sessions/:project_session_id/scales", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/scales", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects/:project_id/scales", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/scales", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_session_id", "full_name": "project_session_id", "description": "\n

The project_session id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_id", "full_name": "project_id", "description": "\n

The project id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by name asc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, comment, introduction_md, disclaimer_md, guidelines_md, created_at, updated_at, evaluation_id, is_primary, correction_number, duration, manual_subscription, is_external, free.", "expected_type": "string", "metadata": { "sort": { "default": { "name": "asc", "id": "desc" }, "keys": [ "id", "name", "comment", "introduction_md", "disclaimer_md", "guidelines_md", "created_at", "updated_at", "evaluation_id", "is_primary", "correction_number", "duration", "manual_subscription", "is_external", "free" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, comment, introduction_md, disclaimer_md, guidelines_md, created_at, updated_at, evaluation_id, is_primary, correction_number, duration, manual_subscription, is_external, free.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "comment", "introduction_md", "disclaimer_md", "guidelines_md", "created_at", "updated_at", "evaluation_id", "is_primary", "correction_number", "duration", "manual_subscription", "is_external", "free" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, comment, introduction_md, disclaimer_md, guidelines_md, created_at, updated_at, evaluation_id, is_primary, correction_number, duration, manual_subscription, is_external, free.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "comment", "introduction_md", "disclaimer_md", "guidelines_md", "created_at", "updated_at", "evaluation_id", "is_primary", "correction_number", "duration", "manual_subscription", "is_external", "free" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/scales", "versions": [ "2.0" ], "query": "page=1", "request_data": null, "response_data": [ { "id": 531, "evaluation_id": 168, "name": "Unicooooorn !", "is_primary": true, "comment": "Banh mi dreamcatcher ad natus. Aut blog sunt nostrum est repellendus. Fingerstache hammock echo sed.", "introduction_md": "Chambray mumblecore non harum mustache wayfarers eius. Sartorial lumbersexual street tenetur keffiyeh. Dolorum pbr&b eveniet nihil neque dolores non. Banh mi atque officia eaque cumque.", "disclaimer_md": "Adipisci iusto qui laborum tote bag letterpress brooklyn. Voluptatibus fanny pack ea wayfarers.", "guidelines_md": "Chartreuse sequi repellendus squid franzen qui. Voluptatum sint cornhole mustache single-origin coffee typewriter. Qui omnis ramps vitae gluten-free corrupti 8-bit nam.", "created_at": "2016-05-04T10:45:05.519Z", "correction_number": 3, "duration": 1800, "manual_subscription": true, "languages": [ { "id": 2, "name": "English", "identifier": "en", "created_at": "2015-04-14T16:07:38.122Z", "updated_at": "2015-04-14T16:07:38.122Z" } ], "sections": [ { "id": 1975, "name": "Nebraska druids", "description": "Rem butcher blue bottle ex cum. Knausgaard plaid quis chambray wayfarers. Vegan laboriosam occaecati chicharrones sed selfies neque.", "questions": [ { "id": 5854, "name": "Florida buffalo", "guidelines": "Sriracha occupy farm-to-table venmo. Semiotics quinoa drinking. Craft beer viral kinfolk. Portland mumblecore diy butcher knausgaard flexitarian tacos cold-pressed. Food truck before they sold out park biodiesel.", "rating": "bool", "kind": "standard", "created_at": "2016-05-04T10:45:05.785Z" } ] }, { "id": 1976, "name": "Nebraska druids", "description": "Rem butcher blue bottle ex cum. Knausgaard plaid quis chambray wayfarers. Vegan laboriosam occaecati chicharrones sed selfies neque.", "questions": [ { "id": 5855, "name": "Florida buffalo", "guidelines": "Sriracha occupy farm-to-table venmo. Semiotics quinoa drinking. Craft beer viral kinfolk. Portland mumblecore diy butcher knausgaard flexitarian tacos cold-pressed. Food truck before they sold out park biodiesel.", "rating": "bool", "kind": "standard", "created_at": "2016-05-04T10:45:06.131Z" } ] }, { "id": 1977, "name": "Nebraska druids", "description": "Rem butcher blue bottle ex cum. Knausgaard plaid quis chambray wayfarers. Vegan laboriosam occaecati chicharrones sed selfies neque.", "questions": [ { "id": 5856, "name": "Florida buffalo", "guidelines": "Sriracha occupy farm-to-table venmo. Semiotics quinoa drinking. Craft beer viral kinfolk. Portland mumblecore diy butcher knausgaard flexitarian tacos cold-pressed. Food truck before they sold out park biodiesel.", "rating": "bool", "kind": "standard", "created_at": "2016-05-04T10:45:06.457Z" } ] }, { "id": 1978, "name": "Nebraska druids", "description": "Rem butcher blue bottle ex cum. Knausgaard plaid quis chambray wayfarers. Vegan laboriosam occaecati chicharrones sed selfies neque.", "questions": [ { "id": 5857, "name": "Florida buffalo", "guidelines": "Sriracha occupy farm-to-table venmo. Semiotics quinoa drinking. Craft beer viral kinfolk. Portland mumblecore diy butcher knausgaard flexitarian tacos cold-pressed. Food truck before they sold out park biodiesel.", "rating": "bool", "kind": "standard", "created_at": "2016-05-04T10:45:07.035Z" } ] } ], "evaluation": { "id": 168, "kind": "scale" } } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/scales/show", "name": "show", "apis": [ { "api_url": "/v2/scales/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/scales/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 1, "evaluation_id": 168, "name": "Wyoming black cats", "is_primary": true, "comment": "Banh mi dreamcatcher ad natus. Aut blog sunt nostrum est repellendus. Fingerstache hammock echo sed.", "introduction_md": "Chambray mumblecore non harum mustache wayfarers eius. Sartorial lumbersexual street tenetur keffiyeh. Dolorum pbr&b eveniet nihil neque dolores non. Banh mi atque officia eaque cumque.", "disclaimer_md": "Adipisci iusto qui laborum tote bag letterpress brooklyn. Voluptatibus fanny pack ea wayfarers.", "guidelines_md": "Chartreuse sequi repellendus squid franzen qui. Voluptatum sint cornhole mustache single-origin coffee typewriter. Qui omnis ramps vitae gluten-free corrupti 8-bit nam.", "created_at": "2016-05-04T10:45:05.519Z", "correction_number": 3, "duration": 1800, "manual_subscription": true, "languages": [ { "id": 2, "name": "English", "identifier": "en", "created_at": "2015-04-14T16:07:38.122Z", "updated_at": "2015-04-14T16:07:38.122Z" } ], "sections": [ { "id": 1975, "name": "Nebraska druids", "description": "Rem butcher blue bottle ex cum. Knausgaard plaid quis chambray wayfarers. Vegan laboriosam occaecati chicharrones sed selfies neque.", "questions": [ { "id": 5854, "name": "Florida buffalo", "guidelines": "Sriracha occupy farm-to-table venmo. Semiotics quinoa drinking. Craft beer viral kinfolk. Portland mumblecore diy butcher knausgaard flexitarian tacos cold-pressed. Food truck before they sold out park biodiesel.", "rating": "bool", "kind": "standard", "created_at": "2016-05-04T10:45:05.785Z" } ] }, { "id": 1976, "name": "Nebraska druids", "description": "Rem butcher blue bottle ex cum. Knausgaard plaid quis chambray wayfarers. Vegan laboriosam occaecati chicharrones sed selfies neque.", "questions": [ { "id": 5855, "name": "Florida buffalo", "guidelines": "Sriracha occupy farm-to-table venmo. Semiotics quinoa drinking. Craft beer viral kinfolk. Portland mumblecore diy butcher knausgaard flexitarian tacos cold-pressed. Food truck before they sold out park biodiesel.", "rating": "bool", "kind": "standard", "created_at": "2016-05-04T10:45:06.131Z" } ] }, { "id": 1977, "name": "Nebraska druids", "description": "Rem butcher blue bottle ex cum. Knausgaard plaid quis chambray wayfarers. Vegan laboriosam occaecati chicharrones sed selfies neque.", "questions": [ { "id": 5856, "name": "Florida buffalo", "guidelines": "Sriracha occupy farm-to-table venmo. Semiotics quinoa drinking. Craft beer viral kinfolk. Portland mumblecore diy butcher knausgaard flexitarian tacos cold-pressed. Food truck before they sold out park biodiesel.", "rating": "bool", "kind": "standard", "created_at": "2016-05-04T10:45:06.457Z" } ] }, { "id": 1978, "name": "Nebraska druids", "description": "Rem butcher blue bottle ex cum. Knausgaard plaid quis chambray wayfarers. Vegan laboriosam occaecati chicharrones sed selfies neque.", "questions": [ { "id": 5857, "name": "Florida buffalo", "guidelines": "Sriracha occupy farm-to-table venmo. Semiotics quinoa drinking. Craft beer viral kinfolk. Portland mumblecore diy butcher knausgaard flexitarian tacos cold-pressed. Food truck before they sold out park biodiesel.", "rating": "bool", "kind": "standard", "created_at": "2016-05-04T10:45:07.035Z" } ] } ], "evaluation": { "id": 168, "kind": "scale" } }, "code": "200", "show_in_doc": 1, "recorded": true }, { "verb": "GET", "path": "/v2/scales/2", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 2, "evaluation_id": 3, "name": "Tennessee prophets", "is_primary": true, "comment": "Quidem pork belly before they sold out non vegan. Portland lo-fi sunt dolorum raw denim similique non. Accusantium consequatur quis retro. Maiores blanditiis fap chambray vice similique intelligentsia tattooed.", "introduction_md": "Sapiente plaid +1 ea wes anderson mlkshk mumblecore. Eaque repellendus eveniet slow-carb.", "disclaimer_md": "Ugh kitsch molestiae dicta keffiyeh eius tumblr gastropub. Earum repellendus sequi tilde velit error.", "guidelines_md": "Wolf voluptas itaque. Sunt art party farm-to-table sapiente. Ea voluptatum voluptas culpa listicle facilis.", "created_at": "2017-11-22T13:41:27.957Z", "correction_number": 3, "duration": 1800, "manual_subscription": true, "languages": [ { "id": 3, "name": "Romanian", "identifier": "ro", "created_at": "2017-11-22T13:40:59.468Z", "updated_at": "2017-11-22T13:41:26.139Z" } ], "sections": [ { "id": 3, "name": "Wyoming ants", "description": "Cum messenger bag praesentium hella wes anderson tofu butcher. Xoxo pabst ut quod. Tattooed adipisci bushwick. Hammock aut accusamus salvia schlitz corporis kitsch tote bag.", "questions": [ { "name": "Idaho rabbits", "id": 5, "questions_skills": [ { "id": 9, "question_id": 5, "skill_id": 6, "percentage": 25, "created_at": "2017-11-22T13:41:28.006Z", "updated_at": "2017-11-22T13:41:28.006Z" }, { "id": 10, "question_id": 5, "skill_id": 1, "percentage": 25, "created_at": "2017-11-22T13:41:28.020Z", "updated_at": "2017-11-22T13:41:28.020Z" } ] }, { "name": "Oklahoma elves", "id": 6, "questions_skills": [ { "id": 11, "question_id": 6, "skill_id": 6, "percentage": 25, "created_at": "2017-11-22T13:41:28.064Z", "updated_at": "2017-11-22T13:41:28.064Z" }, { "id": 12, "question_id": 6, "skill_id": 1, "percentage": 25, "created_at": "2017-11-22T13:41:28.068Z", "updated_at": "2017-11-22T13:41:28.068Z" } ] } ] }, { "id": 4, "name": "New York gooses", "description": "Modi polaroid odio lomo chillwave. Cold-pressed everyday quasi possimus 90's flexitarian. Fingerstache ullam quia et distillery cupiditate shoreditch tousled. Quis tousled keffiyeh debitis. Earum sunt quis repellat quasi green juice knausgaard.", "questions": [ { "name": "Virginia ghosts", "id": 7, "questions_skills": [ { "id": 13, "question_id": 7, "skill_id": 6, "percentage": 25, "created_at": "2017-11-22T13:41:28.144Z", "updated_at": "2017-11-22T13:41:28.144Z" }, { "id": 14, "question_id": 7, "skill_id": 1, "percentage": 25, "created_at": "2017-11-22T13:41:28.158Z", "updated_at": "2017-11-22T13:41:28.158Z" } ] }, { "name": "Idaho witches", "id": 8, "questions_skills": [ { "id": 15, "question_id": 8, "skill_id": 6, "percentage": 25, "created_at": "2017-11-22T13:41:28.210Z", "updated_at": "2017-11-22T13:41:28.210Z" }, { "id": 16, "question_id": 8, "skill_id": 1, "percentage": 25, "created_at": "2017-11-22T13:41:28.215Z", "updated_at": "2017-11-22T13:41:28.215Z" } ] } ] } ], "evaluation": { "id": 3, "kind": "scale" } }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/scales/create", "name": "create", "apis": [ { "api_url": "/v2/scales", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "scale", "full_name": "scale", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "scale[name]", "description": "\n

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

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "lg", "full_name": "scale[lg]", "description": "\n

The language id.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "is_primary", "full_name": "scale[is_primary]", "description": "\n

Is it is primary ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "is_external", "full_name": "scale[is_external]", "description": "\n

Is it is external ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "manual_subscription", "full_name": "scale[manual_subscription]", "description": "\n

Is it manual subscription ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "comment", "full_name": "scale[comment]", "description": "\n

The comment.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "introduction_md", "full_name": "scale[introduction_md]", "description": "\n

The introduction md.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "disclaimer_md", "full_name": "scale[disclaimer_md]", "description": "\n

The disclaimer md.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "guidelines_md", "full_name": "scale[guidelines_md]", "description": "\n

The guidelines md.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "correction_number", "full_name": "scale[correction_number]", "description": "\n

The correction number.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "duration", "full_name": "scale[duration]", "description": "\n

The duration.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "free", "full_name": "scale[free]", "description": "\n

Is it free ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "evaluation_id", "full_name": "scale[evaluation_id]", "description": "\n

The evaluation id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "flag_ids", "full_name": "scale[flag_ids]", "description": "\n

The flag ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "attachments_attributes", "full_name": "scale[attachments_attributes]", "description": "\n

The attachments attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "scale[attachments_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "scale[attachments_attributes][kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: code, pdf, link, document, video.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language_id", "full_name": "scale[attachments_attributes][language_id]", "description": "\n

The language id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "scale[attachments_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "untranslatable", "full_name": "scale[attachments_attributes][untranslatable]", "description": "\n

Is it untranslatable ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "attachable_attributes", "full_name": "scale[attachments_attributes][attachable_attributes]", "description": "\n

The attachable attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [] } ] }, { "name": "sections_attributes", "full_name": "scale[sections_attributes]", "description": "\n

The sections attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "scale[sections_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "scale[sections_attributes][description]", "description": "\n

The description.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "questions_attributes", "full_name": "scale[sections_attributes][questions_attributes]", "description": "\n

The questions attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "scale[sections_attributes][questions_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "scale[sections_attributes][questions_attributes][name]", "description": "\n

The name.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "scale[sections_attributes][questions_attributes][kind]", "description": "\n

The kind.

\n", "required": true, "allow_nil": false, "validator": "Must be one of: standard, bonus.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "rating", "full_name": "scale[sections_attributes][questions_attributes][rating]", "description": "\n

The rating.

\n", "required": true, "allow_nil": false, "validator": "Must be one of: bool, multi, text.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "guidelines", "full_name": "scale[sections_attributes][questions_attributes][guidelines]", "description": "\n

The guidelines.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "scale[sections_attributes][questions_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "questions_skills_attributes", "full_name": "scale[sections_attributes][questions_attributes][questions_skills_attributes]", "description": "\n

The questions skills attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "scale[sections_attributes][questions_attributes][questions_skills_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "skill_id", "full_name": "scale[sections_attributes][questions_attributes][questions_skills_attributes][skill_id]", "description": "\n

The skill id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "percentage", "full_name": "scale[sections_attributes][questions_attributes][questions_skills_attributes][percentage]", "description": "\n

The percentage.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "scale[sections_attributes][questions_attributes][questions_skills_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] }, { "name": "name", "full_name": "scale[sections_attributes][name]", "description": "\n

The name.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "scale[sections_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/scales", "versions": [ "2.0" ], "query": null, "request_data": { "scale": { "comment": "Dolores facere letterpress. Facilis pork belly church-key rem enim ut twee.", "correction_number": "3", "disclaimer_md": "Narwhal harum et voluptatum dolor similique minus biodiesel. Mlkshk architecto sapiente harum ipsum. Ut selvage paleo. Quia franzen listicle occupy.", "duration": "2", "evaluation_id": "4", "guidelines_md": "Ut kickstarter aut wolf harum vel cornhole stumptown. Next level semiotics ab squid sit ethical lumbersexual. Venmo aspernatur retro letterpress quae ea pickled provident. Small batch ugh quia flexitarian.", "introduction_md": "Amet sed sint perferendis sriracha. Thundercats consequuntur salvia. Jean shorts church-key ut enim est selvage aut. Alias cray paleo quia ea nulla five dollar toast in. Vitae eos vegan aut inventore at dolorem quo.", "is_external": "false", "is_primary": "true", "lg": "3", "manual_subscription": "false", "name": "Tennessee ducks", "sections_attributes": [ { "description": "Ab quidem shoreditch id fixie paleo raw denim celiac. Chartreuse vinyl pitchfork vero fixie ipsam. Dreamcatcher ut aut voluptatem mustache. Ea officia selvage qui carry. 8-bit expedita aesthetic leggings slow-carb you probably haven't heard of them xoxo.", "name": "Maine sheep", "questions_attributes": [ { "guidelines": "Single-origin coffee chia bushwick sriracha drinking. Drinking raw denim sartorial austin echo shabby chic tilde pinterest. Raw denim retro taxidermy pbr&b small batch tilde kale chips wolf. Kombucha tousled quinoa.", "kind": "standard", "name": "South Dakota banshees", "questions_skills_attributes": [ { "percentage": "25", "skill_id": "6" }, { "percentage": "25", "skill_id": "1" } ], "rating": "bool" } ] }, { "description": "Ab quidem shoreditch id fixie paleo raw denim celiac. Chartreuse vinyl pitchfork vero fixie ipsam. Dreamcatcher ut aut voluptatem mustache. Ea officia selvage qui carry. 8-bit expedita aesthetic leggings slow-carb you probably haven't heard of them xoxo.", "name": "Maine sheep", "questions_attributes": [ { "guidelines": "Single-origin coffee chia bushwick sriracha drinking. Drinking raw denim sartorial austin echo shabby chic tilde pinterest. Raw denim retro taxidermy pbr&b small batch tilde kale chips wolf. Kombucha tousled quinoa.", "kind": "standard", "name": "South Dakota banshees", "questions_skills_attributes": [ { "percentage": "25", "skill_id": "6" }, { "percentage": "25", "skill_id": "1" } ], "rating": "bool" } ] }, { "description": "Ab quidem shoreditch id fixie paleo raw denim celiac. Chartreuse vinyl pitchfork vero fixie ipsam. Dreamcatcher ut aut voluptatem mustache. Ea officia selvage qui carry. 8-bit expedita aesthetic leggings slow-carb you probably haven't heard of them xoxo.", "name": "Maine sheep", "questions_attributes": [ { "guidelines": "Single-origin coffee chia bushwick sriracha drinking. Drinking raw denim sartorial austin echo shabby chic tilde pinterest. Raw denim retro taxidermy pbr&b small batch tilde kale chips wolf. Kombucha tousled quinoa.", "kind": "standard", "name": "South Dakota banshees", "questions_skills_attributes": [ { "percentage": "25", "skill_id": "6" }, { "percentage": "25", "skill_id": "1" } ], "rating": "bool" } ] }, { "description": "Ab quidem shoreditch id fixie paleo raw denim celiac. Chartreuse vinyl pitchfork vero fixie ipsam. Dreamcatcher ut aut voluptatem mustache. Ea officia selvage qui carry. 8-bit expedita aesthetic leggings slow-carb you probably haven't heard of them xoxo.", "name": "Maine sheep", "questions_attributes": [ { "guidelines": "Single-origin coffee chia bushwick sriracha drinking. Drinking raw denim sartorial austin echo shabby chic tilde pinterest. Raw denim retro taxidermy pbr&b small batch tilde kale chips wolf. Kombucha tousled quinoa.", "kind": "standard", "name": "South Dakota banshees", "questions_skills_attributes": [ { "percentage": "25", "skill_id": "6" }, { "percentage": "25", "skill_id": "1" } ], "rating": "bool" } ] } ] } }, "response_data": { "id": 3, "evaluation_id": 4, "name": "Tennessee ducks", "is_primary": true, "comment": "Dolores facere letterpress. Facilis pork belly church-key rem enim ut twee.", "introduction_md": "Amet sed sint perferendis sriracha. Thundercats consequuntur salvia. Jean shorts church-key ut enim est selvage aut. Alias cray paleo quia ea nulla five dollar toast in. Vitae eos vegan aut inventore at dolorem quo.", "disclaimer_md": "Narwhal harum et voluptatum dolor similique minus biodiesel. Mlkshk architecto sapiente harum ipsum. Ut selvage paleo. Quia franzen listicle occupy.", "guidelines_md": "Ut kickstarter aut wolf harum vel cornhole stumptown. Next level semiotics ab squid sit ethical lumbersexual. Venmo aspernatur retro letterpress quae ea pickled provident. Small batch ugh quia flexitarian.", "created_at": "2017-11-22T13:44:02.886Z", "correction_number": 3, "duration": 1800, "manual_subscription": true, "languages": [ { "id": 3, "name": "Romanian", "identifier": "ro", "created_at": "2017-11-22T13:40:59.468Z", "updated_at": "2017-11-22T13:41:26.139Z" } ], "sections": [ { "id": 6, "name": "Maine sheep", "description": "Ab quidem shoreditch id fixie paleo raw denim celiac. Chartreuse vinyl pitchfork vero fixie ipsam. Dreamcatcher ut aut voluptatem mustache. Ea officia selvage qui carry. 8-bit expedita aesthetic leggings slow-carb you probably haven't heard of them xoxo.", "questions": [ { "name": "South Dakota banshees", "id": 10, "questions_skills": [ { "id": 17, "question_id": 10, "skill_id": 6, "percentage": 25, "created_at": "2017-11-22T13:44:02.903Z", "updated_at": "2017-11-22T13:44:02.903Z" }, { "id": 18, "question_id": 10, "skill_id": 1, "percentage": 25, "created_at": "2017-11-22T13:44:02.917Z", "updated_at": "2017-11-22T13:44:02.917Z" } ] } ] }, { "id": 7, "name": "Maine sheep", "description": "Ab quidem shoreditch id fixie paleo raw denim celiac. Chartreuse vinyl pitchfork vero fixie ipsam. Dreamcatcher ut aut voluptatem mustache. Ea officia selvage qui carry. 8-bit expedita aesthetic leggings slow-carb you probably haven't heard of them xoxo.", "questions": [ { "name": "South Dakota banshees", "id": 11, "questions_skills": [ { "id": 19, "question_id": 11, "skill_id": 6, "percentage": 25, "created_at": "2017-11-22T13:44:02.991Z", "updated_at": "2017-11-22T13:44:02.991Z" }, { "id": 20, "question_id": 11, "skill_id": 1, "percentage": 25, "created_at": "2017-11-22T13:44:03.002Z", "updated_at": "2017-11-22T13:44:03.002Z" } ] } ] }, { "id": 8, "name": "Maine sheep", "description": "Ab quidem shoreditch id fixie paleo raw denim celiac. Chartreuse vinyl pitchfork vero fixie ipsam. Dreamcatcher ut aut voluptatem mustache. Ea officia selvage qui carry. 8-bit expedita aesthetic leggings slow-carb you probably haven't heard of them xoxo.", "questions": [ { "name": "South Dakota banshees", "id": 12, "questions_skills": [ { "id": 21, "question_id": 12, "skill_id": 6, "percentage": 25, "created_at": "2017-11-22T13:44:03.060Z", "updated_at": "2017-11-22T13:44:03.060Z" }, { "id": 22, "question_id": 12, "skill_id": 1, "percentage": 25, "created_at": "2017-11-22T13:44:03.070Z", "updated_at": "2017-11-22T13:44:03.070Z" } ] } ] }, { "id": 9, "name": "Maine sheep", "description": "Ab quidem shoreditch id fixie paleo raw denim celiac. Chartreuse vinyl pitchfork vero fixie ipsam. Dreamcatcher ut aut voluptatem mustache. Ea officia selvage qui carry. 8-bit expedita aesthetic leggings slow-carb you probably haven't heard of them xoxo.", "questions": [ { "name": "South Dakota banshees", "id": 13, "questions_skills": [ { "id": 23, "question_id": 13, "skill_id": 6, "percentage": 25, "created_at": "2017-11-22T13:44:03.128Z", "updated_at": "2017-11-22T13:44:03.128Z" }, { "id": 24, "question_id": 13, "skill_id": 1, "percentage": 25, "created_at": "2017-11-22T13:44:03.136Z", "updated_at": "2017-11-22T13:44:03.136Z" } ] } ] } ], "evaluation": { "id": 4, "kind": "scale" } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/scales/update", "name": "update", "apis": [ { "api_url": "/v2/scales/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/scales/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "scale", "full_name": "scale", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "scale[name]", "description": "\n

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

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "lg", "full_name": "scale[lg]", "description": "\n

The language id.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "is_primary", "full_name": "scale[is_primary]", "description": "\n

Is it is primary ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "is_external", "full_name": "scale[is_external]", "description": "\n

Is it is external ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "manual_subscription", "full_name": "scale[manual_subscription]", "description": "\n

Is it manual subscription ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "comment", "full_name": "scale[comment]", "description": "\n

The comment.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "introduction_md", "full_name": "scale[introduction_md]", "description": "\n

The introduction md.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "disclaimer_md", "full_name": "scale[disclaimer_md]", "description": "\n

The disclaimer md.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "guidelines_md", "full_name": "scale[guidelines_md]", "description": "\n

The guidelines md.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "correction_number", "full_name": "scale[correction_number]", "description": "\n

The correction number.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "duration", "full_name": "scale[duration]", "description": "\n

The duration.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "free", "full_name": "scale[free]", "description": "\n

Is it free ?

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "evaluation_id", "full_name": "scale[evaluation_id]", "description": "\n

The evaluation id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "flag_ids", "full_name": "scale[flag_ids]", "description": "\n

The flag ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] }, { "name": "attachments_attributes", "full_name": "scale[attachments_attributes]", "description": "\n

The attachments attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "scale[attachments_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "scale[attachments_attributes][kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: code, pdf, link, document, video.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language_id", "full_name": "scale[attachments_attributes][language_id]", "description": "\n

The language id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "scale[attachments_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "untranslatable", "full_name": "scale[attachments_attributes][untranslatable]", "description": "\n

Is it untranslatable ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "attachable_attributes", "full_name": "scale[attachments_attributes][attachable_attributes]", "description": "\n

The attachable attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [] } ] }, { "name": "sections_attributes", "full_name": "scale[sections_attributes]", "description": "\n

The sections attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "scale[sections_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "description", "full_name": "scale[sections_attributes][description]", "description": "\n

The description.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "questions_attributes", "full_name": "scale[sections_attributes][questions_attributes]", "description": "\n

The questions attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "scale[sections_attributes][questions_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "scale[sections_attributes][questions_attributes][name]", "description": "\n

The name.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "scale[sections_attributes][questions_attributes][kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: standard, bonus.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "rating", "full_name": "scale[sections_attributes][questions_attributes][rating]", "description": "\n

The rating.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: bool, multi, text.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "guidelines", "full_name": "scale[sections_attributes][questions_attributes][guidelines]", "description": "\n

The guidelines.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "scale[sections_attributes][questions_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "questions_skills_attributes", "full_name": "scale[sections_attributes][questions_attributes][questions_skills_attributes]", "description": "\n

The questions skills attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "scale[sections_attributes][questions_attributes][questions_skills_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "skill_id", "full_name": "scale[sections_attributes][questions_attributes][questions_skills_attributes][skill_id]", "description": "\n

The skill id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "percentage", "full_name": "scale[sections_attributes][questions_attributes][questions_skills_attributes][percentage]", "description": "\n

The percentage.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "scale[sections_attributes][questions_attributes][questions_skills_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] }, { "name": "name", "full_name": "scale[sections_attributes][name]", "description": "\n

The name.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "scale[sections_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/scales/2", "versions": [ "2.0" ], "query": null, "request_data": { "scale": { "comment": "Dolores facere letterpress. Facilis pork belly church-key rem enim ut twee.", "disclaimer_md": "Narwhal harum et voluptatum dolor similique minus biodiesel. Mlkshk architecto sapiente harum ipsum. Ut selvage paleo. Quia franzen listicle occupy.", "guidelines_md": "Ut kickstarter aut wolf harum vel cornhole stumptown. Next level semiotics ab squid sit ethical lumbersexual. Venmo aspernatur retro letterpress quae ea pickled provident. Small batch ugh quia flexitarian.", "introduction_md": "Amet sed sint perferendis sriracha. Thundercats consequuntur salvia. Jean shorts church-key ut enim est selvage aut. Alias cray paleo quia ea nulla five dollar toast in. Vitae eos vegan aut inventore at dolorem quo." } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/scales/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/scales/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/scales/2", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "scores": { "doc_url": "/apidoc/2.0/scores", "api_url": "/api", "name": "Scores", "short_description": "Points given to a coalition.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/scores/index", "name": "index", "apis": [ { "api_url": "/v2/scores", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/coalitions/:coalition_id/scores", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/coalitions_users/:coalitions_user_id/scores", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/blocs/:bloc_id/scores", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "coalition_id", "full_name": "coalition_id", "description": "\n

The coalition id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "coalitions_user_id", "full_name": "coalitions_user_id", "description": "\n

The coalitions_user id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "bloc_id", "full_name": "bloc_id", "description": "\n

The bloc id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, coalitions_user_id, calculation_id, reason, created_at, updated_at, coalition_id, scoreable_id, scoreable_type, value.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "coalitions_user_id", "calculation_id", "reason", "created_at", "updated_at", "coalition_id", "scoreable_id", "scoreable_type", "value" ] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/scores/show", "name": "show", "apis": [ { "api_url": "/v2/scores/:id", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/coalitions/:coalition_id/scores/:id", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/coalitions_users/:coalitions_user_id/scores/:id", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/blocs/:bloc_id/scores/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "coalition_id", "full_name": "coalition_id", "description": "\n

The coalition id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "coalitions_user_id", "full_name": "coalitions_user_id", "description": "\n

The coalitions_user id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "bloc_id", "full_name": "bloc_id", "description": "\n

The bloc id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/scores/2", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 2, "coalition_id": 1, "scoreable_id": 5, "scoreable_type": "Location", "coalitions_user_id": 3, "calculation_id": 3, "value": 54, "reason": "Who's the more foolish; the fool, or the fool who follows him?", "created_at": "2017-11-22T13:42:09.850Z", "updated_at": "2017-11-22T13:42:09.850Z" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/scores/create", "name": "create", "apis": [ { "api_url": "/v2/coalitions/:coalition_id/scores", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "coalition_id", "full_name": "coalition_id", "description": "\n

The coalition id or slug

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/scores/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/coalitions/:coalition_id/scores/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "coalition_id", "full_name": "coalition_id", "description": "\n

The coalition id or slug

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_staff" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "skills": { "doc_url": "/apidoc/2.0/skills", "api_url": "/api", "name": "Skills", "short_description": "A particlar skill.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/skills/index", "name": "index", "apis": [ { "api_url": "/v2/skills", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/cursus/:cursus_id/skills", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/skills", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "cursus_id", "full_name": "cursus_id", "description": "\n

The cursus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by name asc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, slug.", "expected_type": "string", "metadata": { "sort": { "default": { "name": "asc", "id": "desc" }, "keys": [ "id", "name", "created_at", "updated_at", "slug" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, slug.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "created_at", "updated_at", "slug" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, slug.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "created_at", "updated_at", "slug" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/skills/show", "name": "show", "apis": [ { "api_url": "/v2/skills/:id", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/skills/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/skills/create", "name": "create", "apis": [ { "api_url": "/v2/skills", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/skills", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "skill", "full_name": "skill", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "skill[name]", "description": "\n

The name. Must be unique.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/skills/update", "name": "update", "apis": [ { "api_url": "/v2/skills/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/skills/:id", "http_method": "PUT", "short_description": null, "deprecated": null }, { "api_url": "/v2/skills/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/skills/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "skill", "full_name": "skill", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "skill[name]", "description": "\n

The name. Must be unique.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/skills/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/skills/:id", "http_method": "DELETE", "short_description": null, "deprecated": null }, { "api_url": "/v2/skills/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "slots": { "doc_url": "/apidoc/2.0/slots", "api_url": "/api", "name": "Slots", "short_description": "The slots available to users for booking a project scale team.", "full_description": "\n

A Slot is a time interval when a user desclares himself available to evaluate other users. Actually, a slot must be at least 30 minutes (with a granularity of 15 minutes). A slot can be set every day between 30 minutes and 2 weeks in advance.

\n", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/slots/graph", "name": "graph", "apis": [ { "api_url": "/v2/slots/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects/:project_id/slots/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/slots/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, begin_at, end_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by begin_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, user_id, created_at, scale_team_id.", "expected_type": "string", "metadata": { "sort": { "default": { "begin_at": "desc", "id": "desc" }, "keys": [ "id", "begin_at", "end_at", "user_id", "created_at", "scale_team_id" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, created_at, future, end.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "begin_at", "end_at", "created_at", "future", "end" ], "additional": { "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only slots which begins in the future" }, "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end slots" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, created_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "begin_at", "end_at", "created_at" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/slots/graph/on/begin_at/by/day", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "2017-11-20": 123, "2017-11-21": 0, "2017-11-22": 0, "2017-11-23": 0, "2017-11-24": 1266 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/slots/index", "name": "index", "apis": [ { "api_url": "/v2/slots", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects/:project_id/slots", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/slots", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/me/slots", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n
\n

A Slot is a time interval when a user desclares himself available to evaluate other users. Actually, a slot must be at least 30 minutes (with a granularity of 15 minutes). A slot can be set every day between 30 minutes and 2 weeks in advance.

\n
\n\n

This call obviously lists all slots.

\n\n

An user without the advanced tutor role can\u2019t set the user_id or the scale_team_id parameter.

\n\n\n\n

In all the cases, the /slots endpoint lists all the slots, booked or not, including all the past ones.

\n", "errors": [], "params": [ { "name": "project_id", "full_name": "project_id", "description": "\n

The project id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by begin_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, user_id, created_at, scale_team_id.", "expected_type": "string", "metadata": { "sort": { "default": { "begin_at": "desc", "id": "desc" }, "keys": [ "id", "begin_at", "end_at", "user_id", "created_at", "scale_team_id" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, created_at, future, end.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "begin_at", "end_at", "created_at", "future", "end" ], "additional": { "future": { "proc": {}, "all": [ "true", "false" ], "description": "Return only slots which begins in the future" }, "end": { "proc": {}, "all": [ "true", "false" ], "description": "Return only end slots" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, begin_at, end_at, created_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "begin_at", "end_at", "created_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/slots", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 27, "begin_at": "2017-11-24T20:15:00.000Z", "end_at": "2017-11-24T20:30:00.000Z", "scale_team": null, "user": "invisible" }, { "id": 76, "begin_at": "2017-11-24T20:15:00.000Z", "end_at": "2017-11-24T20:30:00.000Z", "scale_team": null, "user": "invisible" }, { "id": 110, "begin_at": "2017-11-24T20:15:00.000Z", "end_at": "2017-11-24T20:30:00.000Z", "scale_team": null, "user": "invisible" } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30, "authentication": "user", "required_scopes": [ "projects" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/slots/show", "name": "show", "apis": [ { "api_url": "/v2/slots/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "authentication": "user", "required_scopes": [ "projects" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/slots/create", "name": "create", "apis": [ { "api_url": "/v2/slots", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n
\n

A Slot is a time interval when a user desclares himself available to evaluate other users. Actually, a slot must be at least 30 minutes (with a granularity of 15 minutes). A slot can be set every day between 30 minutes and 2 weeks in advance.

\n
\n\n

An user without the advanced tutor role can\u2019t set the user_id or the scale_team_id parameter.

\n\n

An app without resource owner cannot make this call.

\n\n

If there is a resource owner, the user_id parameter must be set to his id. The date intervals are automaticaly scaled to a 15 minutes granularity. If the duration exceeds 15 minutes, multiple slots will be created.

\n", "errors": [], "params": [ { "name": "slot", "full_name": "slot", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "slot[user_id]", "description": "\n

The user wich set this slot

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "slot[begin_at]", "description": "\n

The beginning of the slot

\n", "required": true, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "slot[end_at]", "description": "\n

The ending of the slot

\n", "required": true, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "scale_team_id", "full_name": "slot[scale_team_id]", "description": "\n

The defense linked to this slot

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/slots/update", "name": "update", "apis": [ { "api_url": "/v2/slots/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/slots/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n
\n

A Slot is a time interval when a user desclares himself available to evaluate other users. Actually, a slot must be at least 30 minutes (with a granularity of 15 minutes). A slot can be set every day between 30 minutes and 2 weeks in advance.

\n
\n\n

An user without the advanced tutor role can\u2019t set the user_id or the scale_team_id parameter.

\n\n

An app without resource owner cannot make this call.

\n\n

If there is a resource owner, the user_id parameter must be set to his id. The date intervals are automaticaly scaled to a 15 minutes granularity. If the duration exceeds 15 minutes, multiple slots will be created.

\n", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "slot", "full_name": "slot", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "slot[user_id]", "description": "\n

The user wich set this slot

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "slot[begin_at]", "description": "\n

The beginning of the slot

\n", "required": false, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "slot[end_at]", "description": "\n

The ending of the slot

\n", "required": false, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "scale_team_id", "full_name": "slot[scale_team_id]", "description": "\n

The defense linked to this slot

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/slots/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/slots/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/slots/471", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "squads": { "doc_url": "/apidoc/2.0/squads", "api_url": "/api", "name": "Squads", "short_description": "A squads is the managing container of squads_users.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/squads/create", "name": "create", "apis": [ { "api_url": "/v2/blocs/:bloc_id/squads", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "bloc_id", "full_name": "bloc_id", "description": "\n

The bloc id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "squad", "full_name": "squad", "description": "", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "bloc_id", "full_name": "squad[bloc_id]", "description": "\n

The bloc id

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "locked_at", "full_name": "squad[locked_at]", "description": "\n

When the squad was locked

\n", "required": false, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "squads_users_attributes", "full_name": "squad[squads_users_attributes]", "description": "\n

The users registration to this squad

\n", "required": false, "allow_nil": false, "validator": "Must be an array of any type", "expected_type": "array", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/blocs/:id/squads", "versions": [ "2.0" ], "query": "", "request_data": { "bloc_id": 21, "locked_at": null, "squads_users_attributes": [ { "user_id": 18763, "leader": true, "validated": true } ] }, "response_data": { "id": 4934, "bloc_id": 21, "locked_at": null, "squads_users": [ { "id": 10717, "squad_id": 4934, "leader": true, "validated": false, "created_at": "2019-11-08T13:53:26.408Z", "updated_at": "2019-11-08T13:53:26.408Z", "user": { "id": 18763, "login": "gmonein" } } ], "created_at": "2019-11-08T13:53:26.404Z", "updated_at": "2019-11-08T13:53:26.404Z", "bloc": { "id": 21, "campus_id": 22, "cursus_id": 21, "squad_size": 4, "created_at": "2019-10-24T23:57:59.098Z", "updated_at": "2019-11-06T11:15:35.845Z" } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/squads/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/blocs/:bloc_id/squads/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "bloc_id", "full_name": "bloc_id", "description": "\n

The bloc id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/squads/index", "name": "index", "apis": [ { "api_url": "/v2/blocs/:bloc_id/squads", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "bloc_id", "full_name": "bloc_id", "description": "\n

The bloc id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, bloc_id, locked_at, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "bloc_id", "locked_at", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, bloc_id, locked_at, created_at, updated_at, locked.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "bloc_id", "locked_at", "created_at", "updated_at", "locked" ], "additional": { "locked": { "proc": {}, "all": [ "true", "false" ], "description": "Return only locked squads" } } } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/squads/show", "name": "show", "apis": [ { "api_url": "/v2/blocs/:bloc_id/squads/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "bloc_id", "full_name": "bloc_id", "description": "\n

The bloc id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "squads_users": { "doc_url": "/apidoc/2.0/squads_users", "api_url": "/api", "name": "Squads users", "short_description": "A squads_users will group users inside a same coalition", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/squads_users/create", "name": "create", "apis": [ { "api_url": "/v2/blocs/:bloc_id/squads_users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "bloc_id", "full_name": "bloc_id", "description": "\n

The bloc id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/squads_users/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/blocs/:bloc_id/squads_users/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "bloc_id", "full_name": "bloc_id", "description": "\n

The bloc id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/squads_users/index", "name": "index", "apis": [ { "api_url": "/v2/blocs/:bloc_id/squads_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "bloc_id", "full_name": "bloc_id", "description": "\n

The bloc id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, squad_id, user_id, leader, validated, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "squad_id", "user_id", "leader", "validated", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, squad_id, user_id, leader, validated, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "squad_id", "user_id", "leader", "validated", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "subnotions": { "doc_url": "/apidoc/2.0/subnotions", "api_url": "/api", "name": "Subnotions", "short_description": "The elearning subnotion in a notion", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/subnotions/index", "name": "index", "apis": [ { "api_url": "/v2/notions/:notion_id/subnotions", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/subnotions", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "notion_id", "full_name": "notion_id", "description": "\n

The notion id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by name asc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, notion_id, name, created_at, updated_at, slug, position.", "expected_type": "string", "metadata": { "sort": { "default": { "name": "asc", "id": "desc" }, "keys": [ "id", "notion_id", "name", "created_at", "updated_at", "slug", "position" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, notion_id, name, created_at, updated_at, slug, position.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "notion_id", "name", "created_at", "updated_at", "slug", "position" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, notion_id, name, created_at, updated_at, slug, position.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "notion_id", "name", "created_at", "updated_at", "slug", "position" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/subnotions", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 10, "name": "Conclusion", "slug": "piscine-php-d08-even-moar-object-oriented-programming-conclusion", "created_at": "2017-11-22T13:41:24.254Z", "notepad": null, "attachments": [], "notion": null }, { "id": 5, "name": "Cosinus", "slug": "fract-ol-cosinus", "created_at": "2017-11-22T13:41:24.204Z", "notepad": null, "attachments": [], "notion": null }, { "id": 4, "name": "D\u00e9monstration", "slug": "wolf3d-demonstration", "created_at": "2017-11-22T13:41:24.195Z", "notepad": null, "attachments": [], "notion": null } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/subnotions/show", "name": "show", "apis": [ { "api_url": "/v2/subnotions/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/subnotions/6", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 6, "name": "Julia", "slug": "fract-ol-julia", "created_at": "2017-11-22T13:41:24.215Z", "notepad": null, "attachments": [], "notion": null }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/subnotions/create", "name": "create", "apis": [ { "api_url": "/v2/subnotions", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "subnotion", "full_name": "subnotion", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "subnotion[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "subnotion[name]", "description": "\n

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

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "notion_id", "full_name": "subnotion[notion_id]", "description": "\n

The notion id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "attachments_attributes", "full_name": "subnotion[attachments_attributes]", "description": "\n

The attachments attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "subnotion[attachments_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "subnotion[attachments_attributes][kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: code, pdf, link, document, video.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "subnotion[attachments_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language_id", "full_name": "subnotion[attachments_attributes][language_id]", "description": "\n

The language id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "untranslatable", "full_name": "subnotion[attachments_attributes][untranslatable]", "description": "\n

Is it untranslatable ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "attachable_attributes", "full_name": "subnotion[attachments_attributes][attachable_attributes]", "description": "\n

The attachable attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [] } ] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/subnotions", "versions": [ "2.0" ], "query": null, "request_data": { "subnotion": { "name": "By Grand Central Station I Sat Down and Wept", "notion_id": "1" } }, "response_data": { "id": 15, "name": "By Grand Central Station I Sat Down and Wept", "slug": "by-grand-central-station-i-sat-down-and-wept", "created_at": "2017-11-22T13:44:04.723Z", "notepad": null, "attachments": [], "notion": { "id": 1, "name": "42run Demo", "slug": "42run-demo", "created_at": "2017-11-22T13:41:23.730Z" } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor", "video_manager" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/subnotions/update", "name": "update", "apis": [ { "api_url": "/v2/subnotions/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/subnotions/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "subnotion", "full_name": "subnotion", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "subnotion[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "subnotion[name]", "description": "\n

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

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "notion_id", "full_name": "subnotion[notion_id]", "description": "\n

The notion id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "attachments_attributes", "full_name": "subnotion[attachments_attributes]", "description": "\n

The attachments attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "subnotion[attachments_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "subnotion[attachments_attributes][kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: code, pdf, link, document, video.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "subnotion[attachments_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language_id", "full_name": "subnotion[attachments_attributes][language_id]", "description": "\n

The language id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "untranslatable", "full_name": "subnotion[attachments_attributes][untranslatable]", "description": "\n

Is it untranslatable ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "attachable_attributes", "full_name": "subnotion[attachments_attributes][attachable_attributes]", "description": "\n

The attachable attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [] } ] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/subnotions/6", "versions": [ "2.0" ], "query": null, "request_data": { "subnotion": { "name": "By Grand Central Station I Sat Down and Wept", "notion_id": "2" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor", "video_manager" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/subnotions/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/subnotions/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/subnotions/6", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor", "video_manager" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "tags": { "doc_url": "/apidoc/2.0/tags", "api_url": "/api", "name": "Tags", "short_description": "Non-hierarchical keyword, acting as a meta-data and helping to describe entities.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/tags/index", "name": "index", "apis": [ { "api_url": "/v2/projects/:project_id/tags", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/issues/:issue_id/tags", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/notions/:notion_id/tags", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/cursus/:cursus_id/tags", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/tags", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/tags", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "project_id", "full_name": "project_id", "description": "\n

The project id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "issue_id", "full_name": "issue_id", "description": "\n

The issue id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "notion_id", "full_name": "notion_id", "description": "\n

The notion id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "cursus_id", "description": "\n

The cursus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by name asc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, pinner_id, kind, description.", "expected_type": "string", "metadata": { "sort": { "default": { "name": "asc", "id": "desc" }, "keys": [ "id", "name", "created_at", "updated_at", "pinner_id", "kind", "description" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, pinner_id, kind, description, cursus_id.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "name", "created_at", "updated_at", "pinner_id", "kind", "description", "cursus_id" ], "additional": { "cursus_id": { "proc": {}, "all": [ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 ], "description": "" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, name, created_at, updated_at, pinner_id, kind, description.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "name", "created_at", "updated_at", "pinner_id", "kind", "description" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/tags", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 11, "name": "Archived", "kind": "archived", "users": [], "subnotions": [] }, { "id": 7, "name": "Bocal", "kind": "general", "users": [], "subnotions": [ { "id": 1, "name": "Emacs", "slug": "piscine-c-text-editors-emacs", "created_at": "2017-11-22T13:41:24.154Z", "notepad": null } ] }, { "id": 4, "name": "Colle 08", "kind": "project", "users": [], "subnotions": [] } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/tags/show", "name": "show", "apis": [ { "api_url": "/v2/tags/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/tags/6", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 6, "name": "Jour 13", "kind": "project", "users": [], "subnotions": [] }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/tags/create", "name": "create", "apis": [ { "api_url": "/v2/tags", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "tag", "full_name": "tag", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "tag[name]", "description": "\n

The name. Must be unique.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "tags_users_attributes", "full_name": "tag[tags_users_attributes]", "description": "\n

The tags users attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "tag[tags_users_attributes][user_id]", "description": "\n

The user id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "tag[tags_users_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "tag[tags_users_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] }, { "name": "cursus_ids", "full_name": "tag[cursus_ids]", "description": "\n

The cursus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/tags", "versions": [ "2.0" ], "query": null, "request_data": { "tag": { "kind": "general", "name": "Legend" } }, "response_data": { "id": 18, "name": "Legend", "kind": "general", "users": [], "subnotions": [] }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/tags/update", "name": "update", "apis": [ { "api_url": "/v2/tags/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/tags/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "tag", "full_name": "tag", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "tag[name]", "description": "\n

The name. Must be unique.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "tags_users_attributes", "full_name": "tag[tags_users_attributes]", "description": "\n

The tags users attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "tag[tags_users_attributes][user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "tag[tags_users_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "tag[tags_users_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] }, { "name": "cursus_ids", "full_name": "tag[cursus_ids]", "description": "\n

The cursus ids.

\n", "required": false, "allow_nil": true, "validator": "Must be an array of Integer", "expected_type": "array", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/tags/6", "versions": [ "2.0" ], "query": null, "request_data": { "tag": { "kind": "general", "name": "Legend" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/tags/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/tags/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/tags/6", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "teams": { "doc_url": "/apidoc/2.0/teams", "api_url": "/api", "name": "Teams", "short_description": "One or many users which have to finish a project together.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/teams/graph", "name": "graph", "apis": [ { "api_url": "/v2/cursus/:cursus_id/teams/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/teams/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/projects/:project_id/teams/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/teams/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects/:project_id/teams/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at, locked_at, closed_at, deadline_at, terminating_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id asc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_id, name, created_at, updated_at, locked_at, closed_at, final_mark, repo_url, repo_uuid, deadline_at, terminating_at, project_session_id.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "asc" }, "keys": [ "id", "project_id", "name", "created_at", "updated_at", "locked_at", "closed_at", "final_mark", "repo_url", "repo_uuid", "deadline_at", "terminating_at", "project_session_id" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_id, name, created_at, updated_at, locked_at, closed_at, final_mark, repo_url, repo_uuid, deadline_at, terminating_at, project_session_id, cursus, active_cursus, campus, primary_campus, locked, closed, deadline, terminating, with_mark.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "project_id", "name", "created_at", "updated_at", "locked_at", "closed_at", "final_mark", "repo_url", "repo_uuid", "deadline_at", "terminating_at", "project_session_id", "cursus", "active_cursus", "campus", "primary_campus", "locked", "closed", "deadline", "terminating", "with_mark" ], "additional": { "cursus": { "proc": {}, "all": [ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 ], "description": "Only return teams with users in the given cursus" }, "active_cursus": { "proc": {}, "all": [ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 ], "description": "Only return teams with users in the given cursus" }, "campus": { "proc": {}, "all": [ 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47 ], "description": "Only return teams with users in the given campus" }, "primary_campus": { "proc": {}, "all": [ 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47 ], "description": "Only return teams with users having the campus as a primary campus" }, "locked": { "proc": {}, "all": [ "true", "false" ], "description": "Return only locked teams" }, "closed": { "proc": {}, "all": [ "true", "false" ], "description": "Return only closed teams" }, "deadline": { "proc": {}, "all": [ "true", "false" ], "description": "Return only deadline teams" }, "terminating": { "proc": {}, "all": [ "true", "false" ], "description": "Return only terminating teams" }, "with_mark": { "proc": {}, "all": [ "true", "false" ], "description": "Return only teams with a final_mark" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_id, name, created_at, updated_at, locked_at, closed_at, final_mark, repo_url, repo_uuid, deadline_at, terminating_at, project_session_id.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "project_id", "name", "created_at", "updated_at", "locked_at", "closed_at", "final_mark", "repo_url", "repo_uuid", "deadline_at", "terminating_at", "project_session_id" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/teams/graph/on/created_at/by/day", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "2017-11-22": 68 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/teams/index", "name": "index", "apis": [ { "api_url": "/v2/cursus/:cursus_id/teams", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/teams", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/projects/:project_id/teams", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/teams", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects/:project_id/teams", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/project_sessions/:project_session_id/teams", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/me/teams", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "cursus_id", "full_name": "cursus_id", "description": "\n

The cursus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_id", "full_name": "project_id", "description": "\n

The project id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_session_id", "full_name": "project_session_id", "description": "\n

The project_session id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id asc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_id, name, created_at, updated_at, locked_at, closed_at, final_mark, repo_url, repo_uuid, deadline_at, terminating_at, project_session_id.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "asc" }, "keys": [ "id", "project_id", "name", "created_at", "updated_at", "locked_at", "closed_at", "final_mark", "repo_url", "repo_uuid", "deadline_at", "terminating_at", "project_session_id" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_id, name, created_at, updated_at, locked_at, closed_at, final_mark, repo_url, repo_uuid, deadline_at, terminating_at, project_session_id, cursus, active_cursus, campus, primary_campus, locked, closed, deadline, terminating, with_mark.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "project_id", "name", "created_at", "updated_at", "locked_at", "closed_at", "final_mark", "repo_url", "repo_uuid", "deadline_at", "terminating_at", "project_session_id", "cursus", "active_cursus", "campus", "primary_campus", "locked", "closed", "deadline", "terminating", "with_mark" ], "additional": { "cursus": { "proc": {}, "all": [ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 ], "description": "Only return teams with users in the given cursus" }, "active_cursus": { "proc": {}, "all": [ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 ], "description": "Only return teams with users in the given cursus" }, "campus": { "proc": {}, "all": [ 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47 ], "description": "Only return teams with users in the given campus" }, "primary_campus": { "proc": {}, "all": [ 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47 ], "description": "Only return teams with users having the campus as a primary campus" }, "locked": { "proc": {}, "all": [ "true", "false" ], "description": "Return only locked teams" }, "closed": { "proc": {}, "all": [ "true", "false" ], "description": "Return only closed teams" }, "deadline": { "proc": {}, "all": [ "true", "false" ], "description": "Return only deadline teams" }, "terminating": { "proc": {}, "all": [ "true", "false" ], "description": "Return only terminating teams" }, "with_mark": { "proc": {}, "all": [ "true", "false" ], "description": "Return only teams with a final_mark" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, project_id, name, created_at, updated_at, locked_at, closed_at, final_mark, repo_url, repo_uuid, deadline_at, terminating_at, project_session_id.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "project_id", "name", "created_at", "updated_at", "locked_at", "closed_at", "final_mark", "repo_url", "repo_uuid", "deadline_at", "terminating_at", "project_session_id" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/teams", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 1, "name": "jabinks2's group", "url": "https://api.intra.42.fr/v2/teams/1", "final_mark": null, "project_id": 2, "created_at": "2017-11-22T13:41:28.447Z", "updated_at": "2017-11-22T13:41:28.519Z", "status": "in_progress", "terminating_at": null, "users": [ { "id": 111, "login": "coundook", "url": "https://api.intra.42.fr/v2/users/coundook", "leader": true, "occurrence": 0, "validated": true, "projects_user_id": 1 } ], "locked?": true, "validated?": null, "closed?": false, "repo_url": null, "repo_uuid": "intra-uuid-e8f23ddc-8e52-47a8-87e9-9bd490621cfd-1", "locked_at": "2017-11-22T13:41:28.487Z", "closed_at": null, "project_session_id": 2, "scale_teams": [], "teams_uploads": [] }, { "id": 2, "name": "podamer2's group", "url": "https://api.intra.42.fr/v2/teams/2", "final_mark": null, "project_id": 4, "created_at": "2017-11-22T13:41:28.554Z", "updated_at": "2017-11-22T13:41:28.608Z", "status": "in_progress", "terminating_at": null, "users": [ { "id": 108, "login": "podamer2", "url": "https://api.intra.42.fr/v2/users/podamer2", "leader": true, "occurrence": 0, "validated": true, "projects_user_id": 2 } ], "locked?": false, "validated?": null, "closed?": true, "repo_url": null, "repo_uuid": "intra-uuid-ae9bdbbc-9c16-4c27-8f18-eccee5a31020-2", "locked_at": null, "closed_at": "2017-11-22T13:41:28.578Z", "project_session_id": 4, "scale_teams": [], "teams_uploads": [] }, { "id": 3, "name": "podamer2's group", "url": "https://api.intra.42.fr/v2/teams/3", "final_mark": null, "project_id": 5, "created_at": "2017-11-22T13:41:28.661Z", "updated_at": "2017-11-22T13:41:28.704Z", "status": "creating_group", "terminating_at": null, "users": [ { "id": 108, "login": "podamer2", "url": "https://api.intra.42.fr/v2/users/podamer2", "leader": true, "occurrence": 0, "validated": true, "projects_user_id": 3 } ], "locked?": false, "validated?": null, "closed?": false, "repo_url": null, "repo_uuid": "intra-uuid-d6aded82-d02e-4597-a33a-acd2544ec015-3", "locked_at": null, "closed_at": null, "project_session_id": 5, "scale_teams": [], "teams_uploads": [] } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/teams/show", "name": "show", "apis": [ { "api_url": "/v2/teams/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/teams/create", "name": "create", "apis": [ { "api_url": "/v2/teams", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "team", "full_name": "team", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "project_id", "full_name": "team[project_id]", "description": "\n

The project id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "team[name]", "description": "\n

The name. Maximum length is 255.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "team[created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "updated_at", "full_name": "team[updated_at]", "description": "\n

The updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "locked_at", "full_name": "team[locked_at]", "description": "\n

The locked at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "closed_at", "full_name": "team[closed_at]", "description": "\n

The closed at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "final_mark", "full_name": "team[final_mark]", "description": "\n

The final mark.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "repo_url", "full_name": "team[repo_url]", "description": "\n

The repo url.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "repo_uuid", "full_name": "team[repo_uuid]", "description": "\n

The repo uuid.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "deadline_at", "full_name": "team[deadline_at]", "description": "\n

The deadline at. Must be after today.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "terminating_at", "full_name": "team[terminating_at]", "description": "\n

The terminating at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_session_id", "full_name": "team[project_session_id]", "description": "\n

The project session id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "teams_users_attributes", "full_name": "team[teams_users_attributes]", "description": "\n

The teams users attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "team[teams_users_attributes][user_id]", "description": "\n

The user id. Must be unique in the scope of a given team.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "leader", "full_name": "team[teams_users_attributes][leader]", "description": "\n

Is it leader ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "validated", "full_name": "team[teams_users_attributes][validated]", "description": "\n

Is it validated ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "occurrence", "full_name": "team[teams_users_attributes][occurrence]", "description": "\n

The occurrence. Default to 0.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/teams", "versions": [ "2.0" ], "query": null, "request_data": { "team": { "name": "Awesome team", "project_id": 688, "teams_users_attributes": [ { "user_id": 17282, "leader": true }, { "user_id": 18668 }, { "user_id": 15646 }, { "user_id": 12293 }, { "user_id": 17241 } ] } }, "response_data": { "closed?": false, "closed_at": null, "created_at": "2019-01-29T13:46:58.977Z", "final_mark": null, "id": 2368475, "locked?": false, "locked_at": null, "name": "soin", "project_id": 688, "project_session_id": 431, "repo_url": null, "repo_uuid": "intra-uuid-ed68a876-be55-42ff-af85-43826f014fb5-2368475", "scale_teams": [], "status": "creating_group", "teams_uploads": [], "terminating_at": null, "updated_at": "2019-01-29T13:46:59.104Z", "url": "http://localhost:13000/v2/teams/2368475", "users": [ { "id": 12293, "leader": false, "login": "mcanal", "occurrence": 0, "projects_user_id": 824439, "url": "http://localhost:13000/v2/users/mcanal", "validated": false }, { "id": 15646, "leader": false, "login": "qduperon", "occurrence": 0, "projects_user_id": 802915, "url": "http://localhost:13000/v2/users/qduperon", "validated": false }, { "id": 17241, "leader": false, "login": "mmoullec", "occurrence": 0, "projects_user_id": 1149166, "url": "http://localhost:13000/v2/users/mmoullec", "validated": false }, { "id": 17282, "leader": true, "login": "thifranc", "occurrence": 0, "projects_user_id": 1149194, "url": "http://localhost:13000/v2/users/thifranc", "validated": false }, { "id": 18668, "leader": false, "login": "jlasne", "occurrence": 0, "projects_user_id": 1097141, "url": "http://localhost:13000/v2/users/jlasne", "validated": false } ], "validated?": null }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/teams/update", "name": "update", "apis": [ { "api_url": "/v2/teams/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/teams/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "team", "full_name": "team", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "project_id", "full_name": "team[project_id]", "description": "\n

The project id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "name", "full_name": "team[name]", "description": "\n

The name. Maximum length is 255.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "team[created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "updated_at", "full_name": "team[updated_at]", "description": "\n

The updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "locked_at", "full_name": "team[locked_at]", "description": "\n

The locked at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "closed_at", "full_name": "team[closed_at]", "description": "\n

The closed at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "final_mark", "full_name": "team[final_mark]", "description": "\n

The final mark.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "repo_url", "full_name": "team[repo_url]", "description": "\n

The repo url.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "repo_uuid", "full_name": "team[repo_uuid]", "description": "\n

The repo uuid.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "deadline_at", "full_name": "team[deadline_at]", "description": "\n

The deadline at. Must be after today.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "terminating_at", "full_name": "team[terminating_at]", "description": "\n

The terminating at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_session_id", "full_name": "team[project_session_id]", "description": "\n

The project session id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "teams_users_attributes", "full_name": "team[teams_users_attributes]", "description": "\n

The teams users attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "user_id", "full_name": "team[teams_users_attributes][user_id]", "description": "\n

The user id. Must be unique in the scope of a given team.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "leader", "full_name": "team[teams_users_attributes][leader]", "description": "\n

Is it leader ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "validated", "full_name": "team[teams_users_attributes][validated]", "description": "\n

Is it validated ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "occurrence", "full_name": "team[teams_users_attributes][occurrence]", "description": "\n

The occurrence. Default to 0.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/teams/58", "versions": [ "2.0" ], "query": null, "request_data": { "team": { "origin_user_id": "125", "project_id": "5" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/teams/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/teams/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/teams/58", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/teams/reset_team_uploads", "name": "reset_team_uploads", "apis": [ { "api_url": "/v2/teams/:id/reset_team_uploads", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "authentication": "user", "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "teams_uploads": { "doc_url": "/apidoc/2.0/teams_uploads", "api_url": "/api", "name": "Teams uploads", "short_description": "An uploaded mark for a team, given by a bot (like the Moulinette), without any defence.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/teams_uploads/index", "name": "index", "apis": [ { "api_url": "/v2/teams/:team_id/teams_uploads", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/teams_uploads", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "team_id", "full_name": "team_id", "description": "\n

The team id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id asc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, team_id, upload_id, final_mark, comment, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "asc" }, "keys": [ "id", "team_id", "upload_id", "final_mark", "comment", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, team_id, upload_id, final_mark, comment, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "team_id", "upload_id", "final_mark", "comment", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, team_id, upload_id, final_mark, comment, created_at, updated_at.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "team_id", "upload_id", "final_mark", "comment", "created_at", "updated_at" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/teams_uploads", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 1, "final_mark": 55, "comment": "Fingerstache street 8-bit viral meditation banh mi xoxo keytar. Quinoa retro ugh organic kickstarter vegan loko disrupt. Cold-pressed keffiyeh retro.", "created_at": "2017-11-22T13:42:09.325Z", "upload_id": 1, "upload": { "id": 1, "evaluation_id": 2, "name": "Idaho kangaroos", "description": "", "created_at": "2017-11-22T13:41:26.168Z", "updated_at": "2017-11-22T13:42:09.328Z" } } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/teams_uploads/show", "name": "show", "apis": [ { "api_url": "/v2/teams_uploads/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/teams_uploads/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 1, "final_mark": 55, "comment": "Fingerstache street 8-bit viral meditation banh mi xoxo keytar. Quinoa retro ugh organic kickstarter vegan loko disrupt. Cold-pressed keffiyeh retro.", "created_at": "2017-11-22T13:42:09.325Z", "upload_id": 1, "upload": { "id": 1, "evaluation_id": 2, "name": "Idaho kangaroos", "description": "", "created_at": "2017-11-22T13:41:26.168Z", "updated_at": "2017-11-22T13:42:09.328Z" } }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/teams_uploads/create", "name": "create", "apis": [ { "api_url": "/v2/teams_uploads", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "teams_upload", "full_name": "teams_upload", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "team_id", "full_name": "teams_upload[team_id]", "description": "\n

The team id. Must be unique in the scope of a given upload.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "upload_id", "full_name": "teams_upload[upload_id]", "description": "\n

The upload id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "final_mark", "full_name": "teams_upload[final_mark]", "description": "\n

The final mark.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "comment", "full_name": "teams_upload[comment]", "description": "\n

The comment.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/teams_uploads", "versions": [ "2.0" ], "query": null, "request_data": { "teams_upload": { "comment": "The Other Side of Silence", "final_mark": "42", "team_id": "66", "upload_id": "1" } }, "response_data": { "id": 2, "final_mark": 42, "comment": "The Other Side of Silence", "created_at": "2017-11-22T13:44:07.389Z", "upload_id": 1, "upload": { "id": 1, "evaluation_id": 2, "name": "Idaho kangaroos", "description": "", "created_at": "2017-11-22T13:41:26.168Z", "updated_at": "2017-11-22T13:44:07.391Z" } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/teams_uploads/update", "name": "update", "apis": [ { "api_url": "/v2/teams_uploads/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/teams_uploads/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "teams_upload", "full_name": "teams_upload", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "team_id", "full_name": "teams_upload[team_id]", "description": "\n

The team id. Must be unique in the scope of a given upload.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "upload_id", "full_name": "teams_upload[upload_id]", "description": "\n

The upload id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "final_mark", "full_name": "teams_upload[final_mark]", "description": "\n

The final mark.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "comment", "full_name": "teams_upload[comment]", "description": "\n

The comment.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/teams_uploads/1", "versions": [ "2.0" ], "query": null, "request_data": { "teams_upload": { "comment": "The Other Side of Silence", "final_mark": "42", "team_id": "18", "upload_id": "1" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/teams_uploads/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/teams_uploads/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/teams_uploads/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/teams_uploads/multiple_create", "name": "multiple_create", "apis": [ { "api_url": "/v2/teams_uploads/multiple_create", "http_method": "POST", "short_description": "Create multiple teams uploads", "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "teams_uploads", "full_name": "teams_uploads", "description": "\n

An array of teams_uploads

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [] } ], "examples": [], "metadata": { "required_scopes": [ "projects" ], "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "teams_users": { "doc_url": "/apidoc/2.0/teams_users", "api_url": "/api", "name": "Teams users", "short_description": "Team composed of one User", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/teams_users/index", "name": "index", "apis": [ { "api_url": "/v2/teams_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/teams_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/teams/:team_id/teams_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "team_id", "full_name": "team_id", "description": "\n

The team id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, team_id, user_id, leader, validated, created_at, updated_at, occurrence.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "team_id", "user_id", "leader", "validated", "created_at", "updated_at", "occurrence" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, team_id, user_id, leader, validated, created_at, updated_at, occurrence.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "team_id", "user_id", "leader", "validated", "created_at", "updated_at", "occurrence" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, team_id, user_id, leader, validated, created_at, updated_at, occurrence.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "team_id", "user_id", "leader", "validated", "created_at", "updated_at", "occurrence" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/teams_users", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 68, "team_id": 68, "user_id": 125, "created_at": "2017-11-22T13:41:37.430Z", "validated": true, "leader": true, "occurrence": 0, "team": { "id": 68, "name": "sebulseb's group", "url": "https://api.intra.42.fr/v2/teams/68", "final_mark": null, "project_id": 1, "created_at": "2017-11-22T13:41:37.418Z", "updated_at": "2017-11-22T13:42:09.246Z", "status": "waiting_for_correction", "terminating_at": null, "users": [ { "id": 125, "login": "sebulseb", "url": "https://api.intra.42.fr/v2/users/sebulseb", "leader": true, "occurrence": 0, "validated": true, "projects_user_id": 68 } ], "locked?": true, "validated?": null, "closed?": true, "repo_url": null, "repo_uuid": "intra-uuid-5af5ca8d-e0dc-4791-9cfc-ed657e1984e0-68", "locked_at": "2017-11-22T13:41:37.471Z", "closed_at": "2017-11-22T13:41:37.496Z", "project_session_id": 1 }, "user": { "id": 125, "login": "sebulseb", "url": "https://api.intra.42.fr/v2/users/sebulseb" } }, { "id": 67, "team_id": 67, "user_id": 119, "created_at": "2017-11-22T13:41:37.310Z", "validated": true, "leader": true, "occurrence": 0, "team": { "id": 67, "name": "hasolo's group", "url": "https://api.intra.42.fr/v2/teams/67", "final_mark": null, "project_id": 1, "created_at": "2017-11-22T13:41:37.298Z", "updated_at": "2017-11-22T13:41:37.386Z", "status": "waiting_for_correction", "terminating_at": null, "users": [ { "id": 119, "login": "hasolo", "url": "https://api.intra.42.fr/v2/users/hasolo", "leader": true, "occurrence": 0, "validated": true, "projects_user_id": 67 } ], "locked?": true, "validated?": null, "closed?": true, "repo_url": null, "repo_uuid": "intra-uuid-4c9b8f90-9b63-4b8a-b919-4e0d664544c2-67", "locked_at": "2017-11-22T13:41:37.358Z", "closed_at": "2017-11-22T13:41:37.385Z", "project_session_id": 1 }, "user": { "id": 119, "login": "hasolo", "url": "https://api.intra.42.fr/v2/users/hasolo" } }, { "id": 66, "team_id": 66, "user_id": 118, "created_at": "2017-11-22T13:41:37.187Z", "validated": true, "leader": true, "occurrence": 0, "team": { "id": 66, "name": "jarbink2's group", "url": "https://api.intra.42.fr/v2/teams/66", "final_mark": null, "project_id": 1, "created_at": "2017-11-22T13:41:37.174Z", "updated_at": "2017-11-22T13:41:37.263Z", "status": "waiting_for_correction", "terminating_at": null, "users": [ { "id": 118, "login": "padamida", "url": "https://api.intra.42.fr/v2/users/padamida", "leader": true, "occurrence": 0, "validated": true, "projects_user_id": 66 } ], "locked?": true, "validated?": null, "closed?": true, "repo_url": null, "repo_uuid": "intra-uuid-5f077c0e-351b-4d77-8334-dac656e42798-66", "locked_at": "2017-11-22T13:41:37.238Z", "closed_at": "2017-11-22T13:41:37.262Z", "project_session_id": 1 }, "user": { "id": 118, "login": "jarbink2", "url": "https://api.intra.42.fr/v2/users/jarbink2" } } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/teams_users/show", "name": "show", "apis": [ { "api_url": "/v2/teams_users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Return the team_user specified by the :id parameter

\n", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/teams_users/3", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 3, "team_id": 3, "user_id": 108, "created_at": "2017-11-22T13:41:28.680Z", "validated": true, "leader": true, "occurrence": 0, "team": { "id": 3, "name": "podamer2's group", "url": "https://api.intra.42.fr/v2/teams/3", "final_mark": null, "project_id": 5, "created_at": "2017-11-22T13:41:28.661Z", "updated_at": "2017-11-22T13:41:28.704Z", "status": "creating_group", "terminating_at": null, "users": [ { "id": 108, "login": "podamer2", "url": "https://api.intra.42.fr/v2/users/podamer2", "leader": true, "occurrence": 0, "validated": true, "projects_user_id": 3 } ], "locked?": false, "validated?": null, "closed?": false, "repo_url": null, "repo_uuid": "intra-uuid-d6aded82-d02e-4597-a33a-acd2544ec015-3", "locked_at": null, "closed_at": null, "project_session_id": 5 }, "user": { "id": 108, "login": "podamer2", "url": "https://api.intra.42.fr/v2/users/podamer2" } }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/teams_users/create", "name": "create", "apis": [ { "api_url": "/v2/teams_users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "teams_user", "full_name": "teams_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "team_id", "full_name": "teams_user[team_id]", "description": "\n

The team id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "teams_user[user_id]", "description": "\n

The user id. Must be unique in the scope of a given team.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "leader", "full_name": "teams_user[leader]", "description": "\n

Is it leader ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "validated", "full_name": "teams_user[validated]", "description": "\n

Is it validated ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "occurrence", "full_name": "teams_user[occurrence]", "description": "\n

The occurrence. Default to 0.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/teams_users", "versions": [ "2.0" ], "query": null, "request_data": { "teams_user": { "leader": "false", "occurrence": "1", "team_id": "68", "user_id": "126", "validated": "false" } }, "response_data": { "id": 71, "team_id": 68, "user_id": 126, "created_at": "2017-11-22T13:44:08.492Z", "validated": false, "leader": false, "occurrence": 0, "team": { "id": 68, "name": "sebulseb's group", "url": "https://api.intra.42.fr/v2/teams/68", "final_mark": null, "project_id": 1, "created_at": "2017-11-22T13:41:37.418Z", "updated_at": "2017-11-22T13:44:08.496Z", "status": "waiting_for_correction", "terminating_at": null, "users": [ { "id": 125, "login": "sebulseb", "url": "https://api.intra.42.fr/v2/users/sebulseb", "leader": true, "occurrence": 0, "validated": true, "projects_user_id": 68 }, { "id": 126, "login": "anakskyw", "url": "https://api.intra.42.fr/v2/users/anakskyw", "leader": false, "occurrence": 0, "validated": false, "projects_user_id": 70 } ], "locked?": true, "validated?": null, "closed?": true, "repo_url": null, "repo_uuid": "intra-uuid-5af5ca8d-e0dc-4791-9cfc-ed657e1984e0-68", "locked_at": "2017-11-22T13:41:37.471Z", "closed_at": "2017-11-22T13:41:37.496Z", "project_session_id": 1 }, "user": { "id": 126, "login": "darthcae", "url": "https://api.intra.42.fr/v2/users/darthcae" } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/teams_users/update", "name": "update", "apis": [ { "api_url": "/v2/teams_users/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/teams_users/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "teams_user", "full_name": "teams_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "team_id", "full_name": "teams_user[team_id]", "description": "\n

The team id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "teams_user[user_id]", "description": "\n

The user id. Must be unique in the scope of a given team.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "leader", "full_name": "teams_user[leader]", "description": "\n

Is it leader ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "validated", "full_name": "teams_user[validated]", "description": "\n

Is it validated ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "occurrence", "full_name": "teams_user[occurrence]", "description": "\n

The occurrence. Default to 0.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/teams_users/3", "versions": [ "2.0" ], "query": null, "request_data": { "teams_user": { "leader": "false", "occurrence": "1", "team_id": "68", "user_id": "126", "validated": "false" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/teams_users/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/teams_users/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/teams_users/3", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "titles": { "doc_url": "/apidoc/2.0/titles", "api_url": "/api", "name": "Titles", "short_description": "Titles a user can obtain, generally through achievements. It will be displayed on their profile and on the forum.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/titles/index", "name": "index", "apis": [ { "api_url": "/v2/titles", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/titles", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/titles/show", "name": "show", "apis": [ { "api_url": "/v2/titles/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/titles/create", "name": "create", "apis": [ { "api_url": "/v2/titles", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "title", "full_name": "title", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "title[name]", "description": "\n

The name.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/titles/update", "name": "update", "apis": [ { "api_url": "/v2/titles/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/titles/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "title", "full_name": "title", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "name", "full_name": "title[name]", "description": "\n

The name.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/titles/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/titles/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "titles_users": { "doc_url": "/apidoc/2.0/titles_users", "api_url": "/api", "name": "Titles users", "short_description": "Users who have a title.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/titles_users/index", "name": "index", "apis": [ { "api_url": "/v2/titles/:title_id/titles_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/titles_users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/titles_users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "title_id", "full_name": "title_id", "description": "\n

The title id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/titles_users/show", "name": "show", "apis": [ { "api_url": "/v2/titles_users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/titles_users/create", "name": "create", "apis": [ { "api_url": "/v2/titles_users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "titles_user", "full_name": "titles_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "title_id", "full_name": "titles_user[title_id]", "description": "\n

The title id. Must be unique in the scope of a given user.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "titles_user[user_id]", "description": "\n

The user id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/titles_users/update", "name": "update", "apis": [ { "api_url": "/v2/titles_users/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/titles_users/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "titles_user", "full_name": "titles_user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "title_id", "full_name": "titles_user[title_id]", "description": "\n

The title id. Must be unique in the scope of a given user.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "titles_user[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/titles_users/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/titles_users/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "transactions": { "doc_url": "/apidoc/2.0/transactions", "api_url": "/api", "name": "Transactions", "short_description": "Transaction represents Altarian Dollars earned.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/transactions/index", "name": "index", "apis": [ { "api_url": "/v2/transactions", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/transactions", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, value, user_id, transactable_id, transactable_type, created_at, reason.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "value", "user_id", "transactable_id", "transactable_type", "created_at", "reason" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, value, user_id, transactable_id, transactable_type, created_at, reason.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "value", "user_id", "transactable_id", "transactable_type", "created_at", "reason" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/transactions", "versions": [ "2.0" ], "query": "page=1", "request_data": null, "response_data": [ { "id": 1, "value": 150, "user_id": 22, "transactable_id": 81, "transactable_type": "Achievement", "reason": "Mathieu c'est le plus fort \u2665\ufe0f", "user": { "id": 22, "login": "mathieu", "url": "https://api.intra.42.fr/v2/users/mathieu" } }, { "id": 2, "value": 666, "user_id": 123, "transactable_id": 186, "transactable_type": "Event", "reason": "R\u00e9union entre d\u00e9mons.", "user": { "id": 123, "login": "jeanne", "url": "https://api.intra.42.fr/v2/users/jeanne" } }, { "id": 2, "value": 1, "user_id": 12837, "transactable_id": null, "transactable_type": "Tuteur api", "reason": "Exam C 24 janvier", "user": { "id": 12837, "login": "jbailhac", "url": "https://api.intra.42.fr/v2/users/jbailhac" } } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "student_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/transactions/show", "name": "show", "apis": [ { "api_url": "/v2/transactions/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/transactions/1", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 1, "value": 150, "user_id": 22, "transactable_id": 81, "transactable_type": "Achievement", "reason": "Mathieu c'est le plus fort \u2665\ufe0f", "user": { "id": 22, "login": "mathieu", "url": "https://api.intra.42.fr/v2/users/mathieu" } }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "student_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/transactions/create", "name": "create", "apis": [ { "api_url": "/v2/transactions", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "transaction", "full_name": "transaction", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "transaction[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "transaction[value]", "description": "\n

The value.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "transaction[user_id]", "description": "\n

The user id. Must be unique in the scope of a given transactable type and transactable.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "transactable_id", "full_name": "transaction[transactable_id]", "description": "\n

The transactable id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "transactable_type", "full_name": "transaction[transactable_type]", "description": "\n

The transactable type.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "reason", "full_name": "transaction[reason]", "description": "\n

The reason.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/transactions", "versions": [ "2.0" ], "query": "", "request_data": { "transaction": { "value": 5, "user_id": 123, "transactable_type": "Tuteur api", "reason": "cadeau" } }, "response_data": { "id": 6, "value": 5, "user_id": 123, "transactable_id": null, "transactable_type": "Tuteur api", "reason": "cadeau", "user": { "id": 123, "login": "jeanne", "url": "https://api.intra.42.fr/v2/users/jeanne" } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "student_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/transactions/update", "name": "update", "apis": [], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "transaction", "full_name": "transaction", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "transaction[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "value", "full_name": "transaction[value]", "description": "\n

The value.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "transaction[user_id]", "description": "\n

The user id. Must be unique in the scope of a given transactable type and transactable.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "transactable_id", "full_name": "transaction[transactable_id]", "description": "\n

The transactable id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "transactable_type", "full_name": "transaction[transactable_type]", "description": "\n

The transactable type.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "reason", "full_name": "transaction[reason]", "description": "\n

The reason.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "roles": [ "student_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/transactions/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/transactions/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "student_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "translations": { "doc_url": "/apidoc/2.0/translations", "api_url": "/api", "name": "Translations", "short_description": "Translations", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/translations/index", "name": "index", "apis": [ { "api_url": "/v2/translations", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, translatable_id, translatable_type, language_id, fields, created_at, updated_at, user_id, default, up_to_date, translations_structure_id.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "translatable_id", "translatable_type", "language_id", "fields", "created_at", "updated_at", "user_id", "default", "up_to_date", "translations_structure_id" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/translations", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 1, "translatable_id": 1, "translatable_type": "Tag", "language_id": 2, "fields": { "name": "Joburg-Final-Exam", "description": null }, "created_at": "2017-11-22T13:40:59.699Z", "updated_at": "2017-11-22T13:40:59.716Z", "user_id": null, "default": true, "up_to_date": true, "translations_structure_id": 11, "translations_structure": { "id": 11, "searchable_by": [ "name" ], "identified_by": [ "name" ], "structures_kind": "simple", "up_to_date": true, "fields_organisation": { "name": "string", "description": "text" }, "type_name": "Tag", "created_at": "2017-11-22T13:40:59.444Z", "updated_at": "2017-11-22T13:40:59.444Z" } }, { "id": 2, "translatable_id": 2, "translatable_type": "Tag", "language_id": 2, "fields": { "name": "Friends with Benefits", "description": null }, "created_at": "2017-11-22T13:40:59.747Z", "updated_at": "2017-11-22T13:40:59.759Z", "user_id": null, "default": true, "up_to_date": true, "translations_structure_id": 11, "translations_structure": { "id": 11, "searchable_by": [ "name" ], "identified_by": [ "name" ], "structures_kind": "simple", "up_to_date": true, "fields_organisation": { "name": "string", "description": "text" }, "type_name": "Tag", "created_at": "2017-11-22T13:40:59.444Z", "updated_at": "2017-11-22T13:40:59.444Z" } }, { "id": 3, "translatable_id": 3, "translatable_type": "Tag", "language_id": 2, "fields": { "name": "GBmu", "description": null }, "created_at": "2017-11-22T13:40:59.783Z", "updated_at": "2017-11-22T13:40:59.795Z", "user_id": null, "default": true, "up_to_date": true, "translations_structure_id": 11, "translations_structure": { "id": 11, "searchable_by": [ "name" ], "identified_by": [ "name" ], "structures_kind": "simple", "up_to_date": true, "fields_organisation": { "name": "string", "description": "text" }, "type_name": "Tag", "created_at": "2017-11-22T13:40:59.444Z", "updated_at": "2017-11-22T13:40:59.444Z" } } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30 }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/translations/show", "name": "show", "apis": [ { "api_url": "/v2/translations/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/translations/3", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 3, "translatable_id": 3, "translatable_type": "Tag", "language_id": 2, "fields": { "name": "GBmu", "description": null }, "created_at": "2017-11-22T13:40:59.783Z", "updated_at": "2017-11-22T13:40:59.795Z", "user_id": null, "default": true, "up_to_date": true, "translations_structure_id": 11, "translations_structure": { "id": 11, "searchable_by": [ "name" ], "identified_by": [ "name" ], "structures_kind": "simple", "up_to_date": true, "fields_organisation": { "name": "string", "description": "text" }, "type_name": "Tag", "created_at": "2017-11-22T13:40:59.444Z", "updated_at": "2017-11-22T13:40:59.444Z" } }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/translations/create", "name": "create", "apis": [ { "api_url": "/v2/translations", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "translation", "full_name": "translation", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "translation[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "translatable_id", "full_name": "translation[translatable_id]", "description": "\n

The translatable id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "translatable_type", "full_name": "translation[translatable_type]", "description": "\n

The translatable type.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language_id", "full_name": "translation[language_id]", "description": "\n

The language id. Must be unique in the scope of a given translatable type and translatable.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "fields", "full_name": "translation[fields]", "description": "\n

The fields.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "translation[created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "updated_at", "full_name": "translation[updated_at]", "description": "\n

The updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "translation[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "default", "full_name": "translation[default]", "description": "\n

Is it default ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "up_to_date", "full_name": "translation[up_to_date]", "description": "\n

Is it up to date ? Default to true.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "translations_structure_id", "full_name": "translation[translations_structure_id]", "description": "\n

The translations structure id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "file", "full_name": "translation[file]", "description": "\n

The file.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/translations", "versions": [ "2.0" ], "query": null, "request_data": { "translation": { "fields": "{\"description\":\"You passed the Piscine test. Welcome to 42!\"}", "language_id": "3", "translatable_id": "1", "translatable_type": "Achievement" } }, "response_data": { "id": 99, "translatable_id": 1, "translatable_type": "Achievement", "language_id": 3, "fields": "{\"description\":\"You passed the Piscine test. Welcome to 42!\"}", "created_at": "2017-11-22T13:44:17.382Z", "updated_at": "2017-11-22T13:44:17.382Z", "user_id": null, "default": false, "up_to_date": true, "translations_structure_id": 6, "translations_structure": { "id": 6, "searchable_by": [ "name" ], "identified_by": [ "name" ], "structures_kind": "simple", "up_to_date": true, "fields_organisation": { "name": "string", "description": "string" }, "type_name": "Achievement", "created_at": "2017-11-22T13:40:59.398Z", "updated_at": "2017-11-22T13:40:59.398Z" } }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "translater" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/translations/update", "name": "update", "apis": [ { "api_url": "/v2/translations/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/translations/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "translation", "full_name": "translation", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "translation[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "translatable_id", "full_name": "translation[translatable_id]", "description": "\n

The translatable id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "translatable_type", "full_name": "translation[translatable_type]", "description": "\n

The translatable type.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language_id", "full_name": "translation[language_id]", "description": "\n

The language id. Must be unique in the scope of a given translatable type and translatable.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "fields", "full_name": "translation[fields]", "description": "\n

The fields.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "created_at", "full_name": "translation[created_at]", "description": "\n

The created at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "updated_at", "full_name": "translation[updated_at]", "description": "\n

The updated at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "translation[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "default", "full_name": "translation[default]", "description": "\n

Is it default ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "up_to_date", "full_name": "translation[up_to_date]", "description": "\n

Is it up to date ? Default to true.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "translations_structure_id", "full_name": "translation[translations_structure_id]", "description": "\n

The translations structure id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "file", "full_name": "translation[file]", "description": "\n

The file.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/translations/3", "versions": [ "2.0" ], "query": null, "request_data": { "translation": { "fields": "{\"description\":\"You passed the Piscine test. Welcome to 42!\"}", "language_id": "1", "translatable_id": "1", "translatable_type": "Achievement" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "translater" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/translations/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/translations/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/translations/3", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "translater" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/translations/upload", "name": "upload", "apis": [ { "api_url": "/v2/translations/upload", "http_method": "POST", "short_description": "Upload a file translation", "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "file", "full_name": "file", "description": "\n

yml or json

\n", "required": true, "allow_nil": false, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "translater" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "user_candidatures": { "doc_url": "/apidoc/2.0/user_candidatures", "api_url": "/api", "name": "User candidatures", "short_description": "The candidature of an user", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/user_candidatures/index", "name": "index", "apis": [ { "api_url": "/v2/user_candidatures", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at desc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, birth_date, gender, zip_code, country, birth_city, birth_country, postal_street, postal_complement, postal_city, postal_zip_code, postal_country, contact_affiliation, contact_last_name, contact_first_name, contact_phone1, contact_phone2, max_level_memory, max_level_logic, other_information, language, meeting_date, piscine_date, created_at, updated_at, phone, email, pin, phone_country_code, hidden_phone.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "desc", "id": "desc" }, "keys": [ "id", "user_id", "birth_date", "gender", "zip_code", "country", "birth_city", "birth_country", "postal_street", "postal_complement", "postal_city", "postal_zip_code", "postal_country", "contact_affiliation", "contact_last_name", "contact_first_name", "contact_phone1", "contact_phone2", "max_level_memory", "max_level_logic", "other_information", "language", "meeting_date", "piscine_date", "created_at", "updated_at", "phone", "email", "pin", "phone_country_code", "hidden_phone" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, birth_date, gender, country, birth_country, postal_country, piscine_date, email.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "user_id", "birth_date", "gender", "country", "birth_country", "postal_country", "piscine_date", "email" ], "additional": { "email": { "proc": {}, "all": [], "description": "" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, user_id, birth_date, gender, country, birth_country, postal_country, piscine_date.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "user_id", "birth_date", "gender", "country", "birth_country", "postal_country", "piscine_date" ], "values": [] } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/user_candidatures/show", "name": "show", "apis": [ { "api_url": "/v2/users/:user_id/user_candidature", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/user_candidatures/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/user_candidatures/23", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 23, "user_id": 23, "birth_date": "1993-05-04", "gender": "male", "zip_code": "71800-2563", "country": "Kashyyyk", "birth_city": "East Rosieland", "birth_country": "Kamino", "postal_street": "11747 Jerod Drives", "postal_complement": null, "postal_city": "Keagantown", "postal_zip_code": null, "postal_country": null, "contact_affiliation": null, "contact_last_name": null, "contact_first_name": null, "contact_phone1": null, "contact_phone2": null, "max_level_memory": null, "max_level_logic": null, "other_information": null, "language": null, "meeting_date": null, "piscine_date": null, "created_at": "2017-11-22T13:41:06.408Z", "updated_at": "2017-11-22T13:41:06.408Z", "phone": null, "email": "chewbacca@braunleuschke.biz", "pin": null, "phone_country_code": null, "hidden_phone": null }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "basic_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/user_candidatures/create", "name": "create", "apis": [ { "api_url": "/v2/users/:user_id/user_candidature", "http_method": "POST", "short_description": null, "deprecated": null }, { "api_url": "/v2/user_candidatures", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_candidature", "full_name": "user_candidature", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "user_candidature[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_candidature[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "birth_date", "full_name": "user_candidature[birth_date]", "description": "\n

The birth date.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "gender", "full_name": "user_candidature[gender]", "description": "\n

The gender.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "zip_code", "full_name": "user_candidature[zip_code]", "description": "\n

The zip code.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "country", "full_name": "user_candidature[country]", "description": "\n

The country.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "phone_country_code", "full_name": "user_candidature[phone_country_code]", "description": "\n

The phone country code.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: AD, AE, AF, AG, AI, AL, AM, AN, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW, .", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "birth_city", "full_name": "user_candidature[birth_city]", "description": "\n

The birth city.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "birth_country", "full_name": "user_candidature[birth_country]", "description": "\n

The birth country.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_street", "full_name": "user_candidature[postal_street]", "description": "\n

The postal street.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_complement", "full_name": "user_candidature[postal_complement]", "description": "\n

The postal complement.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_city", "full_name": "user_candidature[postal_city]", "description": "\n

The postal city.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_zip_code", "full_name": "user_candidature[postal_zip_code]", "description": "\n

The postal zip code.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "email", "full_name": "user_candidature[email]", "description": "\n

The email.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_country", "full_name": "user_candidature[postal_country]", "description": "\n

The postal country.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_affiliation", "full_name": "user_candidature[contact_affiliation]", "description": "\n

The contact affiliation.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_last_name", "full_name": "user_candidature[contact_last_name]", "description": "\n

The contact last name.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_first_name", "full_name": "user_candidature[contact_first_name]", "description": "\n

The contact first name.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_phone1", "full_name": "user_candidature[contact_phone1]", "description": "\n

The contact phone1.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_phone2", "full_name": "user_candidature[contact_phone2]", "description": "\n

The contact phone2.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "max_level_memory", "full_name": "user_candidature[max_level_memory]", "description": "\n

The max level memory.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "max_level_logic", "full_name": "user_candidature[max_level_logic]", "description": "\n

The max level logic.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "other_information", "full_name": "user_candidature[other_information]", "description": "\n

The other information.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language", "full_name": "user_candidature[language]", "description": "\n

The language.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "meeting_date", "full_name": "user_candidature[meeting_date]", "description": "\n

The meeting date.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "piscine_date", "full_name": "user_candidature[piscine_date]", "description": "\n

The piscine date.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "pin", "full_name": "user_candidature[pin]", "description": "\n

The pin.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "phone", "full_name": "user_candidature[phone]", "description": "\n

The phone.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/user_candidatures", "versions": [ "2.0" ], "query": null, "request_data": { "user_candidature": { "birth_city": "West Stefanieburgh", "birth_country": "Burkina Faso", "birth_date": "1989-01-30", "contact_affiliation": "other", "contact_first_name": "Barton", "contact_last_name": "Mertz", "contact_phone1": "0695847362", "contact_phone2": "0491314200", "country": "Honduras", "gender": "female", "language": "", "max_level_logic": "2", "max_level_memory": "1", "meeting_date": "2017-07-11", "other_information": "3", "pin": "4242", "piscine_date": "2017-11-15", "postal_city": "Tillmanton", "postal_complement": "", "postal_country": "Georgia", "postal_street": "5030 Serenity Plaza", "postal_zip_code": "65440", "user_id": "9", "zip_code": "37528-3874" } }, "response_data": { "id": 127, "user_id": 9, "birth_date": "1989-01-30", "gender": "female", "zip_code": "37528-3874", "country": "Honduras", "birth_city": "West Stefanieburgh", "birth_country": "Burkina Faso", "postal_street": "5030 Serenity Plaza", "postal_complement": "", "postal_city": "Tillmanton", "postal_zip_code": "65440", "postal_country": "Georgia", "contact_affiliation": "other", "contact_last_name": "Mertz", "contact_first_name": "Barton", "contact_phone1": "0695847362", "contact_phone2": "0491314200", "max_level_memory": 1, "max_level_logic": 2, "other_information": "3", "language": "", "meeting_date": "2017-07-11T00:00:00.000Z", "piscine_date": "2017-11-15", "created_at": "2017-11-22T13:44:17.725Z", "updated_at": "2017-11-22T13:44:17.725Z", "phone": null, "email": null, "pin": "4242", "phone_country_code": null, "hidden_phone": null }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_staff", "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/user_candidatures/update", "name": "update", "apis": [ { "api_url": "/v2/users/:user_id/user_candidature", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:user_id/user_candidature", "http_method": "PUT", "short_description": null, "deprecated": null }, { "api_url": "/v2/user_candidatures/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/user_candidatures/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "user_id", "full_name": "user_id", "description": "\n

The user id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_candidature", "full_name": "user_candidature", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "user_candidature[id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user_candidature[user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "birth_date", "full_name": "user_candidature[birth_date]", "description": "\n

The birth date.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "gender", "full_name": "user_candidature[gender]", "description": "\n

The gender.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "zip_code", "full_name": "user_candidature[zip_code]", "description": "\n

The zip code.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "country", "full_name": "user_candidature[country]", "description": "\n

The country.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "phone_country_code", "full_name": "user_candidature[phone_country_code]", "description": "\n

The phone country code.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: AD, AE, AF, AG, AI, AL, AM, AN, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW, .", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "birth_city", "full_name": "user_candidature[birth_city]", "description": "\n

The birth city.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "birth_country", "full_name": "user_candidature[birth_country]", "description": "\n

The birth country.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_street", "full_name": "user_candidature[postal_street]", "description": "\n

The postal street.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_complement", "full_name": "user_candidature[postal_complement]", "description": "\n

The postal complement.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_city", "full_name": "user_candidature[postal_city]", "description": "\n

The postal city.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_zip_code", "full_name": "user_candidature[postal_zip_code]", "description": "\n

The postal zip code.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "email", "full_name": "user_candidature[email]", "description": "\n

The email.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_country", "full_name": "user_candidature[postal_country]", "description": "\n

The postal country.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_affiliation", "full_name": "user_candidature[contact_affiliation]", "description": "\n

The contact affiliation.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_last_name", "full_name": "user_candidature[contact_last_name]", "description": "\n

The contact last name.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_first_name", "full_name": "user_candidature[contact_first_name]", "description": "\n

The contact first name.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_phone1", "full_name": "user_candidature[contact_phone1]", "description": "\n

The contact phone1.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_phone2", "full_name": "user_candidature[contact_phone2]", "description": "\n

The contact phone2.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "max_level_memory", "full_name": "user_candidature[max_level_memory]", "description": "\n

The max level memory.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "max_level_logic", "full_name": "user_candidature[max_level_logic]", "description": "\n

The max level logic.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "other_information", "full_name": "user_candidature[other_information]", "description": "\n

The other information.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language", "full_name": "user_candidature[language]", "description": "\n

The language.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "meeting_date", "full_name": "user_candidature[meeting_date]", "description": "\n

The meeting date.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "piscine_date", "full_name": "user_candidature[piscine_date]", "description": "\n

The piscine date.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "pin", "full_name": "user_candidature[pin]", "description": "\n

The pin.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "phone", "full_name": "user_candidature[phone]", "description": "\n

The phone.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/user_candidatures/23", "versions": [ "2.0" ], "query": null, "request_data": { "user_candidature": { "birth_city": "Port Gonzalo", "birth_country": "Iceland", "birth_date": "1992-02-29", "contact_affiliation": "parent", "contact_first_name": "Lily", "contact_last_name": "Buckridge", "contact_phone1": "0695847362", "contact_phone2": "0491314200", "country": "Antarctica (the territory South of 60 deg S)", "gender": "female", "language": "", "max_level_logic": "2", "max_level_memory": "1", "meeting_date": "2017-01-06", "other_information": "3", "pin": "4242", "piscine_date": "2017-11-06", "postal_city": "Lake Montana", "postal_complement": "", "postal_country": "Lao People's Democratic Republic", "postal_street": "7646 Constantin Green", "postal_zip_code": "19921", "user_id": "46", "zip_code": "91297" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_staff", "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/user_candidatures/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/user_candidatures/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/user_candidatures/23", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_staff", "advanced_tutor" ] }, "see": [], "headers": [], "show": true } ], "headers": [] }, "users": { "doc_url": "/apidoc/2.0/users", "api_url": "/api", "name": "Users", "short_description": "A 42 student, staff, or any entity with a 42 account.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/users/graph", "name": "graph", "apis": [ { "api_url": "/v2/users/graph(/on/:field(/by/:interval))", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

Count all occurences on a particular field (default on created_at) by a particular period, starting from the first occurence to now.

\n", "errors": [], "params": [ { "name": "field", "full_name": "field", "description": "\n

The date field to graph on. Default to created_at.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: created_at, updated_at.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "interval", "full_name": "interval", "description": "\n

The interval to graph by. Default to month_of_year.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: day, week, month, quarter, year, hour_of_day, day_of_week, day_of_month, month_of_year.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, login, email, encrypted_password, reset_password_token, reset_password_sent_at, created_at, updated_at, image, first_name, last_name, pool_year, pool_month, kind, status, otp_secret_key, otp_tmp, otp_activated, otp_backup_passwords, slack_team, slack_login, slack_mail, slack_code_validation, slack_validated_at, token_id, email_stop, linked_user_id, usual_first_name, last_seen_at, password_changed_at, encrypted_single_usage_password.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "login", "email", "encrypted_password", "reset_password_token", "reset_password_sent_at", "created_at", "updated_at", "image", "first_name", "last_name", "pool_year", "pool_month", "kind", "status", "otp_secret_key", "otp_tmp", "otp_activated", "otp_backup_passwords", "slack_team", "slack_login", "slack_mail", "slack_code_validation", "slack_validated_at", "token_id", "email_stop", "linked_user_id", "usual_first_name", "last_seen_at", "password_changed_at", "encrypted_single_usage_password" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, login, email, created_at, updated_at, pool_year, pool_month, kind, status, primary_campus_id, first_name, last_name, staff?.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "login", "email", "created_at", "updated_at", "pool_year", "pool_month", "kind", "status", "primary_campus_id", "first_name", "last_name", "staff?" ], "additional": { "primary_campus_id": { "proc": {}, "all": [], "description": "" }, "first_name": { "proc": {}, "all": [], "description": "" }, "last_name": { "proc": {}, "all": [], "description": "" }, "staff?": { "proc": {}, "all": [], "description": "" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, login, email, created_at, updated_at, pool_year, pool_month, kind, status.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "login", "email", "created_at", "updated_at", "pool_year", "pool_month", "kind", "status" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/users/graph/on/created_at/by/day", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "2017-11-22": 126 }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/users/add_correction_point", "name": "add_correction_point", "apis": [ { "api_url": "/v2/users/:id/correction_points/add", "http_method": "POST", "short_description": "Add an evaluation point", "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The user login

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "reason", "full_name": "reason", "description": "\n

The reason of this evaluation point addition

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "amount", "full_name": "amount", "description": "\n

The amount you want to add, if not specified it will add 1 point

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/users/remove_correction_point", "name": "remove_correction_point", "apis": [ { "api_url": "/v2/users/:id/correction_points/remove", "http_method": "DELETE", "short_description": "Remove a evaluation point", "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The user login

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "reason", "full_name": "reason", "description": "\n

The reason of this evaluation point removal

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "amount", "full_name": "amount", "description": "\n

The amount you want to remove, if not specified it will remove 1 point

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/users/exam", "name": "exam", "apis": [ { "api_url": "/v2/users/:id/exam", "http_method": "GET", "short_description": "Show the exam status for the requested user", "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [], "examples": [], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/users/index", "name": "index", "apis": [ { "api_url": "/v2/coalitions/:coalition_id/users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/dashes/:dash_id/users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/events/:event_id/users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/accreditations/:accreditation_id/users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/teams/:team_id/users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/projects/:project_id/users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/partnerships/:partnership_id/users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/expertises/:expertise_id/users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/cursus/:cursus_id/users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/campus/:campus_id/users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/achievements/:achievement_id/users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/titles/:title_id/users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/quests/:quest_id/users", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/groups/:group_id/users", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "coalition_id", "full_name": "coalition_id", "description": "\n

The coalition id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "dash_id", "full_name": "dash_id", "description": "\n

The dash id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "event_id", "full_name": "event_id", "description": "\n

The event id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "accreditation_id", "full_name": "accreditation_id", "description": "\n

The accreditation id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "team_id", "full_name": "team_id", "description": "\n

The team id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "project_id", "full_name": "project_id", "description": "\n

The project id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "partnership_id", "full_name": "partnership_id", "description": "\n

The partnership id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "expertise_id", "full_name": "expertise_id", "description": "\n

The expertise id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "cursus_id", "description": "\n

The cursus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "campus_id", "description": "\n

The campus id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "achievement_id", "full_name": "achievement_id", "description": "\n

The achievement id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "title_id", "full_name": "title_id", "description": "\n

The title id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "quest_id", "full_name": "quest_id", "description": "\n

The quest id or slug

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "group_id", "full_name": "group_id", "description": "\n

The group id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, login, email, encrypted_password, reset_password_token, reset_password_sent_at, created_at, updated_at, image, first_name, last_name, pool_year, pool_month, kind, status, otp_secret_key, otp_tmp, otp_activated, otp_backup_passwords, slack_team, slack_login, slack_mail, slack_code_validation, slack_validated_at, token_id, email_stop, linked_user_id, usual_first_name, last_seen_at, password_changed_at, encrypted_single_usage_password.", "expected_type": "string", "metadata": { "sort": { "default": { "id": "desc" }, "keys": [ "id", "login", "email", "encrypted_password", "reset_password_token", "reset_password_sent_at", "created_at", "updated_at", "image", "first_name", "last_name", "pool_year", "pool_month", "kind", "status", "otp_secret_key", "otp_tmp", "otp_activated", "otp_backup_passwords", "slack_team", "slack_login", "slack_mail", "slack_code_validation", "slack_validated_at", "token_id", "email_stop", "linked_user_id", "usual_first_name", "last_seen_at", "password_changed_at", "encrypted_single_usage_password" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, login, email, created_at, updated_at, pool_year, pool_month, kind, status, primary_campus_id, first_name, last_name, staff?.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "login", "email", "created_at", "updated_at", "pool_year", "pool_month", "kind", "status", "primary_campus_id", "first_name", "last_name", "staff?" ], "additional": { "primary_campus_id": { "proc": {}, "all": [], "description": "" }, "first_name": { "proc": {}, "all": [], "description": "" }, "last_name": { "proc": {}, "all": [], "description": "" }, "staff?": { "proc": {}, "all": [], "description": "" } } } }, "show": true, "validations": [] }, { "name": "range", "full_name": "range", "description": "\n

Select on a particular range

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, login, email, created_at, updated_at, pool_year, pool_month, kind, status.", "expected_type": "string", "metadata": { "range": { "keys": [ "id", "login", "email", "created_at", "updated_at", "pool_year", "pool_month", "kind", "status" ], "values": [] } }, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/users", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "id": 126, "login": "darthcae", "url": "https://api.intra.42.fr/v2/users/darthcae" }, { "id": 125, "login": "sebulseb", "url": "https://api.intra.42.fr/v2/users/sebulseb" }, { "id": 124, "login": "hsolo2", "url": "https://api.intra.42.fr/v2/users/hsolo2" } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/users/show", "name": "show", "apis": [ { "api_url": "/v2/users/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/users/2", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 2, "email": "andre@42.fr", "login": "andre", "first_name": "Andr\u00e9", "last_name": "Aubin", "usual_first_name": "Juliette", "url": "https://api.intra.42.fr/v2/users/andre", "phone": null, "displayname": "Andr\u00e9 Aubin", "usual_full_name": "Juliette Aubin", "image_url": "https://cdn.intra.42.fr/images/default.png", "staff?": false, "correction_point": 4, "pool_month": "july", "pool_year": "2016", "location": null, "wallet": 0, "anonymize_date": "2021-02-20T00:00:00.000+03:00", "groups": [], "cursus_users": [ { "id": 2, "begin_at": "2017-05-14T21:37:50.172Z", "end_at": null, "grade": null, "level": 0.0, "skills": [], "cursus_id": 1, "has_coalition": true, "user": { "id": 2, "login": "andre", "url": "https://api.intra.42.fr/v2/users/andre" }, "cursus": { "id": 1, "created_at": "2017-11-22T13:41:00.750Z", "name": "Piscine C", "slug": "piscine-c" } } ], "projects_users": [], "languages_users": [ { "id": 2, "language_id": 3, "user_id": 2, "position": 1, "created_at": "2017-11-22T13:41:03.638Z" } ], "achievements": [], "titles": [], "titles_users": [], "partnerships": [], "patroned": [ { "id": 4, "user_id": 2, "godfather_id": 15, "ongoing": true, "created_at": "2017-11-22T13:42:11.565Z", "updated_at": "2017-11-22T13:42:11.572Z" } ], "patroning": [], "expertises_users": [ { "id": 2, "expertise_id": 3, "interested": false, "value": 2, "contact_me": false, "created_at": "2017-11-22T13:41:22.504Z", "user_id": 2 } ], "campus": [ { "id": 1, "name": "Cluj", "time_zone": "Europe/Bucharest", "language": { "id": 3, "name": "Romanian", "identifier": "ro", "created_at": "2017-11-22T13:40:59.468Z", "updated_at": "2017-11-22T13:41:26.139Z" }, "users_count": 28, "vogsphere_id": 1 } ], "campus_users": [ { "id": 2, "user_id": 2, "campus_id": 1, "is_primary": true } ] }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": {}, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/users/create", "name": "create", "apis": [ { "api_url": "/v2/users", "http_method": "POST", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "\n

This is the main call for user creation on the 42 ecosystem.

\n\n

This call requires at least the email, campus_id, first_name and last_name fields. If the login isn\u2019t specified, it will be generated from the supplied first_name and the last_name. If no cursus is supplied, the user will join the cursus piscine-c by default.

\n\n

If an endpoint is configured for the supplied campus, it will be triggered before save. You can read more about campus endpoints on the endpoint documentation.

\n\n

This call also accept additional data, nested under user_candidature_attributes, wich can be added later with the user candidature call and is only visible for the user and at least the basic_staff role. The supplied email must be the personal email of the user. It will be moved to user_candidature after save, replacer by the given campus\u2019s alias. Adding an image will generate an original, a medium and a small version of this one.

\n\n

The meta key allow a hash with ldap_group. The ldap_group has transmited to LDAP server if campus is

\n", "errors": [], "params": [ { "name": "user", "full_name": "user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "login", "full_name": "user[login]", "description": "\n

The login. Default to . Must be unique.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "email", "full_name": "user[email]", "description": "\n

The email. Default to . Must be unique.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "first_name", "full_name": "user[first_name]", "description": "\n

The first name.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "last_name", "full_name": "user[last_name]", "description": "\n

The last name.

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "password", "full_name": "user[password]", "description": "\n

The password.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "pool_year", "full_name": "user[pool_year]", "description": "\n

The pool year.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "pool_month", "full_name": "user[pool_month]", "description": "\n

The pool month.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "user[kind]", "description": "\n

The kind.

\n", "required": true, "allow_nil": false, "validator": "Must be one of: admin, student, external.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "status", "full_name": "user[status]", "description": "\n

The status.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "image", "full_name": "user[image]", "description": "\n

The image. Allow blank length is true. Allow nil length is true. Minimum length is 3072. Maximum length is 1048576.

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "user[campus_id]", "description": "\n

The campus id.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "user[cursus_id]", "description": "\n

The cursus id.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "email_stop", "full_name": "user[email_stop]", "description": "\n

Is it email stop ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "skip_welcome_mail", "full_name": "user[skip_welcome_mail]", "description": "\n

The skip welcome mail.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_candidature_attributes", "full_name": "user[user_candidature_attributes]", "description": "\n

The user candidature attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "user[user_candidature_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user[user_candidature_attributes][user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "birth_date", "full_name": "user[user_candidature_attributes][birth_date]", "description": "\n

The birth date.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "gender", "full_name": "user[user_candidature_attributes][gender]", "description": "\n

The gender.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "zip_code", "full_name": "user[user_candidature_attributes][zip_code]", "description": "\n

The zip code.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "country", "full_name": "user[user_candidature_attributes][country]", "description": "\n

The country.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "phone_country_code", "full_name": "user[user_candidature_attributes][phone_country_code]", "description": "\n

The phone country code.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: AD, AE, AF, AG, AI, AL, AM, AN, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW, .", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "birth_city", "full_name": "user[user_candidature_attributes][birth_city]", "description": "\n

The birth city.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "birth_country", "full_name": "user[user_candidature_attributes][birth_country]", "description": "\n

The birth country.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_street", "full_name": "user[user_candidature_attributes][postal_street]", "description": "\n

The postal street.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_complement", "full_name": "user[user_candidature_attributes][postal_complement]", "description": "\n

The postal complement.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_city", "full_name": "user[user_candidature_attributes][postal_city]", "description": "\n

The postal city.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_zip_code", "full_name": "user[user_candidature_attributes][postal_zip_code]", "description": "\n

The postal zip code.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_country", "full_name": "user[user_candidature_attributes][postal_country]", "description": "\n

The postal country.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_affiliation", "full_name": "user[user_candidature_attributes][contact_affiliation]", "description": "\n

The contact affiliation.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_last_name", "full_name": "user[user_candidature_attributes][contact_last_name]", "description": "\n

The contact last name.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_first_name", "full_name": "user[user_candidature_attributes][contact_first_name]", "description": "\n

The contact first name.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_phone1", "full_name": "user[user_candidature_attributes][contact_phone1]", "description": "\n

The contact phone1.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_phone2", "full_name": "user[user_candidature_attributes][contact_phone2]", "description": "\n

The contact phone2.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "max_level_memory", "full_name": "user[user_candidature_attributes][max_level_memory]", "description": "\n

The max level memory.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "max_level_logic", "full_name": "user[user_candidature_attributes][max_level_logic]", "description": "\n

The max level logic.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "other_information", "full_name": "user[user_candidature_attributes][other_information]", "description": "\n

The other information.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language", "full_name": "user[user_candidature_attributes][language]", "description": "\n

The language.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "meeting_date", "full_name": "user[user_candidature_attributes][meeting_date]", "description": "\n

The meeting date.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "piscine_date", "full_name": "user[user_candidature_attributes][piscine_date]", "description": "\n

The piscine date.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "email", "full_name": "user[user_candidature_attributes][email]", "description": "\n

The email.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "pin", "full_name": "user[user_candidature_attributes][pin]", "description": "\n

The pin.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "phone", "full_name": "user[user_candidature_attributes][phone]", "description": "\n

The phone.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] }, { "name": "cursus_users_attributes", "full_name": "user[cursus_users_attributes]", "description": "\n

The cursus users attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "user[cursus_users_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "user[cursus_users_attributes][cursus_id]", "description": "\n

The cursus id. Must be unique in the scope of a given user.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "user[cursus_users_attributes][end_at]", "description": "\n

The end at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "user[cursus_users_attributes][begin_at]", "description": "\n

The begin at.

\n", "required": true, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "user[cursus_users_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] }, { "name": "languages_users_attributes", "full_name": "user[languages_users_attributes]", "description": "\n

The languages users attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "user[languages_users_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "language_id", "full_name": "user[languages_users_attributes][language_id]", "description": "\n

The language id.

\n", "required": true, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "position", "full_name": "user[languages_users_attributes][position]", "description": "\n

The position.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "user[languages_users_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "POST", "path": "/v2/users", "versions": [ "2.0" ], "query": null, "request_data": { "user": { "campus_id": "1", "cursus_users_attributes": [ { "begin_at": "2017-11-25 13:44:19 UTC", "cursus_id": "1", "end_at": "2018-03-22 13:43:10 UTC", "user_id": "" } ], "email": "anakin@caramail.net", "first_name": "Anakin", "kind": "student", "languages_users_attributes": [ { "language_id": "1", "position": "1", "user_id": "" } ], "last_name": "Skywalker", "password": "totoroTOTOROOO", "pool_month": "may", "pool_year": "2017", "status": "admis", "user_candidature_attributes": { "birth_city": "East Adrainshire", "birth_country": "Iran", "birth_date": "1998-06-08", "contact_affiliation": "parent", "contact_first_name": "Dewayne", "contact_last_name": "Nader", "contact_phone1": "0695847362", "contact_phone2": "0491314200", "country": "Turks and Caicos Islands", "gender": "female", "language": "", "max_level_logic": "2", "max_level_memory": "1", "meeting_date": "2017-10-05", "other_information": "3", "pin": "4242", "piscine_date": "2017-11-15", "postal_city": "Emelyborough", "postal_complement": "", "postal_country": "Lesotho", "postal_street": "621 Tromp Lakes", "postal_zip_code": "10047", "user_id": "", "zip_code": "89457-3613" } } }, "response_data": { "id": 127, "login": "anakisky", "url": "https://api.intra.42.fr/v2/users/anakisky" }, "code": "201", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/users/update", "name": "update", "apis": [ { "api_url": "/v2/users/:id", "http_method": "PATCH", "short_description": null, "deprecated": null }, { "api_url": "/v2/users/:id", "http_method": "PUT", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user", "full_name": "user", "description": "", "required": false, "allow_nil": true, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "login", "full_name": "user[login]", "description": "\n

The login. Default to . Must be unique.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "email", "full_name": "user[email]", "description": "\n

The email. Default to . Must be unique.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "first_name", "full_name": "user[first_name]", "description": "\n

The first name.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "last_name", "full_name": "user[last_name]", "description": "\n

The last name.

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "password", "full_name": "user[password]", "description": "\n

The password.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "pool_year", "full_name": "user[pool_year]", "description": "\n

The pool year.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "pool_month", "full_name": "user[pool_month]", "description": "\n

The pool month.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "kind", "full_name": "user[kind]", "description": "\n

The kind.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: admin, student, external.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "status", "full_name": "user[status]", "description": "\n

The status.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "image", "full_name": "user[image]", "description": "\n

The image. Allow blank length is true. Allow nil length is true. Minimum length is 3072. Maximum length is 1048576.

\n", "required": false, "allow_nil": true, "validator": "Must be File", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "campus_id", "full_name": "user[campus_id]", "description": "\n

The campus id.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "user[cursus_id]", "description": "\n

The cursus id.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "email_stop", "full_name": "user[email_stop]", "description": "\n

Is it email stop ? Default to false.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: true, false.", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "skip_welcome_mail", "full_name": "user[skip_welcome_mail]", "description": "\n

The skip welcome mail.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "user_candidature_attributes", "full_name": "user[user_candidature_attributes]", "description": "\n

The user candidature attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "user[user_candidature_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "user_id", "full_name": "user[user_candidature_attributes][user_id]", "description": "\n

The user id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "birth_date", "full_name": "user[user_candidature_attributes][birth_date]", "description": "\n

The birth date.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "gender", "full_name": "user[user_candidature_attributes][gender]", "description": "\n

The gender.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "zip_code", "full_name": "user[user_candidature_attributes][zip_code]", "description": "\n

The zip code.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "country", "full_name": "user[user_candidature_attributes][country]", "description": "\n

The country.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "phone_country_code", "full_name": "user[user_candidature_attributes][phone_country_code]", "description": "\n

The phone country code.

\n", "required": false, "allow_nil": true, "validator": "Must be one of: AD, AE, AF, AG, AI, AL, AM, AN, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW, .", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "birth_city", "full_name": "user[user_candidature_attributes][birth_city]", "description": "\n

The birth city.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "birth_country", "full_name": "user[user_candidature_attributes][birth_country]", "description": "\n

The birth country.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_street", "full_name": "user[user_candidature_attributes][postal_street]", "description": "\n

The postal street.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_complement", "full_name": "user[user_candidature_attributes][postal_complement]", "description": "\n

The postal complement.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_city", "full_name": "user[user_candidature_attributes][postal_city]", "description": "\n

The postal city.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_zip_code", "full_name": "user[user_candidature_attributes][postal_zip_code]", "description": "\n

The postal zip code.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "postal_country", "full_name": "user[user_candidature_attributes][postal_country]", "description": "\n

The postal country.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_affiliation", "full_name": "user[user_candidature_attributes][contact_affiliation]", "description": "\n

The contact affiliation.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_last_name", "full_name": "user[user_candidature_attributes][contact_last_name]", "description": "\n

The contact last name.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_first_name", "full_name": "user[user_candidature_attributes][contact_first_name]", "description": "\n

The contact first name.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_phone1", "full_name": "user[user_candidature_attributes][contact_phone1]", "description": "\n

The contact phone1.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "contact_phone2", "full_name": "user[user_candidature_attributes][contact_phone2]", "description": "\n

The contact phone2.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "max_level_memory", "full_name": "user[user_candidature_attributes][max_level_memory]", "description": "\n

The max level memory.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "max_level_logic", "full_name": "user[user_candidature_attributes][max_level_logic]", "description": "\n

The max level logic.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "other_information", "full_name": "user[user_candidature_attributes][other_information]", "description": "\n

The other information.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "language", "full_name": "user[user_candidature_attributes][language]", "description": "\n

The language.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "meeting_date", "full_name": "user[user_candidature_attributes][meeting_date]", "description": "\n

The meeting date.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "piscine_date", "full_name": "user[user_candidature_attributes][piscine_date]", "description": "\n

The piscine date.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "email", "full_name": "user[user_candidature_attributes][email]", "description": "\n

The email.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "pin", "full_name": "user[user_candidature_attributes][pin]", "description": "\n

The pin.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "phone", "full_name": "user[user_candidature_attributes][phone]", "description": "\n

The phone.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] }, { "name": "cursus_users_attributes", "full_name": "user[cursus_users_attributes]", "description": "\n

The cursus users attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "user[cursus_users_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "cursus_id", "full_name": "user[cursus_users_attributes][cursus_id]", "description": "\n

The cursus id. Must be unique in the scope of a given user.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "end_at", "full_name": "user[cursus_users_attributes][end_at]", "description": "\n

The end at.

\n", "required": false, "allow_nil": true, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "begin_at", "full_name": "user[cursus_users_attributes][begin_at]", "description": "\n

The begin at.

\n", "required": false, "allow_nil": false, "validator": "Must be DateTime", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "user[cursus_users_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] }, { "name": "languages_users_attributes", "full_name": "user[languages_users_attributes]", "description": "\n

The languages users attributes.

\n", "required": false, "allow_nil": true, "validator": "Must be an Array of nested elements", "expected_type": "array", "metadata": null, "show": true, "validations": [], "params": [ { "name": "id", "full_name": "user[languages_users_attributes][id]", "description": "\n

The id.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "language_id", "full_name": "user[languages_users_attributes][language_id]", "description": "\n

The language id.

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "position", "full_name": "user[languages_users_attributes][position]", "description": "\n

The position.

\n", "required": false, "allow_nil": true, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "_destroy", "full_name": "user[languages_users_attributes][_destroy]", "description": "\n

The destroy.

\n", "required": false, "allow_nil": true, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ] } ] } ], "examples": [ { "verb": "PUT", "path": "/v2/users/2", "versions": [ "2.0" ], "query": null, "request_data": { "user": { "campus_id": "1", "email": "anakin@caramail.net", "first_name": "Anakin", "kind": "student", "last_name": "Skywalker", "password": "totoroTOTOROOO", "pool_month": "september", "pool_year": "2017", "status": "admis" } }, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_tutor" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/users/me", "name": "me", "apis": [ { "api_url": "/v2/me", "http_method": "GET", "short_description": "Show the current resource owner", "deprecated": null } ], "formats": null, "full_description": "\n

Will respond with the current resource owner, wich is the token owner (the actually logged-in user).

\n", "errors": [], "params": [], "examples": [ { "verb": "GET", "path": "/v2/me", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "id": 2, "email": "andre@42.fr", "login": "andre", "first_name": "Andr\u00e9", "last_name": "Aubin", "url": "https://api.intra.42.fr/v2/users/andre", "phone": null, "displayname": "Andr\u00e9 Aubin", "image_url": "https://cdn.intra.42.fr/images/default.png", "staff?": false, "correction_point": 4, "pool_month": "july", "pool_year": "2016", "location": null, "wallet": 0, "groups": [], "cursus_users": [ { "id": 2, "begin_at": "2017-05-14T21:37:50.172Z", "end_at": null, "grade": null, "level": 0.0, "skills": [], "cursus_id": 1, "has_coalition": true, "user": { "id": 2, "login": "andre", "url": "https://api.intra.42.fr/v2/users/andre" }, "cursus": { "id": 1, "created_at": "2017-11-22T13:41:00.750Z", "name": "Piscine C", "slug": "piscine-c" } } ], "projects_users": [], "languages_users": [ { "id": 2, "language_id": 3, "user_id": 2, "position": 1, "created_at": "2017-11-22T13:41:03.638Z" } ], "achievements": [], "titles": [], "titles_users": [], "partnerships": [], "patroned": [ { "id": 4, "user_id": 2, "godfather_id": 15, "ongoing": true, "created_at": "2017-11-22T13:42:11.565Z", "updated_at": "2017-11-22T13:42:11.572Z" } ], "patroning": [], "expertises_users": [ { "id": 2, "expertise_id": 3, "interested": false, "value": 2, "contact_me": false, "created_at": "2017-11-22T13:41:22.504Z", "user_id": 2 } ], "campus": [ { "id": 1, "name": "Cluj", "time_zone": "Europe/Bucharest", "language": { "id": 3, "name": "Romanian", "identifier": "ro", "created_at": "2017-11-22T13:40:59.468Z", "updated_at": "2017-11-22T13:41:26.139Z" }, "users_count": 28, "vogsphere_id": 1 } ], "campus_users": [ { "id": 2, "user_id": 2, "campus_id": 1, "is_primary": true } ] }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "authentication": "user" }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/users/free_past_agu", "name": "free_past_agu", "apis": [ { "api_url": "/v2/users/:user_id/free_past_agu", "http_method": "POST", "short_description": "free past agu to user", "deprecated": null } ], "formats": null, "full_description": "\n

Add a free agu in the past for a user which implies to delay the blackhole, Please follow the rules about the free agu. (if you dont know the rules contact a 42network staff)

\n", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The user login

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "duration", "full_name": "duration", "description": "\n

blackhole delay duration in day

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "POST", "path": "/v2/users/:id/free_past_agu", "versions": [ "2.0" ], "query": "", "request_data": { "duration": 2, "reason": "optional" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/users/unfreeze", "name": "unfreeze", "apis": [ { "api_url": "/v2/users/:user_id/unfreeze", "http_method": "POST", "short_description": "Unfreeze user", "deprecated": null } ], "formats": null, "full_description": "\n

End all agus

\n", "errors": [], "params": [], "examples": [], "metadata": { "roles": [ "advanced_staff" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/users/staff", "name": "staff", "apis": [ { "api_url": "/v2/staff", "http_method": "GET", "short_description": "Get all staff", "deprecated": null } ], "formats": null, "full_description": "\n

Get all staff

\n", "errors": [], "params": [], "examples": [], "metadata": null, "see": [], "headers": [], "show": true } ], "headers": [] }, "waitlists": { "doc_url": "/apidoc/2.0/waitlists", "api_url": "/api", "name": "Waitlists", "short_description": "Waitlist for an event or an exam.", "full_description": "", "version": "2.0", "formats": null, "metadata": null, "methods": [ { "doc_url": "/apidoc/2.0/waitlists/index", "name": "index", "apis": [ { "api_url": "/v2/waitlists", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "sort", "full_name": "sort", "description": "\n

The sort field. Sorted by created_at asc, id desc by default.

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, waitlistable_id, waitlistable_type, created_at, updated_at.", "expected_type": "string", "metadata": { "sort": { "default": { "created_at": "asc", "id": "desc" }, "keys": [ "id", "waitlistable_id", "waitlistable_type", "created_at", "updated_at" ] } }, "show": true, "validations": [] }, { "name": "filter", "full_name": "filter", "description": "\n

Filtering on one or more fields

\n", "required": false, "allow_nil": false, "validator": "Must be one of: id, waitlistable_id, waitlistable_type, created_at, updated_at.", "expected_type": "string", "metadata": { "filter": { "keys": [ "id", "waitlistable_id", "waitlistable_type", "created_at", "updated_at" ], "additional": {} } }, "show": true, "validations": [] }, { "name": "page", "full_name": "page", "description": "\n

The pagination params, as a hash

\n", "required": false, "allow_nil": false, "validator": "Must be a Hash", "expected_type": "hash", "metadata": null, "show": true, "validations": [], "params": [ { "name": "number", "full_name": "page[number]", "description": "\n

The current page

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] }, { "name": "size", "full_name": "page[size]", "description": "\n

The number of items per page, defaults to 30, maximum 100

\n", "required": false, "allow_nil": false, "validator": "Must be Fixnum", "expected_type": "numeric", "metadata": null, "show": true, "validations": [] } ] } ], "examples": [ { "verb": "GET", "path": "/v2/waitlists", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": [ { "created_at": "2018-09-13T18:55:37.552Z", "id": 1, "waitlistable_id": 1669, "waitlistable_type": "Exam" }, { "created_at": "2018-09-13T18:56:36.902Z", "id": 2, "waitlistable_id": 1670, "waitlistable_type": "Exam" }, { "created_at": "2018-09-13T18:57:13.021Z", "id": 3, "waitlistable_id": 1671, "waitlistable_type": "Exam" }, { "created_at": "2018-09-13T18:58:01.760Z", "id": 4, "waitlistable_id": 1672, "waitlistable_type": "Exam" }, { "created_at": "2018-09-14T08:16:14.076Z", "id": 5, "waitlistable_id": 1673, "waitlistable_type": "Exam" }, { "created_at": "2018-09-14T10:01:19.094Z", "id": 8, "waitlistable_id": 1676, "waitlistable_type": "Exam" } ], "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "paginated": true, "pagination_count": 30, "roles": [ "advanced_staff", "events_manager" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/waitlists/show", "name": "show", "apis": [ { "api_url": "/v2/events/:event_id/waitlist", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/exams/:exam_id/waitlist", "http_method": "GET", "short_description": null, "deprecated": null }, { "api_url": "/v2/waitlists/:id", "http_method": "GET", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "event_id", "full_name": "event_id", "description": "\n

The event id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "exam_id", "full_name": "exam_id", "description": "\n

The exam id

\n", "required": false, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] }, { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "GET", "path": "/v2/events/2530/waitlist", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "created_at": "2018-09-19T15:15:33.124Z", "id": 32, "waitlistable_id": 2530, "waitlistable_type": "Event" }, "code": "200", "show_in_doc": 1, "recorded": true }, { "verb": "GET", "path": "/v2/waitlists/32", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": { "created_at": "2018-09-19T15:15:33.124Z", "id": 32, "waitlistable_id": 2530, "waitlistable_type": "Event" }, "code": "200", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_staff", "events_manager" ] }, "see": [], "headers": [], "show": true }, { "doc_url": "/apidoc/2.0/waitlists/destroy", "name": "destroy", "apis": [ { "api_url": "/v2/waitlists/:id", "http_method": "DELETE", "short_description": null, "deprecated": null } ], "formats": null, "full_description": "", "errors": [], "params": [ { "name": "id", "full_name": "id", "description": "\n

The requested id

\n", "required": true, "allow_nil": false, "validator": "Must be String", "expected_type": "string", "metadata": null, "show": true, "validations": [] } ], "examples": [ { "verb": "DELETE", "path": "/v2/waitlists/2", "versions": [ "2.0" ], "query": "", "request_data": null, "response_data": null, "code": "204", "show_in_doc": 1, "recorded": true } ], "metadata": { "roles": [ "advanced_staff", "events_manager" ] }, "see": [], "headers": [], "show": true } ], "headers": [] } } } }