Edit a service (PATCH /v1/services/{service_id}/param)

Updates the specified service.

When updating a caching behavior control rule, the whole rule must be specified, not only the differences (it is also necessary to specify the status). If only the status is changed, the previously specified caching behavior control rule will be used.

The table below lists the main status codes and X-Message header values.

Status code X-Message header
202 Accepted: Request was received
200 No services to return: No services (empty list)
400 Invalid Json: Invalid JSON format
400 Invalid entry for pre_fqdn/status: Invalid value
400 Invalid entry for container/object_prefix: Invalid value
400 Invalid entry for key_container/key_object: Invalid value (when the corresponding public key is not stored there)
400 Parameter required: A parameter is required.
409 Service is in progress: Another process is in progress

Request Headers

Refer to "Common API request headers" for details.

Request parameters

service_id

service_id.

Data Type Cardinality
String 1..1

status

New status for the service. Note: If omitted, this item will not be updated
  • activate: Enables content delivery
  • deactivate: Disables content delivery
Data Type Cardinality
String 0..1

container

Container of object storage where the access logs are stored. Note: If omitted, this item will not be updated

If object_prefix is omitted, the previously specified value will be used.
  • If a value is specified: Changes the access log storage destination to the specified location
  • If no value is specified: Stops access logs
Data Type Cardinality
String 0..1

object_prefix

Prefix indicating access log object name. Pseudo path information can be included. Note: If omitted, this item will not be updated

Example: "path/PRE01_", "PRE01_", etc.

Data Type Cardinality
String 0..1

key_container

The container for the object storage where the public key used for encrypting access logs is stored.
  • If the string indicating the container name is specified: Refers to the specified container
  • If no value is specified: Uses the value for container explained above (default)
Data Type Cardinality
String 0..1

key_object

The object name of the public key used for encrypting access logs. Pseudo path information can be included. The public key object must be stored beforehand.
  • If a string indicating an object name is specified: Encrypt access logs
  • If no value is specified: Does not encrypt access logs (default)

    Example: "public_key"

Data Type Cardinality
String 0..1

Request Elements

rules

Caching behavior control rules. Refer to "Appendix A Caching Rules" for details.

Note: If omitted, this item will not be updated

Data Type Cardinality Parent Element Child Element(s)
String 0..1 None Refer to JSON schema for details on the rules.

Response headers

Refer to "Common API response headers" for details.

Location

URL including service_id.

Data Type Cardinality
String 1..1

Response Elements

None.

Example of Response


       PATCH /v1/services/service_id-25/param?status=activate&container=log&object_prefix=acclog&key_container=keys&key_object=public_key
       Content-type:application/json
       Content-Length: 375
       ...
       
       HTTP/1.1 202 Accepted
       X-Message: Accepted
       Location: http://<Endpoint>/v1/services/service_id-25
       Content-Length: 0