Docs Index

Doc

GET /api/organization/questions

This endpoint is similar to GET /api/questions (index), except that it returns all the questions in your organization visible to you. You’ll see your own questions as well as colleagues’ questions where the shared boolean is set to true. If you are an organization owner, you can see every question in the organization.

The endpoint also performs sorting and pagination identically to GET /api/questions (index).

curl \ -H 'Authorization: Token token="<%= api_key %>"' \ "https://app.coderpad.io/api/organization/questions?sort=updated_at,desc"
Code language: JavaScript (javascript)

returns

{ "status": "OK", "questions": [ { "id": 12, "title": "Are avocados fruity?", "owner_email": "alice@fruits-party.io", "language": "ruby", "description": "Fruit puzzler round 2?", "contents": "def is_fruity?(thing);\\n end\\n", "shared": true, "used": 0, "created_at": "2019-01-28T22:08:09Z", "updated_at": "2019-01-28T22:08:09Z" } // ... followed by the rest of the questions in the organization visible to you ], "next_page": "https://app.coderpad.io/api/organization/questions?sort=updated_at,desc&page=2", "total": 256 }
Code language: JSON / JSON with Comments (json)