Changelog Labels
Currently we have 4 methods for labels api, index, create, update and destroy.
Index
This method will list labels from your current project, paginating by 5 labels per page.
Response
Store
This method will create a new label for your current project.
Response
Update
This method will update a label in your current project.
Response
Destroy
This method will destroy a label in your current project.
Response
Index
This method will list labels from your current project, paginating by 5 labels per page.
curl --request GET \
--url https://api.changelogfy.com/v1/labels \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "x-project-token: ${YOUR_APP_ID}"
Response
{
"current_page": 1,
"data": [
{
"id": 1,
"name": "Improvement",
"color": "#7300FF",
"order": 1,
"project_id": 1,
"created_at": "2021-11-13T01:09:26.000000Z",
"updated_at": "2021-11-13T01:09:26.000000Z",
"deleted_at": null,
"primary_color": "rgba(115,0,255,1.00)",
"secondary_color": "rgba(115,0,255,0.12)"
},
{
"id": 2,
"name": "Fix",
"color": "#FF1197",
"order": 2,
"project_id": 1,
"created_at": "2021-11-13T01:09:26.000000Z",
"updated_at": "2021-11-13T01:09:26.000000Z",
"deleted_at": null,
"primary_color": "rgba(255,17,151,1.00)",
"secondary_color": "rgba(255,17,151,0.12)"
}
],
"first_page_url": "https://api.changelogfy.com/v1/labels?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://api.changelogfy.com/v1/labels?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://api.changelogfy.com/v1/labels?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "https://api.changelogfy.com/v1/labels",
"per_page": 5,
"prev_page_url": null,
"to": 2,
"total": 2
}
Store
This method will create a new label for your current project.
curl --request POST \
--url https://api.changelogfy.com/v1/labels \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "x-project-token: ${YOUR_APP_ID}"
--data '{
"name": "Fix",
"color": "#cccccc"
}'
Response
{
"status": "success",
"message": "Label created successful."
}
Update
This method will update a label in your current project.
curl --request PUT \
--url https://api.changelogfy.com/v1/labels/{POST_ID} \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "x-project-token: ${YOUR_APP_ID}"
--data '{
"name": "Improvement",
"color": "#7300FF"
}'
Response
{
"status": "success",
"message": "Label updated successful."
}
Destroy
This method will destroy a label in your current project.
curl --request DELETE \
--url https://api.changelogfy.com/v1/labels/{POST_ID} \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "x-project-token: ${YOUR_APP_ID}"
Response
{
"status": "success",
"message": "Label deleted successful."
}
Updated on: 10/13/2023
Thank you!