Skip to main content

Version

Definition

version.json
{
"id": 0,
"productID": 0,
"versionName": "",
"seq": 0,
"status": 0,
"createdAt": "",
"updatedAt": "",
}

Get Versions

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

Get Version

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

Apply Version.ID

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

Create Version

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

success status: 201

Update Version

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

Patch Version

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

Update Version Status

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

Destroy Version

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