Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ AK/SK Authentication

.. note::

AK/SK authentication supports API requests with a body not larger than 12 MB. For API requests with a larger body, token authentication is recommended.
- AK/SK authentication supports API requests with a body not larger than 12 MB. For API requests with a larger body, token authentication is recommended.
- API Gateway checks the time format and compares the request time with the time when API Gateway received the request. If the time difference exceeds 15 minutes, API Gateway will reject the request. So, the local time on the client must be synchronized with the clock server to avoid a large offset in the value of **X-Sdk-Date** in the request header.

In AK/SK authentication, AK/SK is used to sign requests and the signature is then added to the requests for authentication.
In AK/SK authentication, an AK/SK pair is used to sign requests and the signature is then added to the requests for authentication.

- AK: access key ID, which is a unique identifier used in conjunction with a secret access key to sign requests cryptographically.
- SK: secret access key, which is used in conjunction with an AK to sign requests cryptographically. It identifies a request sender and prevents the request from being modified.

In AK/SK authentication, you can use an AK/SK to sign requests based on the signature algorithm or using the signing SDK.
In AK/SK authentication, you can use an AK/SK pair to sign requests based on the signature algorithm or using the signing SDK.

.. note::

Expand All @@ -33,7 +34,8 @@ Token Authentication

.. note::

The validity period of a token is 24 hours. When using a token for authentication, cache it to prevent frequently calling the IAM API used to obtain a user token.
- A token remains valid for 24 hours after it is generated. You can cache a token and reuse it for authentication instead of generating a new one each time.
- Before using a token, ensure that it has sufficient time remaining before expiration. Using a near-expiry token may cause API call failures.

A token specifies temporary permissions in a computer system. During API authentication using a token, the token is added to requests to get permissions for calling the API. You can obtain a token by calling the `Obtaining a User Token <https://docs.otc.t-systems.com/en-us/api/iam/en-us_topic_0057845583.html>`__ API.

