Skip to main content

Image

Definition

image.json
{
"id": 0,
"filename": "",
"filepath": "",
"status": 0,
"createdAt": "",
"updatedAt": "",
}

Get Images

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

Get Image

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

Apply Image.ID

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

Create Image

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

success status: 201

Update Image

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

Patch Image

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

Update Image Status

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

Destroy Image

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