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"=>{"exercitation7a"=>"<string>", "sitf82"=>"<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"=>{"laborum_"=>"<string>"}, "issuer"=>"<string>"}, {"client_ids"=>{"enimd7"=>"<string>"}, "issuer"=>"<string>"}], "segregate_by_client"=>"<boolean>"}, "org_id"=>"<string>", "pinned_public_keys"=>{"consequata1"=>"<string>", "Utbb0"=>"<string>", "exercitationb_8"=>"<string>", "in_a58"=>"<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"=>{"ea_76"=>"<string>", "cupidatat__6"=>"<string>", "magnaa"=>"<string>"}, "uptime_tests"=>{"check_list"=>[{"body"=>"<string>", "headers"=>{"ind16"=>"<string>"}, "method"=>"<string>", "url"=>"<string>"}, {"body"=>"<string>", "headers"=>{"et_5"=>"<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"=>{"in968"=>{"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"=>{"adipisicingf65"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"aliquip28"=>"<string>", "consequatc3"=>"<string>", "fugiat_5f"=>"<string>"}}, "minim_331"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"cillum_84d"=>"<string>"}}}, "path"=>"<string>"}, {"method_actions"=>{"eiusmodd5"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"mollit3"=>"<string>"}}, "commodo_e"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"reprehenderit_6_c"=>"<string>", "dolore_d"=>"<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"=>{"deseruntd"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"non_ae"=>"<string>"}}, "Loremff_"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"quis_47"=>"<string>"}}, "eu_d12"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"est3"=>"<string>", "adipisicingd"=>"<string>", "adipisicing_5e"=>"<string>"}}}, "path"=>"<string>"}, {"method_actions"=>{"fugiat58"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"veniamac"=>"<string>", "eu965"=>"<string>"}}, "adipisicing40a"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"estc0b"=>"<string>", "adipisicing08"=>"<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"=>{"amet8"=>"<string>", "sed60"=>"<string>"}, "delete_headers"=>["<string>", "<string>"], "method"=>"<string>", "path"=>"<string>"}, {"act_on"=>"<boolean>", "add_headers"=>{"ullamco_d1"=>"<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"=>{"pariatur_f3"=>"<string>", "utd"=>"<string>", "in4a"=>"<string>"}, "delete_headers"=>["<string>", "<string>"], "method"=>"<string>", "path"=>"<string>"}, {"act_on"=>"<boolean>", "add_headers"=>{"autedc4"=>"<string>", "sunt_bc8"=>"<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"=>{"enim_3a"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "path_part_matches"=>{"pariatur3"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "culpa5"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "payload_matches"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "query_val_matches"=>{"qui_8cf"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "adipisicing_d"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "request_context_matches"=>{"est_16"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "anim_b"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "session_meta_matches"=>{"inf0"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "veniam987"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}}, "rewrite_to"=>"<string>"}, {"on"=>"<string>", "options"=>{"header_matches"=>{"esse0"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "eiusmod7"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "deserunte3"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "path_part_matches"=>{"ine"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "payload_matches"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "query_val_matches"=>{"ut_9"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "request_context_matches"=>{"temporc1d"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "non_90"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "session_meta_matches"=>{"sint_b"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "veniam_6"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "veniam3f"=>{"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"=>{"laboris_f"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "path_part_matches"=>{"aliquip3a_"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "exercitation_318"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "payload_matches"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "query_val_matches"=>{"dolor_6"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "voluptated9"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "request_context_matches"=>{"voluptate_b"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "session_meta_matches"=>{"officia_da3"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "nisi6e"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "amete3"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "laborum_f"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}}, "rewrite_to"=>"<string>"}, {"on"=>"<string>", "options"=>{"header_matches"=>{"pariatur5"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "ea_ad"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "path_part_matches"=>{"dolore7"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "amet17"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "payload_matches"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "query_val_matches"=>{"nulla_1e_"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "request_context_matches"=>{"cupidatat_73"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "session_meta_matches"=>{"veniam__"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "laboris756"=>{"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"=>{"aute3b"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"aute52b"=>"<string>"}}, "laboris94"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"nostrudbdb"=>"<string>", "utc"=>"<string>", "eu_8"=>"<string>", "adipisicing5e6"=>"<string>"}}}, "path"=>"<string>"}, {"method_actions"=>{"cupidatat_17"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"doloreb"=>"<string>"}}, "nostrud_31"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"aliqua684"=>"<string>", "ipsum_d"=>"<string>"}}, "eab88"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"voluptate82f"=>"<string>", "amet_20"=>"<string>"}}, "qui_22"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"sed9ee"=>"<string>", "nisi5"=>"<string>"}}}, "path"=>"<string>"}]}, "global_headers"=>{"ad02"=>"<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"}