Files
animethemes-api-docs/docs/image/update/index.md
T
2022-07-31 19:50:50 -05:00

1.0 KiB

title
title
Image Update

Image Update Endpoint

The image update endpoint updates an image and returns the updated image resource.

For example, the /image?facet=large+cover endpoint will update the image facet attribute and return the updated image resource.

URL

PUT|PATCH /image/{id}

Authentication

Required Permission: update image

Roles with Permission: Wiki Editor, Admin

Parameters

Name Required Rules
facet No EnumValue [Small Cover, Large Cover, Grill]

Response

{
    image: {
        id: id,
        path: "path",
        size: size,
        mimetype: "mimetype",
        facet: "facet",
        created_at: "created_at",
        updated_at: "updated_at",
        deleted_at: "deleted_at",
        link: "link"
    }
}

Example

curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/image/435