live_help Notes

assignment This action requires one of theses roles: Advanced tutor
chrome_reader_mode This resource is paginated by 30 items

settings Params

Param name Description
project_session_id optional . Must be String

The project_session id

project_id optional . Must be String

The project id or slug

user_id optional . Must be String

The user id or slug

sort optional . 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.

The sort field. Sorted by name asc by default.

Example:

To sort on scales on the fields manual_subscription on a descending order and is_external on a ascending order:

...&sort=-manual_subscription,is_external

filter optional . 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.

Filtering on one or more fields

Example:

To filter on scales with the id field matching a_value or another_value:

...&filter[id]=a_value,another_value

Filterable fields:
  • id (standard field)
  • name (standard field)
  • comment (standard field)
  • introduction_md (standard field)
  • disclaimer_md (standard field)
  • guidelines_md (standard field)
  • created_at (standard field)
  • updated_at (standard field)
  • evaluation_id (standard field)
  • is_primary (standard field)
  • correction_number (standard field)
  • duration (standard field)
  • manual_subscription (standard field)
  • is_external (standard field)
range optional . 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.

Select on a particular range

Example:

To range on scales with the is_external field between min_value and max_value:

...&range[is_external]=min_value,max_value

Rangeable fields:
  • id
  • name
  • comment
  • introduction_md
  • disclaimer_md
  • guidelines_md
  • created_at
  • updated_at
  • evaluation_id
  • is_primary
  • correction_number
  • duration
  • manual_subscription
  • is_external
page optional . Must be a Hash

The pagination params, as a hash

page[number] optional . Must be Fixnum

The current page

page[size] optional . Must be Fixnum

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

comments powered by <span class='logo-disqus'>Disqus</span>
GET /v2/scales?page=1
200
[
  {
    "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"
    }
  }
]
curl  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/scales?page=1"

[
  {
    "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"
    }
  }
]
require "oauth2"
UID = "Your application uid"
SECRET = "Your application secret"
client = OAuth2::Client.new(UID, SECRET, site: "https://api.intra.42.fr")
token = client.client_credentials.get_token

response = token.get("/v2/scales?page=1")
response.status
# => 200
response.parsed
# => [{"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"}}]