create Api

POST {{baseUrl}}/tyk/apis?base_api_id=<string>&base_api_version_name=<string>&new_version_name=<string>&set_default=<boolean>

Create API A single Tyk node can have its API Definitions queried, deleted and updated remotely. This functionality enables you to remotely update your Tyk definitions without having to manage the files manually.

Request Params

KeyDatatypeRequiredDescription
base_api_idstringThe base API which the new version will be linked to.
base_api_version_namestringThe version name of the base API while creating the first version. This doesn't have to be sent for the next versions but if it is set, it will override base API version name.
new_version_namestringThe version name of the created version.
set_defaultstringIf true, the new version is set as default version.

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"=>{"ut_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"=>{"non_0b5"=>"<string>", "incididunt_1ef"=>"<string>", "commodoc"=>"<string>"}, "issuer"=>"<string>"}, {"client_ids"=>{"sint_f01"=>"<string>"}, "issuer"=>"<string>"}], "segregate_by_client"=>"<boolean>"}, "org_id"=>"<string>", "pinned_public_keys"=>{"sit_74"=>"<string>", "eu_06"=>"<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"=>{"Duis3"=>"<string>", "pariatur6c_"=>"<string>"}, "uptime_tests"=>{"check_list"=>[{"body"=>"<string>", "headers"=>{"consequat1_2"=>"<string>"}, "method"=>"<string>", "url"=>"<string>"}, {"body"=>"<string>", "headers"=>{"esse08a"=>"<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"=>{"eiusmod_"=>{"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"=>{"occaecat_d_8"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"aliquip_a6b"=>"<string>", "eiusmod_"=>"<string>"}}, "eiusmod21d"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"dolora_"=>"<string>"}}, "reprehenderit_70"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"Excepteur_1"=>"<string>", "nulla_4b"=>"<string>"}}}, "path"=>"<string>"}, {"method_actions"=>{"nisib"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"nisi_db"=>"<string>", "Excepteur_6c_"=>"<string>"}}, "dolore_9"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"doloree"=>"<string>", "laboris2"=>"<string>", "culpa_cf5"=>"<string>", "nostrud_"=>"<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"=>{"dolore5"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"sint_8ad"=>"<string>", "incididunt8d1"=>"<string>", "nulla_23b"=>"<string>", "ipsum_69"=>"<string>", "esse_54_"=>"<string>"}}, "elit_1f1"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"fugiat3"=>"<string>"}}, "veniam7"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"sintfb"=>"<string>", "Duis_b45"=>"<string>"}}, "occaecat_415"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"fugiat5"=>"<string>"}}}, "path"=>"<string>"}, {"method_actions"=>{"cillumc"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"est_4"=>"<string>"}}, "occaecat_964"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"minim_3"=>"<string>", "fugiat_9e_"=>"<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"=>{"veniam_b43"=>"<string>", "animf"=>"<string>"}, "delete_headers"=>["<string>", "<string>"], "method"=>"<string>", "path"=>"<string>"}, {"act_on"=>"<boolean>", "add_headers"=>{"eub4"=>"<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"=>{"tempor_854"=>"<string>"}, "delete_headers"=>["<string>", "<string>"], "method"=>"<string>", "path"=>"<string>"}, {"act_on"=>"<boolean>", "add_headers"=>{"eiusmod46"=>"<string>", "magna_"=>"<string>", "in__6"=>"<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"=>{"minim_094"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "exercitation_a21"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "minim_3ea"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "path_part_matches"=>{"proident_c0"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "payload_matches"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "query_val_matches"=>{"sitc"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "request_context_matches"=>{"veniam9"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "incididunt_cd"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "occaecat_a66"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "session_meta_matches"=>{"nostrud_47"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "fugiat_cd3"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}}, "rewrite_to"=>"<string>"}, {"on"=>"<string>", "options"=>{"header_matches"=>{"incididunt__d9"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "path_part_matches"=>{"ipsum__b7"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "sed___9"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "essee4"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "cillum7a2"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "payload_matches"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "query_val_matches"=>{"nostrud_2"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "request_context_matches"=>{"consequatf"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "laboris_5_"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "doloref_"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "session_meta_matches"=>{"enim_e"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "cupidatat_b"=>{"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"=>{"adipisicingfc"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "ad900"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "path_part_matches"=>{"incididunt_f"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "payload_matches"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "query_val_matches"=>{"exercitation9ae"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "request_context_matches"=>{"ut_051"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "session_meta_matches"=>{"quis3"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}}, "rewrite_to"=>"<string>"}, {"on"=>"<string>", "options"=>{"header_matches"=>{"enim_01"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "dolore_a_b"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "pariature"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "ut6"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "path_part_matches"=>{"eu5"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "incididunt_456"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "eiusmod_90"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "payload_matches"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "query_val_matches"=>{"fugiata"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "do8"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "culpa_c"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "request_context_matches"=>{"culpa_fc"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "veniam_935"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "voluptate0"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}}, "session_meta_matches"=>{"qui_4"=>{"match_rx"=>"<string>", "reverse"=>"<boolean>"}, "officia_5_"=>{"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"=>{"labore_626"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"sinte"=>"<string>", "inea"=>"<string>"}}}, "path"=>"<string>"}, {"method_actions"=>{"idc"=>{"action"=>"<string>", "code"=>"<long>", "data"=>"<string>", "headers"=>{"dolor066"=>"<string>", "exa"=>"<string>"}}}, "path"=>"<string>"}]}, "global_headers"=>{"laborum_92e"=>"<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;}