Skip to main content

Update an existing behavior

PUT 

https://manage.ioriver.io/api/v1/services/:service_id/behaviors/:id/

Updates an existing behavior of a service.

Request

Path Parameters

    id uuidrequired
    service_id uuidrequired

Bodyrequired

    additional_pathsstringnullable
    behavior_actions object[]required
  • Array [
  • allowed_methodsstring
    auto_minifystringnullable

    Possible values: <= 1024 characters

    cache_behavior_valuestringnullable

    Possible values: <= 255 characters

    cache_keystringnullable
    cached_methodsstring
    cookiestringnullable

    Possible values: <= 255 characters

    cors_allow_origin_domainboolean
    deny_access_by_ipnullable
    deny_access_by_timenullable
    enabledbooleannullable
    generate_preflight_allowed_headersstringnullable
    host_headerstringnullable

    Possible values: <= 255 characters

    max_ttlintegernullable

    Possible values: >= -2147483648 and <= 2147483647

    originuuidnullable
    origin_cache_control_enabledbooleannullable
    override_header_valuebooleannullable
    patternstringnullable

    Possible values: <= 1024 characters

    redirect_sourcestringnullable
    redirect_urlstringnullable
    request_header_namestringnullable

    Possible values: <= 255 characters

    request_header_valuestringnullable

    Possible values: <= 255 characters

    response_header_namestringnullable

    Possible values: <= 1024 characters

    response_header_valuestringnullable

    Possible values: <= 1024 characters

    response_page_pathstringnullable
    status_codeintegernullable

    Possible values: >= -2147483648 and <= 2147483647

    typestringrequired

    Possible values: <= 255 characters

    unified_log_destinationuuidnullable
    unified_log_sampling_rateintegernullable

    Possible values: >= -2147483648 and <= 2147483647

    url_rewrite_destinationstringnullable
    url_rewrite_sourcestringnullable
    use_domain_originbooleannullable
    viewer_protocol objectnullable
    oneOf
    string
    • HTTP_AND_HTTPS - Http And Https
    • HTTPS_ONLY - Https Only
    • REDIRECT_HTTP_TO_HTTPS - Redirect Http To Https

    Possible values: [HTTP_AND_HTTPS, HTTPS_ONLY, REDIRECT_HTTP_TO_HTTPS]

  • ]
  • complex_conditionnullable
    is_defaultboolean
    is_partially_containedboolean
    namestringrequired

    Possible values: <= 255 characters, Value must match regular expression ^[a-zA-Z0-9_\-\s]*$

    path_patternstring

    Possible values: <= 1024 characters

    serviceuuidrequired

Responses

Schema
    additional_pathsstringnullable
    behavior_actions object[]required
  • Array [
  • allowed_methodsstring
    auto_minifystringnullable

    Possible values: <= 1024 characters

    cache_behavior_valuestringnullable

    Possible values: <= 255 characters

    cache_keystringnullable
    cached_methodsstring
    cookiestringnullable

    Possible values: <= 255 characters

    cors_allow_origin_domainboolean
    deny_access_by_ipnullable
    deny_access_by_timenullable
    enabledbooleannullable
    generate_preflight_allowed_headersstringnullable
    host_headerstringnullable

    Possible values: <= 255 characters

    iduuidrequired
    max_ttlintegernullable

    Possible values: >= -2147483648 and <= 2147483647

    originuuidnullable
    origin_cache_control_enabledbooleannullable
    override_header_valuebooleannullable
    patternstringnullable

    Possible values: <= 1024 characters

    redirect_sourcestringnullable
    redirect_urlstringnullable
    request_header_namestringnullable

    Possible values: <= 255 characters

    request_header_valuestringnullable

    Possible values: <= 255 characters

    response_header_namestringnullable

    Possible values: <= 1024 characters

    response_header_valuestringnullable

    Possible values: <= 1024 characters

    response_page_pathstringnullable
    status_codeintegernullable

    Possible values: >= -2147483648 and <= 2147483647

    typestringrequired

    Possible values: <= 255 characters

    unified_log_destinationuuidnullable
    unified_log_sampling_rateintegernullable

    Possible values: >= -2147483648 and <= 2147483647

    url_rewrite_destinationstringnullable
    url_rewrite_sourcestringnullable
    use_domain_originbooleannullable
    viewer_protocol objectnullable
    oneOf
    string
    • HTTP_AND_HTTPS - Http And Https
    • HTTPS_ONLY - Https Only
    • REDIRECT_HTTP_TO_HTTPS - Redirect Http To Https

    Possible values: [HTTP_AND_HTTPS, HTTPS_ONLY, REDIRECT_HTTP_TO_HTTPS]

  • ]
  • complex_conditionnullable
    iduuidrequired
    is_defaultboolean
    is_partially_containedboolean
    namestringrequired

    Possible values: <= 255 characters, Value must match regular expression ^[a-zA-Z0-9_\-\s]*$

    path_patternstring

    Possible values: <= 1024 characters

    serviceuuidrequired

