update Api
PUT {{baseUrl}}/tyk/apis/:apiID
Updating an API definition uses the same signature an object as a POST
, however it will first ensure that the API ID that is being updated is the same as the one in the object being PUT
.
Updating will completely replace the file descriptor and will not change an API Definition that has already been loaded, the hot-reload endpoint will need to be called to push the new definition to live.
Request Body
{"tags"=>["<string>", "<string>"], "CORS"=>{"allow_credentials"=>"<boolean>", "allowed_headers"=>["<string>", "<string>"], "allowed_methods"=>["<string>", "<string>"], "allowed_origins"=>["<string>", "<string>"], "debug"=>"<boolean>", "enable"=>"<boolean>", "exposed_headers"=>["<string>", "<string>"], "max_age"=>"<long>", "options_passthrough"=>"<boolean>"}, "active"=>"<boolean>", "allowed_ips"=>["<string>", "<string>"], "api_id"=>"<string>", "auth"=>{"auth_header_name"=>"<string>", "cookie_name"=>"<string>", "param_name"=>"<string>", "signature"=>{"algorithm"=>"<string>", "allowed_clock_skew"=>"<long>", "error_code"=>"<long>", "error_message"=>"<string>", "header"=>"<string>", "secret"=>"<string>"}, "use_certificate"=>"<boolean>", "use_cookie"=>"<boolean>", "use_param"=>"<boolean>", "validate_signature"=>"<boolean>"}, "auth_provider"=>{"name"=>"<string>", "storage_engine"=>"<string>"}, "base_identity_provided_by"=>"<string>", "basic_auth"=>{"body_password_regexp"=>"<string>", "body_user_regexp"=>"<string>", "cache_ttl"=>"<long>", "disable_caching"=>"<boolean>", "extract_from_body"=>"<boolean>"}, "blacklisted_ips"=>["<string>", "<string>"], "cache_options"=>{"cache_all_safe_requests"=>"<boolean>", "cache_control_ttl_header"=>"<string>", "cache_response_codes"=>["<long>", "<long>"], "cache_timeout"=>"<long>", "enable_cache"=>"<boolean>", "enable_upstream_cache_control"=>"<boolean>"}, "certificates"=>["<string>", "<string>"], "client_certificates"=>["<string>", "<string>"], "custom_middleware"=>{"auth_check"=>{"name"=>"<string>", "path"=>"<string>", "require_session"=>"<boolean>"}, "driver"=>"<string>", "id_extractor"=>{"extract_from"=>"<string>", "extract_with"=>"<string>"}, "post"=>[{"name"=>"<string>", "path"=>"<string>", "require_session"=>"<boolean>"}, {"name"=>"<string>", "path"=>"<string>", "require_session"=>"<boolean>"}], "post_key_auth"=>[{"name"=>"<string>", "path"=>"<string>", "require_session"=>"<boolean>"}, {"name"=>"<string>", "path"=>"<string>", "require_session"=>"<boolean>"}], "pre"=>[{"name"=>"<string>", "path"=>"<string>", "require_session"=>"<boolean>"}, {"name"=>"<string>", "path"=>"<string>", "require_session"=>"<boolean>"}], "response"=>[{"name"=>"<string>", "path"=>"<string>", "require_session"=>"<boolean>"}, {"name"=>"<string>", "path"=>"<string>", "require_session"=>"<boolean>"}]}, "custom_middleware_bundle"=>"<string>", "definition"=>{"key"=>"<string>", "location"=>"<string>", "strip_path"=>"<boolean>"}, "disable_quota"=>"<boolean>", "disable_rate_limit"=>"<boolean>", "do_not_track"=>"<boolean>", "domain"=>"<string>", "dont_set_quota_on_create"=>"<boolean>", "enable_batch_request_support"=>"<boolean>", "enable_context_vars"=>"<boolean>", "enable_coprocess_auth"=>"<boolean>", "enable_ip_blacklisting"=>"<boolean>", "enable_ip_whitelisting"=>"<boolean>", "enable_jwt"=>"<boolean>", "enable_signature_checking"=>"<boolean>", "event_handlers"=>{"events"=>{"x-go-name"=>"Events"}}, "expire_analytics_after"=>"<long>", "global_rate_limit"=>{"per"=>"<double>", "rate"=>"<double>"}, "hmac_allowed_algorithms"=>["<string>", "<string>"], "hmac_allowed_clock_skew"=>"<double>", "id"=>"<string>", "internal"=>"<boolean>", "jwt_client_base_field"=>"<string>", "jwt_expires_at_validation_skew"=>"<integer>", "jwt_identity_base_field"=>"<string>", "jwt_issued_at_validation_skew"=>"<integer>", "jwt_not_before_validation_skew"=>"<integer>", "jwt_policy_field_name"=>"<string>", "jwt_scope_claim_name"=>"<string>", "jwt_scope_to_policy_mapping"=>{"eu_9ab"=>"<string>", "sunt_fea"=>"<string>"}, "jwt_signing_method"=>"<string>", "jwt_skip_kid"=>"<boolean>", "jwt_source"=>"<string>", "name"=>"<string>", "notifications"=>{"oauth_on_keychange_url"=>"<string>", "shared_secret"=>"<string>"}, "oauth_meta"=>{"allowed_access_types"=>["<string>", "<string>"], "allowed_authorize_types"=>["<string>", "<string>"], "auth_login_redirect"=>"<string>"}, "openid_options"=>{"providers"=>[{"client_ids"=>{"in_cf"=>"<string>", "aliquip_dc2"=>"<string>", "aliquab_"=>"<string>"}, "issuer"=>"<string>"}, {"client_ids"=>{"est_8"=>"<string>"}, "issuer"=>"<string>"}], "segregate_by_client"=>"<boolean>"}, "org_id"=>"<string>", "pinned_public_keys"=>{"exercitation8"=>"<string>"}, "proxy"=>{"check_host_against_uptime_tests"=>"<boolean>", "disable_strip_slash"=>"<boolean>", "enable_load_balancing"=>"<boolean>", "listen_path"=>"<string>", "preserve_host_header"=>"<boolean>", "service_discovery"=>{"cache_timeout"=>"<long>", "data_path"=>"<string>", "endpoint_returns_list"=>"<boolean>", "parent_data_path"=>"<string>", "port_data_path"=>"<string>", "query_endpoint"=>"<string>", "target_path"=>"<string>", "use_discovery_service"=>"<boolean>", "use_nested_query"=>"<boolean>", "use_target_list"=>"<boolean>"}, "strip_listen_path"=>"<boolean>", "target_list"=>["<string>", "<string>"], "target_url"=>"<string>", "transport"=>{"proxy_url"=>"<string>", "ssl_ciphers"=>["<string>", "<string>"], "ssl_insecure_skip_verify"=>"<boolean>", "ssl_min_version"=>"<integer>"}}, "response_processors"=>[{"name"=>"<string>"}, {"name"=>"<string>"}], "session_lifetime"=>"<long>", "session_provider"=>{"name"=>"<string>", "storage_engine"=>"<string>"}, "slug"=>"<string>", "strip_auth_data"=>"<boolean>", "tag_headers"=>["<string>", "<string>"], "upstream_certificates"=>{"deserunt7b"=>"<string>", "mollitb"=>"<string>"}, "uptime_tests"=>{"check_list"=>[{"body"=>"<string>", "headers"=>{"labore_83d"=>"<string>", "et3"=>"<string>"}, "method"=>"<string>", "url"=>"<string>"}, {"body"=>"<string>", "headers"=>{"ad6"=>"<string>", "irurec"=>"<string>"}, "method"=>"<string>", "url"=>"<string>"}], "config"=>{"expire_utime_after"=>"<long>", "recheck_wait"=>"<long>", "service_discovery"=>{"cache_timeout"=>"<long>", "data_path"=>"<string>", "endpoint_returns_list"=>"<boolean>", "parent_data_path"=>"<string>", "port_data_path"=>"<string>", "query_endpoint"=>"<string>", "target_path"=>"<string>", "use_discovery_service"=>"<boolean>", "use_nested_query"=>"<boolean>", "use_target_list"=>"<boolean>"}}}, "use_basic_auth"=>"<boolean>", "use_keyless"=>"<boolean>", "use_mutual_tls_auth"=>"<boolean>", "use_oauth2"=>"<boolean>", "use_openid"=>"<boolean>", "use_standard_auth"=>"<boolean>", "version_data"=>{"default_version"=>"<string>", "not_versioned"=>"<boolean>", "versions"=>{"enim_db"=>{"paths"=>{"black_list"=>["<string>", "<string>"], "ignored"=>["<string>", "<string>"], "white_list"=>["<string>", "<string>"]}, "expires"=>"<string>", "extended_paths"=>{"advance_cache_config"=>[{"cache_response_codes"=>["<long>", "<long>"], "cache_key_regex"=>"<string>", "method"=>"<string>", "path"=>"<string>"}, {"cache_response_codes"=>["<long>", "<long>"], "cache_key_regex"=>"<string>", "method"=>"<string>", "path"=>"<string>"}], "black_list"=>[{"method_actions"=>{"Lorembc3"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"occaecat4"=>"<string>", "Utc"=>"<string>", "do_9_4"=>"<string>"}}, "inf"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"elit_2"=>"<string>"}}}, "path"=>"<string>"}, {"method_actions"=>{"sed_c"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"deserunt_8"=>"<string>", "eta8e"=>"<string>"}}}, "path"=>"<string>"}], "cache"=>["<string>", "<string>"], "circuit_breakers"=>[{"method"=>"<string>", "path"=>"<string>", "return_to_service_after"=>"<long>", "samples"=>"<long>", "threshold_percent"=>"<double>"}, {"method"=>"<string>", "path"=>"<string>", "return_to_service_after"=>"<long>", "samples"=>"<long>", "threshold_percent"=>"<double>"}], "do_not_track_endpoints"=>[{"method"=>"<string>", "path"=>"<string>"}, {"method"=>"<string>", "path"=>"<string>"}], "hard_timeouts"=>[{"method"=>"<string>", "path"=>"<string>", "timeout"=>"<long>"}, {"method"=>"<string>", "path"=>"<string>", "timeout"=>"<long>"}], "ignored"=>[{"method_actions"=>{"deserunt_11"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"dolorea"=>"<string>", "cillum_3"=>"<string>", "eiusmod_9"=>"<string>"}}}, "path"=>"<string>"}, {"method_actions"=>{"eab3d"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"pariatur_b3"=>"<string>"}}, "laborum_b3b"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"quis5"=>"<string>", "fugiat_d6"=>"<string>", "fugiat_085"=>"<string>"}}, "non_1"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"non_e3"=>"<string>"}}}, "path"=>"<string>"}], "internal"=>[{"method"=>"<string>", "path"=>"<string>"}, {"method"=>"<string>", "path"=>"<string>"}], "method_transforms"=>[{"method"=>"<string>", "path"=>"<string>", "to_method"=>"<string>"}, {"method"=>"<string>", "path"=>"<string>", "to_method"=>"<string>"}], "size_limits"=>[{"method"=>"<string>", "path"=>"<string>", "size_limit"=>"<long>"}, {"method"=>"<string>", "path"=>"<string>", "size_limit"=>"<long>"}], "track_endpoints"=>[{"method"=>"<string>", "path"=>"<string>"}, {"method"=>"<string>", "path"=>"<string>"}], "transform"=>[{"method"=>"<string>", "path"=>"<string>", "template_data"=>{"enable_session"=>"<boolean>", "input_type"=>"<string>", "template_mode"=>"<string>", "template_source"=>"<string>"}}, {"method"=>"<string>", "path"=>"<string>", "template_data"=>{"enable_session"=>"<boolean>", "input_type"=>"<string>", "template_mode"=>"<string>", "template_source"=>"<string>"}}], "transform_headers"=>[{"act_on"=>"<boolean>", "add_headers"=>{"esse3fd"=>"<string>", "aliquip_218"=>"<string>"}, "delete_headers"=>["<string>", "<string>"], "method"=>"<string>", "path"=>"<string>"}, {"act_on"=>"<boolean>", "add_headers"=>{"inb_b"=>"<string>", "suntb2"=>"<string>"}, "delete_headers"=>["<string>", "<string>"], "method"=>"<string>", "path"=>"<string>"}], "transform_jq"=>[{"filter"=>"<string>", "method"=>"<string>", "path"=>"<string>"}, {"filter"=>"<string>", "method"=>"<string>", "path"=>"<string>"}], "transform_jq_response"=>[{"filter"=>"<string>", "method"=>"<string>", "path"=>"<string>"}, {"filter"=>"<string>", "method"=>"<string>", "path"=>"<string>"}], "transform_response"=>[{"method"=>"<string>", "path"=>"<string>", "template_data"=>{"enable_session"=>"<boolean>", "input_type"=>"<string>", "template_mode"=>"<string>", "template_source"=>"<string>"}}, {"method"=>"<string>", "path"=>"<string>", "template_data"=>{"enable_session"=>"<boolean>", "input_type"=>"<string>", "template_mode"=>"<string>", "template_source"=>"<string>"}}], "transform_response_headers"=>[{"act_on"=>"<boolean>", "add_headers"=>{"mollit_00"=>"<string>", "ea_cd9"=>"<string>"}, "delete_headers"=>["<string>", "<string>"], "method"=>"<string>", "path"=>"<string>"}, {"act_on"=>"<boolean>", "add_headers"=>{"ullamco_2c8"=>"<string>"}, "delete_headers"=>["<string>", "<string>"], "method"=>"<string>", "path"=>"<string>"}], "url_rewrites"=>[{"MatchRegexp"=>{"FromCache"=>"<boolean>"}, "match_pattern"=>"<string>", "method"=>"<string>", "path"=>"<string>", "rewrite_to"=>"<string>", "triggers"=>[{"on"=>"<string>", "options"=>{"header_matches"=>{"adipisicing51d"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "dolor1a"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "path_part_matches"=>{"ullamcoaf"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "payload_matches"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "query_val_matches"=>{"nostrud_b"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "consequat_c0"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "request_context_matches"=>{"ad_a"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "voluptate_d9"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "session_meta_matches"=>{"dolorec3"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "ut__"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}}, "rewrite_to"=>"<string>"}, {"on"=>"<string>", "options"=>{"header_matches"=>{"cillum_0"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "path_part_matches"=>{"aute737"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "Excepteur_0"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "payload_matches"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "query_val_matches"=>{"eu_34"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "enim2"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "labore_a7c"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "request_context_matches"=>{"Excepteurc"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "consequat_4_e"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "ullamco1"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "session_meta_matches"=>{"incididunt_a"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}}, "rewrite_to"=>"<string>"}]}, {"MatchRegexp"=>{"FromCache"=>"<boolean>"}, "match_pattern"=>"<string>", "method"=>"<string>", "path"=>"<string>", "rewrite_to"=>"<string>", "triggers"=>[{"on"=>"<string>", "options"=>{"header_matches"=>{"quis_289"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "path_part_matches"=>{"cupidatat_de8"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "payload_matches"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "query_val_matches"=>{"elit_9ef"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "request_context_matches"=>{"nostrud36"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "id_8"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "dolor_9"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "session_meta_matches"=>{"Excepteur2"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "deserunt_6"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}}, "rewrite_to"=>"<string>"}, {"on"=>"<string>", "options"=>{"header_matches"=>{"laborum87"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "dolor_ce"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "path_part_matches"=>{"consecteturc1b"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "incididunt_f"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "payload_matches"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "query_val_matches"=>{"aute__d"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "request_context_matches"=>{"eu3_"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "esse_b1"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "session_meta_matches"=>{"minim_77"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}}, "rewrite_to"=>"<string>"}]}], "validate_json"=>[{"error_response_code"=>"<long>", "method"=>"<string>", "path"=>"<string>", "schema_b64"=>"<string>"}, {"error_response_code"=>"<long>", "method"=>"<string>", "path"=>"<string>", "schema_b64"=>"<string>"}], "virtual"=>[{"function_source_type"=>"<string>", "function_source_uri"=>"<string>", "method"=>"<string>", "path"=>"<string>", "proxy_on_error"=>"<boolean>", "response_function_name"=>"<string>", "use_session"=>"<boolean>"}, {"function_source_type"=>"<string>", "function_source_uri"=>"<string>", "method"=>"<string>", "path"=>"<string>", "proxy_on_error"=>"<boolean>", "response_function_name"=>"<string>", "use_session"=>"<boolean>"}], "white_list"=>[{"method_actions"=>{"consequat_0"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"aliquip_df"=>"<string>", "sint8"=>"<string>"}}, "proident438"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"do_8"=>"<string>"}}, "culpa014"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"ad_af"=>"<string>"}}}, "path"=>"<string>"}, {"method_actions"=>{"incididunte4"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"dolor86d"=>"<string>"}}}, "path"=>"<string>"}]}, "global_headers"=>{"id_e34"=>"<string>", "magna53"=>"<string>"}, "global_headers_remove"=>["<string>", "<string>"], "global_size_limit"=>"<long>", "name"=>"<string>", "override_target"=>"<string>", "use_extended_paths"=>"<boolean>"}}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"action":"\u003cstring\u003e","key":"\u003cstring\u003e","key_hash":"\u003cstring\u003e","status":"\u003cstring\u003e"}