Skip to main content

Tag

Definition

tag.json
{
"id": 0,
"tagName": "",
"status": 0,
"createdAt": "",
"updatedAt": "",
}

Get Tags

curl -X GET "${baseUrl}/tag/?filter=${filter}&orderBy=${orderBy}&page=${page}&pageSize=${pageSize}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Get Tag

curl -X GET "${baseUrl}/tag/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Apply Tag.ID

curl -X POST "${baseUrl}/apply/tag/id/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Create Tag

curl -X POST "${baseUrl}/tag/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @tag.json
info
tag.json
{
"tagName": "",
"status": 0,
}
tip

success status: 201

Update Tag

#!/bin/bash
curl -X PUT "${baseUrl}/tag/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @tag.json
info
tag.json
{
"tagName": "",
"status": 0,
}

Patch Tag

curl -X PATCH "${baseUrl}/tag/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Attrs: tagName,status" \
-d @tag.json
info
tag.json
{
"tagName": "",
"status": 0,
}

Update Tag Status

curl -X PATCH "${baseUrl}/tag/${id}/status/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @tag.json
info
tag.json
{
"status": 0
}

Destroy Tag

curl -X DELETE "${baseUrl}/tag/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Get Articles

curl -X GET "${baseUrl}/tag/${id}/article/?filter=${filter}&orderBy=${orderBy}&page=${page}&pageSize=${pageSize}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
curl -X POST "${baseUrl}/tag/${id}/article/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "[1,2,3,4]"
curl -X DELETE "${baseUrl}/tag/${id}/article/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "[1,2,3,4]"