Expand All @@ -50,7 +52,7 @@ IMS is a project-level service. When you call the API, set **auth.scope** in the
"password": {
"user": {
"name": "username", // IAM user name
"password": $ADMIN_PASS, //IAM user password. You are advised to store it in ciphertext in the configuration file or an environment variable and decrypt it when needed to ensure security.
"password": $ADMIN_PASS, // IAM user password. You are advised to store it in ciphertext in the configuration file or an environment variable and decrypt it when needed to ensure security.
"domain": {
"name": "domainname" // Name of the domain that the IAM user belongs to
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Response Header

Similar to a request, a response also has a header, for example, **Content-Type**.

:ref:`Figure 1 <sfs_02_0012__en-us_topic_0170155703_fig4865141011511>` shows the response header fields for the API used to . The **X-Subject-Token** header field is the desired user token. This token can then be used to authenticate the calling of other APIs.
:ref:`Figure 1 <sfs_02_0012__en-us_topic_0170155703_fig4865141011511>` shows the response header for the API used to . The **X-Subject-Token** header field is the desired user token. This token can then be used to authenticate the calling of other APIs.

.. note::

Expand Down
4 changes: 4 additions & 0 deletions api-ref/source/change_history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Change History
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Released On | Description |
+===================================+===========================================================================================================================================================================================================================================================+
| 2025-09-28 | Updated the following content: |
| | |
| | Added the description of tag-related APIs. |
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 2025-04-07 | Updated the following content: |
| | |
| | - Added descriptions about General Purpose File System APIs. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ General Purpose File System APIs (BETA)

- :ref:`File Systems <sfs_02_0111>`
- :ref:`File System Access Rules <sfs_02_0115>`
- :ref:`Tags <sfs_03_0001>`

.. toctree::
:maxdepth: 1
:hidden:

file_systems/index
file_system_access_rules/index
tags/index
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
:original_name: sfs_03_0002.html

.. _sfs_03_0002:

Batch Adding Tags to a Resource
===============================

Function
--------

This API is used to batch add tags for a general purpose file system. You can add up to 20 tags to a resource.

URI
---

- POST /v3/sfs/tms/{project_id}/file-systems/{resource_id}/tags/create
- Parameter description

+-------------+-----------+--------+----------------------------------------------------------------------+
| Parameter | Mandatory | Type | Description |
+=============+===========+========+======================================================================+
| project_id | Yes | String | The project ID. |
+-------------+-----------+--------+----------------------------------------------------------------------+
| resource_id | Yes | String | The resource ID, which is the name of a general purpose file system. |
+-------------+-----------+--------+----------------------------------------------------------------------+

Request Parameters
------------------

.. table:: **Table 1** Request header parameters

+-----------------+-----------------+-----------------+------------------------------------+
| Parameter | Mandatory | Type | Description |
+=================+=================+=================+====================================+
| Content-type | Yes | String | The MIME type of the request body. |
| | | | |
| | | | Example: application/json |
+-----------------+-----------------+-----------------+------------------------------------+
| X-Auth-Token | No | String | The user token. |
+-----------------+-----------------+-----------------+------------------------------------+

.. table:: **Table 2** Request body parameters

+-----------------+-----------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+
| Parameter | Mandatory | Type | Description |
+=================+=================+=========================================================================================+==============================================================================================================+
| tags | No | List<:ref:`resource_tag <sfs_03_0002__en-us_topic_0000001886392461_table667613216170>`> | The tag list. For details, see :ref:`Table 3 <sfs_03_0002__en-us_topic_0000001886392461_table667613216170>`. |
| | | | |
| | | | This parameter is mandatory for common tenants. |
| | | | |
| | | | Use either **tags** or **sys_tags** if you have the op_service permissions. |
+-----------------+-----------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+
| sys_tags | No | List<:ref:`resource_tag <sfs_03_0002__en-us_topic_0000001886392461_table667613216170>`> | The system tag list. This parameter is available only to the op_service permissions. |
| | | | |
| | | | Use either **tags** or **sys_tags** if you have the op_service permissions. |
| | | | |
| | | | Only one **resource_tag** structure is used in TMS calls currently. |
| | | | |
| | | | The key is fixed at **\_sys_enterprise_project_id**. |
| | | | |
| | | | The value can be **UUID** or **0**. **0** indicates the default enterprise project. |
| | | | |
| | | | System tags can only be added. |
| | | | |
| | | | For details, see :ref:`Table 3 <sfs_03_0002__en-us_topic_0000001886392461_table667613216170>`. |
+-----------------+-----------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+

.. _sfs_03_0002__en-us_topic_0000001886392461_table667613216170:

.. table:: **Table 3** resource_tag

+-----------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Parameter | Mandatory | Type | Description |
+===========+===========+========+============================================================================================================================================================================================================================================================================================================================================+
| key | Yes | String | The tag key. A tag key can contain a maximum of 128 characters. It can contain letters, digits, and spaces representable in UTF-8 and special characters ``(_.:=+-@).`` It cannot start or end with a space and cannot be left empty. Tag keys starting with **\_sys\_** are system tags, and you cannot start a tag key with **\_sys\_**. |
+-----------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| value | No | String | The tag value. A tag value can contain a maximum of 255 characters. It can contain letters, digits, and spaces representable in UTF-8 and special characters ``(_.:=+-@)`` and can be left empty. It cannot start or end with a space. |
+-----------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Response Parameters
-------------------

None

Example Request
---------------

Batch adding tags to a general purpose file system whose name is **bucketName** with the project ID **c80a2157ba1d46c0825265947342077c**:

.. code-block:: text

POST https://{endpoint}/v3/sfs/tms/c80a2157ba1d46c0825265947342077c/file-systems/bucketName/tags/create

Request body example:

.. code-block::

{
"tags":[
{
"key":"key1",
"value":"value1"
},
{
"key":"key2",
"value":"value2"
}
]
}

Example Response
----------------

None

Status Codes
------------

- Normal

=========== ========================
Status Code Description
=========== ========================
204 Resource tags are added.
=========== ========================

- Abnormal

=========== ======================
Status Code Description
=========== ======================
400 Invalid tag parameter.
401 Certification failed.
403 Authentication failed.
404 Resource not found.
500 System error.
=========== ======================
Loading