GET /v2/project_sessions/:project_session_id/attachments
Return all the attachments of the given Project session
GET /v2/projects/:project_id/attachments
Return all the attachments of the given Project
GET /v2/attachments
Return all the attachments
live_help Notes
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 |
sort |
optional
. 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 .
The sort field. Sorted by id asc by default. MoreExample:To sort on attachments on the fields untranslatable on a descending order and attachments_structure_id on a ascending order: ...&sort=-untranslatable,attachments_structure_id |
filter |
optional
. 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 .
Filtering on one or more fields MoreExample:
To filter on attachments with the
...&filter[id]=a_value,another_value Filterable fields:
|
range |
optional
. 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 .
Select on a particular range MoreExample:
To range on attachments with the
...&range[attachments_structure_id]=min_value,max_value Rangeable fields:
|
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 |
Examples
GET /v2/projects/4/attachments
200
[
]
curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/projects/4/attachments"
[
]
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/projects/4/attachments")
response.status
# => 200
response.parsed
# => []