GET /v2/projects/:project_id/tags
Return all the tags of the given Project
GET /v2/issues/:issue_id/tags
Return all the tags of the given Issue
GET /v2/notions/:notion_id/tags
Return all the tags of the given Notion
GET /v2/cursus/:cursus_id/tags
Return all the tags of the given Cursus
GET /v2/users/:user_id/tags
Return all the tags of the given User
GET /v2/tags
Return all the tags
live_help Notes
chrome_reader_mode
This resource is paginated by 30 items
settings Params
Param name | Description |
---|---|
project_id |
optional
. Must be String
The project id or slug |
issue_id |
optional
. Must be String
The issue id |
notion_id |
optional
. Must be String
The notion id or slug |
cursus_id |
optional
. Must be String
The cursus id or slug |
user_id |
optional
. Must be String
The user id or slug |
sort |
optional
. Must be one of: id , name , created_at , updated_at , pinner_id , kind , description .
The sort field. Sorted by name asc, id desc by default. MoreExample:To sort on tags on the fields kind on a descending order and description on a ascending order: ...&sort=-kind,description |
filter |
optional
. Must be one of: id , name , created_at , updated_at , pinner_id , kind , description , cursus_id .
Filtering on one or more fields MoreExample:
To filter on tags with the
...&filter[id]=a_value,another_value Filterable fields:
|
range |
optional
. Must be one of: id , name , created_at , updated_at , pinner_id , kind , description .
Select on a particular range MoreExample:
To range on tags with the
...&range[description]=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/tags
200
[
{
"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": []
}
]
curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.intra.42.fr/v2/tags"
[
{
"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": []
}
]
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/tags")
response.status
# => 200
response.parsed
# => [{"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"=>nil}]}, {"id"=>4, "name"=>"Colle 08", "kind"=>"project", "users"=>[], "subnotions"=>[]}]