Update API Definition

PUT {{baseUrl}}/api/apis/:id

Update an API Definition. apiid can be updated for On-Premise installations, but it cannot be updated when the Dashboard resides in Tyk Cloud. Updates to apiid in Tyk Cloud will be ignored.

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"=>{"etfa"=>"<string>", "deserunt0d"=>"<string>", "ad_c7"=>"<string>", "tempor_b6"=>"<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"=>{"dolor19"=>"<string>"}, "issuer"=>"<string>"}, {"client_ids"=>{"ut_d"=>"<string>", "quis_2e_"=>"<string>", "voluptate_93"=>"<string>", "quis7a2"=>"<string>"}, "issuer"=>"<string>"}], "segregate_by_client"=>"<boolean>"}, "org_id"=>"<string>", "pinned_public_keys"=>{"ullamco50c"=>"<string>", "nostrud_68"=>"<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"=>{"ut_38d"=>"<string>", "magna64e"=>"<string>"}, "uptime_tests"=>{"check_list"=>[{"body"=>"<string>", "headers"=>{"consequat94f"=>"<string>"}, "method"=>"<string>", "url"=>"<string>"}, {"body"=>"<string>", "headers"=>{"occaecat1ca"=>"<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"=>{"Duis_29"=>{"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"=>{"laboris9_"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"enim98"=>"<string>", "culpad5b"=>"<string>"}}, "reprehenderitdb"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"quis6"=>"<string>"}}, "dolore_6"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"nulla_c08"=>"<string>", "aliqua_3a"=>"<string>"}}, "consectetur037"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"enimbee"=>"<string>", "reprehenderit_232"=>"<string>"}}, "et9a0"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"commodo7"=>"<string>", "nostrud9"=>"<string>", "elit_ca"=>"<string>"}}}, "path"=>"<string>"}, {"method_actions"=>{"suntc54"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"esse_eb"=>"<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"=>{"consectetur_a"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"sit403"=>"<string>", "ind"=>"<string>"}}}, "path"=>"<string>"}, {"method_actions"=>{"Duis__"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"velit_0f"=>"<string>", "commodo7c0"=>"<string>", "anim5"=>"<string>"}}, "consequat853"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"non6e"=>"<string>"}}, "pariatur_13d"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"sedd"=>"<string>", "nisi_e5"=>"<string>"}}, "magna28"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"proident_ee"=>"<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"=>{"velit7b4"=>"<string>", "Duis_cfa"=>"<string>", "exercitation7"=>"<string>"}, "delete_headers"=>["<string>", "<string>"], "method"=>"<string>", "path"=>"<string>"}, {"act_on"=>"<boolean>", "add_headers"=>{"auteda9"=>"<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"=>{"in_03"=>"<string>", "suntb6"=>"<string>"}, "delete_headers"=>["<string>", "<string>"], "method"=>"<string>", "path"=>"<string>"}, {"act_on"=>"<boolean>", "add_headers"=>{"voluptate_f"=>"<string>", "nisi99b"=>"<string>", "ad_1"=>"<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"=>{"laboris_47c"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "path_part_matches"=>{"amet5"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "minim605"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "ullamco_c6d"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "payload_matches"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "query_val_matches"=>{"do5_a"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "request_context_matches"=>{"magna644"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "sed72"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "tempor_5"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "session_meta_matches"=>{"occaecat_e9a"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}}, "rewrite_to"=>"<string>"}, {"on"=>"<string>", "options"=>{"header_matches"=>{"laborisb"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "path_part_matches"=>{"incididunt__"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "payload_matches"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "query_val_matches"=>{"est_446"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "request_context_matches"=>{"culpa_80"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "session_meta_matches"=>{"aute_fc"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "sunt__"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "et_da"=>{"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"=>{"ut_55b"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "path_part_matches"=>{"Excepteur13"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "laborec"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "adipisicing_cb_"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "payload_matches"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "query_val_matches"=>{"occaecat83b"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "nond"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "cupidatat_e"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "request_context_matches"=>{"nisi_1b7"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "session_meta_matches"=>{"veniam7_"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "nullab"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}}, "rewrite_to"=>"<string>"}, {"on"=>"<string>", "options"=>{"header_matches"=>{"nulla_36"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "path_part_matches"=>{"aute_47"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "payload_matches"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "query_val_matches"=>{"nisi_33"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "request_context_matches"=>{"enim8"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "session_meta_matches"=>{"Lorem6_"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "tempord73"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "ad9fe"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "do_b8"=>{"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"=>{"ut_6"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"laboris7af"=>"<string>", "dolor_47"=>"<string>"}}}, "path"=>"<string>"}, {"method_actions"=>{"do_d"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"in_5_"=>"<string>"}}}, "path"=>"<string>"}]}, "global_headers"=>{"do__"=>"<string>", "culpaa"=>"<string>"}, "global_headers_remove"=>["<string>", "<string>"], "global_size_limit"=>"<long>", "name"=>"<string>", "override_target"=>"<string>", "use_extended_paths"=>"<boolean>"}}}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;action&quot;:&quot;\u003cstring\u003e&quot;,&quot;key&quot;:&quot;\u003cstring\u003e&quot;,&quot;key_hash&quot;:&quot;\u003cstring\u003e&quot;,&quot;status&quot;:&quot;\u003cstring\u003e&quot;}