Authorization: Authorization

name: Authorizationtype: apiKeydescription: Value should be formatted: `Token <key>`in: header
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://manage.ioriver.io/api/v1/services/:service_id/behaviors/:id/");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "<Authorization>");
var content = new StringContent("{\n \"additional_paths\": \"string\",\n \"behavior_actions\": [\n {\n \"allowed_methods\": \"string\",\n \"auto_minify\": \"string\",\n \"cache_behavior_value\": \"string\",\n \"cache_key\": \"string\",\n \"cached_methods\": \"string\",\n \"cookie\": \"string\",\n \"cors_allow_origin_domain\": true,\n \"enabled\": true,\n \"generate_preflight_allowed_headers\": \"string\",\n \"host_header\": \"string\",\n \"max_ttl\": 0,\n \"origin\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"origin_cache_control_enabled\": true,\n \"override_header_value\": true,\n \"pattern\": \"string\",\n \"redirect_source\": \"string\",\n \"redirect_url\": \"string\",\n \"request_header_name\": \"string\",\n \"request_header_value\": \"string\",\n \"response_header_name\": \"string\",\n \"response_header_value\": \"string\",\n \"response_page_path\": \"string\",\n \"status_code\": 0,\n \"type\": \"string\",\n \"unified_log_destination\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"unified_log_sampling_rate\": 0,\n \"url_rewrite_destination\": \"string\",\n \"url_rewrite_source\": \"string\",\n \"use_domain_origin\": true,\n \"viewer_protocol\": \"HTTP_AND_HTTPS\"\n }\n ],\n \"is_default\": true,\n \"is_partially_contained\": true,\n \"name\": \"string\",\n \"path_pattern\": \"string\",\n \"service\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://manage.ioriver.io
Auth
Parameters
— pathrequired
— pathrequired
Body required
{
  "additional_paths": "string",
  "behavior_actions": [
    {
      "allowed_methods": "string",
      "auto_minify": "string",
      "cache_behavior_value": "string",
      "cache_key": "string",
      "cached_methods": "string",
      "cookie": "string",
      "cors_allow_origin_domain": true,
      "enabled": true,
      "generate_preflight_allowed_headers": "string",
      "host_header": "string",
      "max_ttl": 0,
      "origin": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "origin_cache_control_enabled": true,
      "override_header_value": true,
      "pattern": "string",
      "redirect_source": "string",
      "redirect_url": "string",
      "request_header_name": "string",
      "request_header_value": "string",
      "response_header_name": "string",
      "response_header_value": "string",
      "response_page_path": "string",
      "status_code": 0,
      "type": "string",
      "unified_log_destination": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "unified_log_sampling_rate": 0,
      "url_rewrite_destination": "string",
      "url_rewrite_source": "string",
      "use_domain_origin": true,
      "viewer_protocol": "HTTP_AND_HTTPS"
    }
  ],
  "is_default": true,
  "is_partially_contained": true,
  "name": "string",
  "path_pattern": "string",
  "service": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
ResponseClear

Click the Send API Request button above and see the response here!