Adding a Style

Last updated: 2020-07-02 16:53:29


    This API adds a style to a bucket. All images uploaded to the bucket afterwards use the style.

    Bucket APIs are rate limited. Write requests are limited to 1 qps while read requests are limited to 10 qps.


    Sample requests

    PUT /?style HTTP/1.1
    Host: <BucketName-APPID>.pic.<Region> 
    Date: GMT Date
    Authorization: Auth String
    <XML File>

    Authorization: Auth String (For details, see Request Signature.)

    Request header

    This API uses only common request headers. For details, see Common Request Headers.

    Request body

    <?xml version="1.0" encoding="UTF-8" ?>

    Detail node descriptions are as follows:

    Node name (keyword) Parent node Description Type Required
    AddStyle None The style to add Container Yes

    Description of container node AddStyle:

    Node name (keyword) Parent node Description Type Required
    StyleName AddStyle Name of the style string Yes
    StyleBody AddStyle Style content string Yes


    Response header

    This response uses common response headers. For more information, see Common Response Headers.

    Response body

    The response body is null.

    Error codes

    This API do not have any special error code. For information on all error codes, see Error Codes.



    PUT /?style HTTP/1.1
    Date: Tue, 03 Apr 2019 09:06:15 GMT
    <?xml version="1.0" encoding="UTF-8" ?>


    HTTP/1.1 200 OK
    Content-Type: application/xml
    Content-Length: 0
    Date: Tue, 03 Apr 2019 09:06:16 GMT
    x-cos-request-id: xxxxxxxxxxxxxxxxxx

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback