{ "basePath": "/", "consumes": [ "application/json" ], "definitions": { "bad_input": { "properties": { "errors": { "additionalProperties": { "type": "string" }, "type": "object" }, "message": { "type": "string" } }, "type": "object" }, "cleanable_job_result": { "properties": { "filename": { "type": "string" }, "length": { "type": "integer" }, "namespace": { "type": "string" }, "token": { "type": "string" }, "type": { "type": "string" }, "upload_date": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string" }, "user": { "$ref": "#/definitions/model_user" } }, "type": "object" }, "cleanable_job_result_page": { "properties": { "count": { "type": "integer" }, "next": { "type": "string", "x-nullable": true }, "previous": { "type": "string", "x-nullable": true }, "results": { "items": { "$ref": "#/definitions/cleanable_job_result" }, "type": "array" }, "total_length": { "type": "integer" } }, "type": "object" }, "engine_license": { "properties": { "expiration_date": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string", "x-nullable": true }, "license": { "type": "string", "x-nullable": true }, "usi": { "type": "string", "x-nullable": true } }, "type": "object" }, "files_not_found": { "properties": { "filename": { "items": { "type": "string" }, "type": "array" }, "hypercube_token": { "items": { "type": "string" }, "type": "array" }, "message": { "type": "string" }, "token": { "items": { "type": "string" }, "type": "array" } }, "type": "object" }, "forwarded_token_response": { "properties": { "access_token": { "type": "string" }, "expires_in": { "type": "integer" }, "id_token": { "type": "string", "x-nullable": true }, "refresh_token": { "type": "string", "x-nullable": true }, "scope": { "type": "string", "x-nullable": true }, "token_type": { "type": "string" } }, "type": "object" }, "generic_key_value_pair": { "properties": { "key": { "type": "string" }, "value": { "type": "string" } }, "type": "object" }, "hypercube": { "properties": { "access_groups": { "items": { "type": "string" }, "type": "array", "x-nullable": true }, "arguments": { "items": { "type": "string" }, "type": "array" }, "dep_tokens": { "items": { "type": "string" }, "type": "array", "x-nullable": true }, "finished": { "type": "integer" }, "finished_at": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string", "x-nullable": true }, "is_data_provided": { "type": "boolean" }, "is_temporary_model": { "type": "boolean" }, "job_count": { "type": "integer" }, "labels": { "$ref": "#/definitions/model_job_labels", "x-nullable": true }, "model": { "type": "string" }, "namespace": { "type": "string" }, "result_exists": { "type": "boolean", "x-nullable": true }, "status": { "type": "integer" }, "submitted_at": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string" }, "successfully_finished": { "type": "integer" }, "tag": { "type": "string", "x-nullable": true }, "token": { "type": "string" }, "user": { "$ref": "#/definitions/model_user" } }, "type": "object", "x-mask": "{arguments,status,finished,successfully_finished,is_data_provided,is_temporary_model,job_count,model,namespace,submitted_at,finished_at,token,user,dep_tokens,labels,result_exists}" }, "hypercube_page": { "properties": { "count": { "type": "integer" }, "next": { "type": "string", "x-nullable": true }, "previous": { "type": "string", "x-nullable": true }, "results": { "items": { "$ref": "#/definitions/hypercube" }, "type": "array" } }, "type": "object" }, "hypercube_summary": { "properties": { "finished": { "type": "integer" }, "finished_with_status_code_zero": { "type": "integer" }, "job_count": { "type": "integer" } }, "type": "object" }, "hypercube_token": { "properties": { "hypercube_token": { "type": "string" }, "quota_warning": { "items": { "$ref": "#/definitions/quota" }, "type": "array" } }, "type": "object" }, "identity_provider": { "properties": { "hidden": { "type": "boolean" }, "is_ldap_identity_provider": { "type": "boolean" }, "is_main_identity_provider": { "type": "boolean" }, "label": { "type": "string" }, "name": { "type": "string" }, "oauth2": { "$ref": "#/definitions/identity_provider_oauth2" }, "oidc": { "$ref": "#/definitions/identity_provider_oidc" } }, "type": "object" }, "identity_provider_ldap": { "properties": { "active_directory": { "type": "boolean" }, "base": { "type": "string" }, "bind_dn": { "type": "string", "x-nullable": true }, "encryption": { "type": "string" }, "hidden": { "type": "boolean" }, "host": { "type": "string" }, "label": { "type": "string" }, "name": { "type": "string" }, "password": { "type": "string", "x-nullable": true }, "port": { "type": "integer" }, "uid": { "type": "string" }, "user_filter": { "type": "string" }, "verify_certificates": { "type": "boolean" } }, "type": "object" }, "identity_provider_oauth2": { "properties": { "authorization_endpoint": { "type": "string" }, "device_authorization_endpoint": { "type": "string", "x-nullable": true }, "device_client_id": { "type": "string", "x-nullable": true }, "end_session_endpoint": { "type": "string", "x-nullable": true }, "grant_types_supported": { "items": { "type": "string" }, "type": "array" }, "has_web_ui_client_secret": { "type": "boolean" }, "issuer": { "type": "string" }, "jwks_uri": { "type": "string" }, "override_audience": { "type": "string", "x-nullable": true }, "response_types_supported": { "items": { "type": "string" }, "type": "array" }, "scopes": { "items": { "$ref": "#/definitions/identity_provider_oauth2_scope" }, "type": "array" }, "token_endpoint": { "type": "string", "x-nullable": true }, "token_endpoint_auth_methods_supported": { "items": { "type": "string" }, "type": "array" }, "web_ui_client_id": { "type": "string" } }, "type": "object" }, "identity_provider_oauth2_scope": { "properties": { "request_scope": { "type": "string" }, "scope": { "type": "string" } }, "type": "object" }, "identity_provider_oauth2_with_secret": { "properties": { "authorization_endpoint": { "type": "string" }, "device_authorization_endpoint": { "type": "string", "x-nullable": true }, "device_client_id": { "type": "string", "x-nullable": true }, "end_session_endpoint": { "type": "string", "x-nullable": true }, "grant_types_supported": { "items": { "type": "string" }, "type": "array" }, "hidden": { "type": "boolean" }, "issuer": { "type": "string" }, "jwks_uri": { "type": "string" }, "label": { "type": "string" }, "name": { "type": "string" }, "override_audience": { "type": "string", "x-nullable": true }, "response_types_supported": { "items": { "type": "string" }, "type": "array" }, "scopes": { "items": { "$ref": "#/definitions/identity_provider_oauth2_scope" }, "type": "array" }, "token_endpoint": { "type": "string", "x-nullable": true }, "token_endpoint_auth_methods_supported": { "items": { "type": "string" }, "type": "array" }, "web_ui_client_id": { "type": "string" }, "web_ui_client_secret": { "type": "string" } }, "type": "object" }, "identity_provider_oidc": { "properties": { "authorization_endpoint": { "type": "string" }, "device_authorization_endpoint": { "type": "string", "x-nullable": true }, "device_client_id": { "type": "string", "x-nullable": true }, "end_session_endpoint": { "type": "string", "x-nullable": true }, "extra_client_ids": { "items": { "type": "string" }, "type": "array" }, "has_device_client_secret": { "type": "boolean" }, "has_web_ui_client_secret": { "type": "boolean" }, "issuer": { "type": "string" }, "jwks_uri": { "type": "string" }, "scopes": { "items": { "type": "string" }, "type": "array" }, "token_endpoint": { "type": "string", "x-nullable": true }, "token_endpoint_auth_methods_supported": { "items": { "type": "string" }, "type": "array" }, "uid": { "type": "string" }, "web_ui_client_id": { "type": "string" } }, "type": "object" }, "identity_provider_oidc_with_secret": { "properties": { "authorization_endpoint": { "type": "string" }, "device_authorization_endpoint": { "type": "string", "x-nullable": true }, "device_client_id": { "type": "string", "x-nullable": true }, "device_client_secret": { "type": "string" }, "end_session_endpoint": { "type": "string", "x-nullable": true }, "extra_client_ids": { "items": { "type": "string" }, "type": "array" }, "has_device_client_secret": { "type": "boolean" }, "has_web_ui_client_secret": { "type": "boolean" }, "hidden": { "type": "boolean" }, "issuer": { "type": "string" }, "jwks_uri": { "type": "string" }, "label": { "type": "string" }, "name": { "type": "string" }, "scopes": { "items": { "type": "string" }, "type": "array" }, "token_endpoint": { "type": "string", "x-nullable": true }, "token_endpoint_auth_methods_supported": { "items": { "type": "string" }, "type": "array" }, "uid": { "type": "string" }, "web_ui_client_id": { "type": "string" }, "web_ui_client_secret": { "type": "string" } }, "type": "object" }, "inex": { "properties": { "files": { "items": { "type": "string" }, "type": "array" }, "globbing_enabled": { "default": true, "type": "boolean" }, "type": { "type": "string" } }, "type": "object", "x-nullable": true }, "invitation": { "properties": { "created": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string" }, "gams_license": { "type": "string", "x-nullable": true }, "identity_provider": { "type": "string", "x-nullable": true }, "identity_provider_user_subject": { "type": "string", "x-nullable": true }, "invitable_identity_providers": { "items": { "type": "string" }, "type": "array" }, "inviter_name": { "type": "string" }, "permissions": { "items": { "type": "string" }, "type": "array" }, "quota": { "$ref": "#/definitions/invitation_quota" }, "roles": { "items": { "type": "string" }, "type": "array" }, "token": { "type": "string" }, "used": { "type": "boolean" }, "user_groups": { "items": { "type": "string" }, "type": "array" }, "username": { "type": "string", "x-nullable": true } }, "type": "object" }, "invitation_quota": { "properties": { "disk_quota": { "type": "integer", "x-nullable": true }, "parallel_quota": { "type": "number", "x-nullable": true }, "volume_quota": { "type": "number", "x-nullable": true } }, "type": "object" }, "invitation_token": { "properties": { "invitation_token": { "type": "string" } }, "type": "object" }, "job": { "properties": { "access_groups": { "items": { "type": "string" }, "type": "array" }, "arguments": { "items": { "type": "string" }, "type": "array" }, "dep_tokens": { "items": { "type": "string" }, "type": "array" }, "finished_at": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string", "x-nullable": true }, "is_data_provided": { "type": "boolean" }, "is_temporary_model": { "type": "boolean" }, "labels": { "$ref": "#/definitions/model_job_labels" }, "model": { "type": "string" }, "namespace": { "type": "string" }, "process_status": { "type": "integer", "x-nullable": true }, "result_exists": { "type": "boolean" }, "status": { "type": "integer" }, "stdout_filename": { "type": "string", "x-nullable": true }, "stream_entries": { "items": { "type": "string" }, "type": "array" }, "submitted_at": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string" }, "tag": { "type": "string", "x-nullable": true }, "text_entries": { "items": { "$ref": "#/definitions/text_entry" }, "type": "array" }, "token": { "type": "string" }, "user": { "$ref": "#/definitions/model_user" } }, "type": "object", "x-mask": "{token,model,is_temporary_model,is_data_provided,status,process_status,stdout_filename,namespace,stream_entries,arguments,submitted_at,finished_at,user,text_entries,dep_tokens,labels,result_exists}" }, "job_no_text_entry": { "properties": { "arguments": { "items": { "type": "string" }, "type": "array" }, "finished_at": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string", "x-nullable": true }, "is_data_provided": { "type": "boolean" }, "is_temporary_model": { "type": "boolean" }, "model": { "type": "string" }, "namespace": { "type": "string" }, "process_status": { "type": "integer", "x-nullable": true }, "status": { "type": "integer" }, "stdout_filename": { "type": "string", "x-nullable": true }, "stream_entries": { "items": { "type": "string" }, "type": "array" }, "submitted_at": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string" }, "tag": { "type": "string", "x-nullable": true }, "token": { "type": "string" }, "user": { "$ref": "#/definitions/model_user" } }, "type": "object", "x-mask": "{model,status,process_status,submitted_at,stdout_filename,namespace,token,finished_at}" }, "job_no_text_entry_page": { "properties": { "count": { "type": "integer" }, "next": { "type": "string", "x-nullable": true }, "previous": { "type": "string", "x-nullable": true }, "results": { "items": { "$ref": "#/definitions/job_no_text_entry" }, "type": "array" } }, "type": "object" }, "license": { "properties": { "inherited_from": { "type": "string" }, "license": { "type": "string" }, "user": { "type": "string" } }, "type": "object" }, "log_piece": { "properties": { "gams_return_code": { "type": "integer", "x-nullable": true }, "message": { "type": "string" }, "queue_finished": { "type": "boolean" } }, "type": "object" }, "message": { "properties": { "message": { "type": "string" } }, "type": "object" }, "message_and_token": { "properties": { "message": { "type": "string" }, "quota_warning": { "items": { "$ref": "#/definitions/quota" }, "type": "array" }, "token": { "type": "string" } }, "type": "object" }, "message_with_webhook_id": { "properties": { "id": { "type": "integer" }, "message": { "type": "string" } }, "type": "object" }, "model_auth_token": { "properties": { "token": { "type": "string" } }, "type": "object" }, "model_configuration": { "properties": { "hostname": { "type": "string" }, "instance_pool_access": { "enum": [ "DISABLED", "ADMIN_ONLY", "INVITER_ONLY", "ENABLED" ], "example": "DISABLED", "type": "string" }, "job_priorities_access": { "enum": [ "DISABLED", "ENABLED" ], "example": "DISABLED", "type": "string" }, "text_entries_max_size": { "type": "integer" }, "webhook_access": { "enum": [ "DISABLED", "ADMIN_ONLY", "ENABLED" ], "example": "DISABLED", "type": "string" } }, "type": "object" }, "model_default_instance": { "properties": { "label": { "type": "string" }, "resource_type": { "description": "The type of computing resource", "enum": [ "instance", "instance_pool" ], "example": "instance", "type": "string" } }, "type": "object" }, "model_default_user_instance": { "properties": { "default_inherited_from": { "type": "string", "x-nullable": true }, "default_instance": { "$ref": "#/definitions/model_default_instance", "x-nullable": true } }, "type": "object" }, "model_hypercube_job": { "properties": { "job_number": { "type": "integer" }, "process_status": { "type": "integer", "x-nullable": true }, "status": { "type": "integer" }, "times": { "items": { "$ref": "#/definitions/time_span" }, "type": "array" } }, "type": "object" }, "model_hypercube_usage": { "properties": { "completed": { "type": "integer" }, "finished": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string", "x-nullable": true }, "job_count": { "type": "integer" }, "jobs": { "items": { "$ref": "#/definitions/model_hypercube_job" }, "type": "array" }, "labels": { "$ref": "#/definitions/model_job_labels" }, "model": { "type": "string" }, "namespace": { "type": "string" }, "status": { "type": "integer" }, "submitted": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string" }, "token": { "type": "string" }, "username": { "type": "string" } }, "type": "object" }, "model_instance_info": { "properties": { "cpu_request": { "type": "number" }, "label": { "type": "string" }, "memory_request": { "type": "integer" }, "multiplier": { "type": "number" }, "multiplier_idle": { "type": "number" }, "node_selectors": { "items": { "$ref": "#/definitions/generic_key_value_pair" }, "type": "array" }, "tolerations": { "items": { "$ref": "#/definitions/generic_key_value_pair" }, "type": "array" }, "workspace_request": { "type": "integer" } }, "type": "object", "x-nullable": true }, "model_instance_info_full": { "properties": { "cpu_request": { "type": "number" }, "gams_license": { "type": "string", "x-nullable": true }, "label": { "type": "string" }, "memory_request": { "type": "integer" }, "multiplier": { "type": "number" }, "multiplier_idle": { "type": "number" }, "node_selectors": { "items": { "$ref": "#/definitions/generic_key_value_pair" }, "type": "array" }, "tolerations": { "items": { "$ref": "#/definitions/generic_key_value_pair" }, "type": "array" }, "workspace_request": { "type": "integer" } }, "type": "object" }, "model_instance_pool_info": { "properties": { "cancelling": { "type": "boolean" }, "instance": { "$ref": "#/definitions/model_instance_info" }, "label": { "type": "string" }, "owner": { "$ref": "#/definitions/model_user" }, "size": { "type": "integer" }, "size_active": { "type": "integer" }, "size_busy": { "type": "integer" } }, "type": "object" }, "model_job_labels": { "additionalProperties": { "type": "string" }, "properties": { "cpu_request": { "type": "number", "x-nullable": true }, "instance": { "type": "string", "x-nullable": true }, "memory_request": { "type": "integer", "x-nullable": true }, "multiplier": { "type": "number", "x-nullable": true }, "node_selectors": { "items": { "$ref": "#/definitions/generic_key_value_pair" }, "type": "array", "x-nullable": true }, "resource_warning": { "enum": [ "none", "disk", "memory" ], "example": "none", "type": "string", "x-nullable": true }, "tolerations": { "items": { "$ref": "#/definitions/generic_key_value_pair" }, "type": "array", "x-nullable": true }, "workspace_request": { "type": "integer", "x-nullable": true } }, "type": "object", "x-mask": "{cpu_request,memory_request,workspace_request,tolerations,node_selectors}", "x-nullable": true }, "model_job_usage": { "properties": { "finished": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string", "x-nullable": true }, "labels": { "$ref": "#/definitions/model_job_labels" }, "model": { "type": "string" }, "namespace": { "type": "string" }, "process_status": { "type": "integer", "x-nullable": true }, "status": { "type": "integer" }, "submitted": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string" }, "times": { "items": { "$ref": "#/definitions/time_span" }, "type": "array" }, "token": { "type": "string" }, "username": { "type": "string" } }, "type": "object" }, "model_pool_usage": { "properties": { "created_at": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string" }, "deleted_at": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string", "x-nullable": true }, "instance": { "$ref": "#/definitions/model_instance_info" }, "label": { "type": "string" }, "owner": { "$ref": "#/definitions/model_user" }, "times": { "items": { "$ref": "#/definitions/time_span_pool_worker" }, "type": "array" } }, "type": "object" }, "model_usage": { "properties": { "hypercube_job_usage": { "items": { "$ref": "#/definitions/model_hypercube_usage" }, "type": "array" }, "job_usage": { "items": { "$ref": "#/definitions/model_job_usage" }, "type": "array" }, "pool_usage": { "items": { "$ref": "#/definitions/model_pool_usage" }, "type": "array" } }, "type": "object" }, "model_user": { "properties": { "deleted": { "type": "boolean" }, "old_username": { "type": "string", "x-nullable": true }, "username": { "type": "string" } }, "type": "object" }, "model_userinstance_info": { "properties": { "default_inherited_from": { "type": "string", "x-nullable": true }, "default_instance": { "$ref": "#/definitions/model_instance_info" }, "instances_available": { "items": { "$ref": "#/definitions/model_instance_info" }, "type": "array" }, "instances_inherited_from": { "type": "string", "x-nullable": true } }, "type": "object" }, "model_userinstancepool_info": { "properties": { "instance_pools_available": { "items": { "$ref": "#/definitions/model_instance_pool_info" }, "type": "array" } }, "type": "object" }, "model_version": { "properties": { "gams_version": { "type": "string" }, "in_kubernetes": { "type": "boolean" }, "version": { "type": "string" } }, "type": "object" }, "models": { "properties": { "arguments": { "items": { "type": "string" }, "type": "array" }, "inex": { "$ref": "#/definitions/inex" }, "length": { "type": "integer" }, "name": { "type": "string" }, "protect_model_files": { "default": false, "type": "boolean" }, "run": { "type": "string", "x-nullable": true }, "stream_entries": { "items": { "type": "string" }, "type": "array" }, "text_entries": { "items": { "type": "string" }, "type": "array" }, "upload_date": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string" }, "user_groups": { "items": { "type": "string" }, "type": "array" } }, "type": "object", "x-mask": "{name,upload_date,arguments,text_entries,stream_entries,inex,run,user_groups,length}" }, "namespace": { "properties": { "disk_quota": { "type": "integer", "x-nullable": true }, "name": { "type": "string" }, "permissions": { "items": { "$ref": "#/definitions/perm_and_username" }, "type": "array" } }, "type": "object" }, "namespace_quota": { "properties": { "disk_quota": { "type": "integer", "x-nullable": true }, "disk_use": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" }, "namespace_with_permission": { "properties": { "disk_quota": { "type": "integer", "x-nullable": true }, "name": { "type": "string" }, "permission": { "type": "integer" } }, "type": "object" }, "not_found": { "properties": { "entity": { "type": "string" }, "message": { "type": "string" }, "names": { "items": { "type": "string" }, "type": "array" } }, "type": "object" }, "password_policy": { "properties": { "min_password_length": { "type": "integer" }, "must_include_lowercase": { "type": "boolean" }, "must_include_number": { "type": "boolean" }, "must_include_special_char": { "type": "boolean" }, "must_include_uppercase": { "type": "boolean" }, "not_in_popular_passwords": { "type": "boolean" } }, "type": "object" }, "perm_and_username": { "properties": { "permission": { "type": "integer" }, "username": { "type": "string" } }, "type": "object" }, "quota": { "properties": { "disk_quota": { "type": "integer", "x-nullable": true }, "disk_used": { "type": "integer", "x-nullable": true }, "parallel_quota": { "type": "number", "x-nullable": true }, "username": { "type": "string" }, "volume_quota": { "type": "number", "x-nullable": true }, "volume_used": { "type": "number" } }, "type": "object" }, "quota_exceeded": { "properties": { "exceeded_quotas": { "items": { "$ref": "#/definitions/quota" }, "type": "array" }, "message": { "type": "string" } }, "type": "object" }, "status_code_meaning": { "properties": { "description": { "type": "string" }, "status_code": { "type": "integer" } }, "type": "object" }, "stream_entry": { "properties": { "entry_value": { "type": "string" }, "queue_finished": { "type": "boolean" } }, "type": "object" }, "system_wide_license": { "properties": { "license": { "type": "string", "x-nullable": true } }, "type": "object" }, "text_entries": { "properties": { "text_entries": { "items": { "type": "string" }, "type": "array" } }, "type": "object" }, "text_entry": { "properties": { "entry_name": { "type": "string" }, "entry_size": { "type": "integer", "x-nullable": true }, "entry_value": { "type": "string", "x-nullable": true } }, "type": "object" }, "time_span": { "properties": { "finish": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string", "x-nullable": true }, "start": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string" } }, "type": "object" }, "time_span_pool_worker": { "properties": { "finish": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string", "x-nullable": true }, "multiplier_idle": { "type": "number" }, "start": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string" }, "worker_id": { "type": "string" } }, "type": "object" }, "token_forward_error": { "properties": { "error": { "type": "string" } }, "type": "object" }, "user": { "properties": { "deleted": { "type": "boolean" }, "identity_provider": { "type": "string", "x-nullable": true }, "identity_provider_user_subject": { "type": "string", "x-nullable": true }, "invitation_time": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string", "x-nullable": true }, "inviter_name": { "type": "string", "x-nullable": true }, "old_username": { "type": "string", "x-nullable": true }, "roles": { "items": { "description": "A user role", "example": "inviter", "title": "UserRole", "type": "string" }, "type": "array" }, "username": { "example": "John", "type": "string" } }, "type": "object" }, "user_group_member": { "properties": { "added_at": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string" }, "added_by": { "$ref": "#/definitions/model_user" }, "username": { "type": "string" } }, "type": "object" }, "user_groups": { "properties": { "created_at": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string" }, "created_by": { "$ref": "#/definitions/model_user" }, "label": { "type": "string" }, "members": { "items": { "$ref": "#/definitions/user_group_member" }, "type": "array" }, "owned_by": { "type": "string" } }, "type": "object" }, "vapid_info": { "properties": { "application_server_key": { "type": "string" } }, "type": "object" }, "webhook": { "properties": { "content_type": { "enum": [ "form", "json" ], "example": "form", "type": "string" }, "created_at": { "example": "2021-08-04T17:10:15.000000+00:00", "format": "date-time", "type": "string" }, "events": { "items": { "enum": [ "ALL", "JOB_FINISHED", "HC_JOB_FINISHED", "JOB_OUT_OF_RESOURCES", "HC_JOB_OUT_OF_RESOURCES", "VOLUME_QUOTA_THRESHOLD", "JOB_DURATION_THRESHOLD", "HC_JOB_DURATION_THRESHOLD", "INVALIDATE_CACHE" ], "example": "ALL", "type": "string" }, "type": "array" }, "id": { "type": "integer" }, "insecure_ssl": { "type": "boolean" }, "parameterized_events": { "items": { "$ref": "#/definitions/webhook_parameterized_event" }, "type": "array" }, "recursive": { "type": "boolean" }, "url": { "type": "string", "x-nullable": true }, "username": { "example": "John", "type": "string" } }, "type": "object" }, "webhook_parameterized_event": { "properties": { "event": { "enum": [ "ALL", "JOB_FINISHED", "HC_JOB_FINISHED", "JOB_OUT_OF_RESOURCES", "HC_JOB_OUT_OF_RESOURCES", "VOLUME_QUOTA_THRESHOLD", "JOB_DURATION_THRESHOLD", "HC_JOB_DURATION_THRESHOLD", "INVALIDATE_CACHE" ], "example": "ALL", "type": "string" }, "parameters": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "host": "localhost", "info": { "description": "With GAMS Engine you can register and solve GAMS models.\nIt has a namespace management system, so you can restrict your users to certain models.", "title": "GAMS Engine", "version": "25.12.12" }, "paths": { "/auth/": { "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "operationId": "createJWTToken", "parameters": [ { "default": 14400, "description": "Time (in seconds) when the token expires.", "in": "formData", "maximum": 16070400, "minimum": 60, "name": "expires_in", "type": "integer" }, { "description": "Access scopes space-separated. Available scopes:\nREADONLY\nNAMESPACES\nJOBS\nUSERS\nHYPERCUBE\nCLEANUP\nLICENSES\nUSAGE\nAUTH\nCONFIGURATION", "in": "formData", "name": "scope", "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/model_auth_token" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Creates a JSON Web Token(JWT) for authentication", "tags": [ "auth" ] } }, "/auth/ldap-providers": { "get": { "description": "Requires admin role. `name` field can be used to display only the desired LDAP\nprovider. By default all fields are listed, you can use `X-Fields` to filter the fields.\nFor example, X-Fields: name, label, host, port", "operationId": "listLDAPIdentityProviders", "parameters": [ { "description": "Name of a LDAP provider to show", "in": "query", "name": "name", "type": "string" }, { "in": "header", "name": "X-Fields", "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/identity_provider_ldap" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Lists the LDAP providers", "tags": [ "auth" ] }, "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Fields are visible through the API after creation only via an\nadmin account. Requires admin role. Timeout value for communication is 10 seconds", "operationId": "createLDAPIdentityProvider", "parameters": [ { "description": "A unique string to identify the identity provider", "in": "formData", "name": "name", "pattern": "^[\\w-]{3,32}$", "required": true, "type": "string" }, { "description": "Suggested login tab name", "in": "formData", "name": "label", "pattern": "^[\\w\\-][\\w\\- ]{1,30}[\\w\\-]$", "required": true, "type": "string" }, { "description": "Should the identity provider be listed when all identity providers are listed?", "in": "formData", "name": "hidden", "required": true, "type": "boolean" }, { "description": "Host of the LDAP server excluding protocol and port", "in": "formData", "maxLength": 255, "minLength": 1, "name": "host", "required": true, "type": "string" }, { "description": "Port of the LDAP server. Examples: 389 and 636(for simple_tls)", "in": "formData", "maximum": 65535, "minimum": 1, "name": "port", "required": true, "type": "integer" }, { "description": "The LDAP attribute that is used as username. Examples: \"sAMAccountName\" for Active Directory, \"uid\" for OpenLDAP. This will be appended to user_filter with an \"&\" clause.", "in": "formData", "maxLength": 255, "minLength": 1, "name": "uid", "required": true, "type": "string" }, { "description": "The full DN of the user who is used for binding. Example for OpenLDAP: \"uid=admin,ou=users,dc=example,dc=org\". Example for Active Directory: \"EXAMPLE\\\\admin\"", "in": "formData", "maxLength": 255, "minLength": 1, "name": "bind_dn", "type": "string" }, { "description": "The password of the user who is used for binding", "in": "formData", "maxLength": 255, "minLength": 1, "name": "password", "type": "string" }, { "description": "Encryption method", "enum": [ "start_tls", "simple_tls", "plain" ], "in": "formData", "name": "encryption", "required": true, "type": "string" }, { "default": true, "in": "formData", "name": "verify_certificates", "type": "boolean" }, { "default": false, "description": "Is LDAP server an Active Directory LDAP server. For AD, NTLMv2 authentication is used", "in": "formData", "name": "active_directory", "type": "boolean" }, { "description": "DN of the base where users are located. Example for OpenLDAP: \"ou=users,dc=example,dc=com\"", "in": "formData", "maxLength": 255, "minLength": 1, "name": "base", "required": true, "type": "string" }, { "description": "LDAP user filter. Format can be found in RFC4515. Examples:\"(objectClass=User)\" or \"(memberOf=cn=gams-engine,ou=groups,dc=example,dc=com)\" or \"&((objectClass=User),(employeeType=developer))\"", "in": "formData", "maxLength": 255, "minLength": 1, "name": "user_filter", "required": true, "type": "string" } ], "responses": { "201": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Creates an identity provider of type LDAP", "tags": [ "auth" ] }, "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Requires admin role.", "operationId": "updateLDAPIdentityProvider", "parameters": [ { "description": "Unique identifier of the identity provider.", "in": "formData", "name": "name", "pattern": "^[\\w-]{3,32}$", "required": true, "type": "string" }, { "description": "Suggested login tab name", "in": "formData", "name": "label", "pattern": "^[\\w\\-][\\w\\- ]{1,30}[\\w\\-]$", "required": true, "type": "string" }, { "description": "Should the identity provider be listed when all identity providers are listed?", "in": "formData", "name": "hidden", "required": true, "type": "boolean" }, { "description": "Host of the LDAP server excluding protocol and port", "in": "formData", "maxLength": 255, "minLength": 1, "name": "host", "required": true, "type": "string" }, { "description": "Port of the LDAP server. Examples: 389 and 636(for simple_tls)", "in": "formData", "maximum": 65535, "minimum": 1, "name": "port", "required": true, "type": "integer" }, { "description": "The LDAP attribute that is used as username. Examples: \"sAMAccountName\" for Active Directory, \"uid\" for OpenLDAP. This will be appended to user_filter with an \"&\" clause.", "in": "formData", "maxLength": 255, "minLength": 1, "name": "uid", "required": true, "type": "string" }, { "description": "The full DN of the user who is used for binding. Example for OpenLDAP: \"uid=admin,ou=users,dc=example,dc=org\". Example for Active Directory: \"EXAMPLE\\\\admin\"", "in": "formData", "maxLength": 255, "minLength": 1, "name": "bind_dn", "type": "string" }, { "description": "The password of the user who is used for binding", "in": "formData", "maxLength": 255, "minLength": 1, "name": "password", "type": "string" }, { "description": "Encryption method", "enum": [ "start_tls", "simple_tls", "plain" ], "in": "formData", "name": "encryption", "required": true, "type": "string" }, { "default": true, "in": "formData", "name": "verify_certificates", "type": "boolean" }, { "default": false, "description": "Is LDAP server an Active Directory LDAP server. For AD, NTLMv2 authentication is used", "in": "formData", "name": "active_directory", "type": "boolean" }, { "description": "DN of the base where users are located. Example for OpenLDAP: \"ou=users,dc=example,dc=com\"", "in": "formData", "maxLength": 255, "minLength": 1, "name": "base", "required": true, "type": "string" }, { "description": "LDAP user filter. Format can be found in RFC4515. Examples:\"(objectClass=User)\" or \"(memberOf=cn=gams-engine,ou=groups,dc=example,dc=com)\" or \"&((objectClass=User),(employeeType=developer))\"", "in": "formData", "maxLength": 255, "minLength": 1, "name": "user_filter", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Not found", "schema": { "$ref": "#/definitions/not_found" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Updates the identity provider of type LDAP with the specified name", "tags": [ "auth" ] } }, "/auth/ldap-providers/{provider_name}/login": { "parameters": [ { "in": "path", "name": "provider_name", "required": true, "type": "string" } ], "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "operationId": "loginWithLDAP", "parameters": [ { "default": "password", "enum": [ "password" ], "in": "formData", "name": "grant_type", "type": "string" }, { "description": "LDAP Username", "in": "formData", "name": "username", "required": true, "type": "string" }, { "description": "LDAP Password", "in": "formData", "name": "password", "required": true, "type": "string" }, { "description": "Access scopes space-separated. Available scopes:\nREADONLY\nNAMESPACES\nJOBS\nUSERS\nHYPERCUBE\nCLEANUP\nLICENSES\nUSAGE\nAUTH\nCONFIGURATION", "in": "formData", "name": "scope", "type": "string" }, { "default": 14400, "description": "Time (in seconds) when the token expires.", "in": "formData", "maximum": 16070400, "minimum": 60, "name": "expires_in", "type": "integer" }, { "collectionFormat": "multi", "description": "Deprecated, please use `scope` instead. Access scopes. Possible values:\nREADONLY\nNAMESPACES\nJOBS\nUSERS\nHYPERCUBE\nCLEANUP\nLICENSES\nUSAGE\nAUTH\nCONFIGURATION", "enum": [ "READONLY", "NAMESPACES", "JOBS", "USERS", "HYPERCUBE", "CLEANUP", "LICENSES", "USAGE", "AUTH", "CONFIGURATION" ], "in": "formData", "items": { "type": "string" }, "name": "access_scopes", "type": "array" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/model_auth_token" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Not found", "schema": { "$ref": "#/definitions/not_found" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "summary": "Creates a JSON Web Token(JWT) for authentication (username and password in request body)", "tags": [ "auth" ] } }, "/auth/login": { "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "operationId": "createJWTTokenJSON", "parameters": [ { "default": "password", "enum": [ "password" ], "in": "formData", "name": "grant_type", "type": "string" }, { "in": "formData", "name": "username", "required": true, "type": "string" }, { "in": "formData", "name": "password", "required": true, "type": "string" }, { "description": "Access scopes space-separated. Available scopes:\nREADONLY\nNAMESPACES\nJOBS\nUSERS\nHYPERCUBE\nCLEANUP\nLICENSES\nUSAGE\nAUTH\nCONFIGURATION", "in": "formData", "name": "scope", "type": "string" }, { "default": 14400, "description": "Time (in seconds) when the token expires.", "in": "formData", "maximum": 16070400, "minimum": 60, "name": "expires_in", "type": "integer" }, { "collectionFormat": "multi", "description": "Deprecated, please use `scope` instead. Access scopes. Possible values:\nREADONLY\nNAMESPACES\nJOBS\nUSERS\nHYPERCUBE\nCLEANUP\nLICENSES\nUSAGE\nAUTH\nCONFIGURATION", "enum": [ "READONLY", "NAMESPACES", "JOBS", "USERS", "HYPERCUBE", "CLEANUP", "LICENSES", "USAGE", "AUTH", "CONFIGURATION" ], "in": "formData", "items": { "type": "string" }, "name": "access_scopes", "type": "array" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/model_auth_token" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "summary": "Creates a JSON Web Token(JWT) for authentication (username and password in request body)", "tags": [ "auth" ] } }, "/auth/logout": { "post": { "operationId": "invalidateJWTTokens", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Invalidates all of your JSON Web Tokens(JWTs)", "tags": [ "auth" ] } }, "/auth/oauth2-providers": { "get": { "description": "Requires admin role, as it displays client secrets. `name` field can be used\nto display only the desired OAuth2 provider. By default all fields are listed, you can use `X-Fields` to filter\nthe fields. For example, X-Fields: name, label, scopes", "operationId": "listOAuth2IdentityProviders", "parameters": [ { "description": "Name of a OAuth2 provider to show", "in": "query", "name": "name", "type": "string" }, { "in": "header", "name": "X-Fields", "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "items": { "$ref": "#/definitions/identity_provider_oauth2_with_secret" }, "type": "array" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Lists the OAuth2 providers", "tags": [ "auth" ] }, "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "The access token provided by the identity provider\nmust be a valid JWT token. Opaque tokens are not supported. Requires admin role.", "operationId": "createOAuth2IdentityProvider", "parameters": [ { "description": "A unique string to identify the identity provider.", "in": "formData", "name": "name", "pattern": "^[\\w-]{3,32}$", "required": true, "type": "string" }, { "description": "Suggested login button string", "in": "formData", "name": "label", "pattern": "^[\\w\\-][\\w\\- ]{1,30}[\\w\\-]$", "required": true, "type": "string" }, { "description": "Should the identity provider be listed when identity providers are listed. Client secrets are never displayed whether the identity provider is hidden or not.", "in": "formData", "name": "hidden", "required": true, "type": "boolean" }, { "description": "OAuth 2.0 client id that should be used by Engine UI while logging in", "in": "formData", "maxLength": 255, "minLength": 1, "name": "web_ui_client_id", "required": true, "type": "string" }, { "description": "OAuth 2.0 client secret that should be used by Engine UI while logging in. We recommend using a public OAuth 2.0 client and not specifying a secret, as Engine UI is a single-page application and cannot store client secrets. However, if this is not possible, you can use a slightly modified version of the Authorization Code Flow and have the API send token requests with the secret on your behalf.", "in": "formData", "maxLength": 512, "minLength": 1, "name": "web_ui_client_secret", "type": "string" }, { "description": "OAuth 2.0 client ID, which should be used by clients that do not have browser access. The client must be a public client.", "in": "formData", "maxLength": 255, "minLength": 1, "name": "device_client_id", "type": "string" }, { "description": "URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier.", "in": "formData", "name": "issuer", "required": true, "type": "string" }, { "description": "By default, JWT tokens are expected to have audience claim matching the hostname in the configuration. To change expected audience for this provider, you can provide override_audience. Please try to avoid this. Instead, set the hostname properly in the Engine configuration and in the authorization server.", "in": "formData", "maxLength": 255, "minLength": 1, "name": "override_audience", "type": "string" }, { "default": false, "description": "Should OpenID Connect Discovery be used. Fetches information from issuer URL appended with /.well-known/openid-configuration", "in": "formData", "name": "use_oidc_discover", "type": "boolean" }, { "default": false, "description": "Should OAuth 2.0 Authorization Server Metadata be used.Fetches information from issuer URL appended with /.well-known/oauth-authorization-server", "in": "formData", "name": "use_oauth2_auth_server_metadata", "type": "boolean" }, { "description": "Required unless discovery is used. URL of the OP's OAuth 2.0 Authorization Endpoint (ignored if discovery is used).", "in": "formData", "name": "authorization_endpoint", "type": "string" }, { "description": "URL of the OP's OAuth 2.0 Token Endpoint (ignored if discovery is used).", "in": "formData", "name": "token_endpoint", "type": "string" }, { "description": "Required unless discovery is used. URL of the OP's JSON Web Key Set document (ignored if discovery is used).", "in": "formData", "name": "jwks_uri", "type": "string" }, { "collectionFormat": "multi", "description": "Required unless discovery is used. Array containing a list of the OAuth 2.0 response_type values that this OP supports (ignored if discovery is used).", "in": "formData", "items": { "type": "string" }, "maxLength": 255, "minLength": 1, "name": "response_types_supported", "type": "array" }, { "collectionFormat": "multi", "description": "Array containing a list of the OAuth 2.0 Grant Type values that this OP supports (ignored if discovery is used).", "in": "formData", "items": { "type": "string" }, "maxLength": 255, "minLength": 1, "name": "grant_types_supported", "type": "array" }, { "collectionFormat": "multi", "description": "Array containing a list of client authentication methods supported by the OP's token endpoint (ignored if discovery is used).", "in": "formData", "items": { "type": "string" }, "maxLength": 255, "minLength": 1, "name": "token_endpoint_auth_methods_supported", "type": "array" }, { "description": "URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP (ignored if discovery is used)", "in": "formData", "name": "end_session_endpoint", "type": "string" }, { "description": "URL of the authorization server's device authorization endpoint (ignored if discovery is used)", "in": "formData", "name": "device_authorization_endpoint", "type": "string" }, { "default": "READONLY", "description": "Scope that the client should request from the OP to get 'READONLY' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_READONLY", "type": "string" }, { "default": "NAMESPACES", "description": "Scope that the client should request from the OP to get 'NAMESPACES' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_NAMESPACES", "type": "string" }, { "default": "JOBS", "description": "Scope that the client should request from the OP to get 'JOBS' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_JOBS", "type": "string" }, { "default": "USERS", "description": "Scope that the client should request from the OP to get 'USERS' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_USERS", "type": "string" }, { "default": "HYPERCUBE", "description": "Scope that the client should request from the OP to get 'HYPERCUBE' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_HYPERCUBE", "type": "string" }, { "default": "CLEANUP", "description": "Scope that the client should request from the OP to get 'CLEANUP' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_CLEANUP", "type": "string" }, { "default": "LICENSES", "description": "Scope that the client should request from the OP to get 'LICENSES' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_LICENSES", "type": "string" }, { "default": "USAGE", "description": "Scope that the client should request from the OP to get 'USAGE' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_USAGE", "type": "string" }, { "default": "AUTH", "description": "Scope that the client should request from the OP to get 'AUTH' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_AUTH", "type": "string" }, { "default": "CONFIGURATION", "description": "Scope that the client should request from the OP to get 'CONFIGURATION' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_CONFIGURATION", "type": "string" } ], "responses": { "201": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Creates an identity provider of type OAuth2", "tags": [ "auth" ] }, "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Requires admin role.", "operationId": "updateOAuth2IdentityProvider", "parameters": [ { "description": "Unique identifier of the identity provider.", "in": "formData", "name": "name", "pattern": "^[\\w-]{3,32}$", "required": true, "type": "string" }, { "description": "Suggested login button string", "in": "formData", "name": "label", "pattern": "^[\\w\\-][\\w\\- ]{1,30}[\\w\\-]$", "required": true, "type": "string" }, { "description": "Should the identity provider be listed when identity providers are listed. Client secrets are never displayed whether the identity provider is hidden or not.", "in": "formData", "name": "hidden", "required": true, "type": "boolean" }, { "description": "OAuth 2.0 client id that should be used by Engine UI while logging in", "in": "formData", "maxLength": 255, "minLength": 1, "name": "web_ui_client_id", "required": true, "type": "string" }, { "description": "OAuth 2.0 client secret that should be used by Engine UI while logging in. We recommend using a public OAuth 2.0 client and not specifying a secret, as Engine UI is a single-page application and cannot store client secrets. However, if this is not possible, you can use a slightly modified version of the Authorization Code Flow and have the API send token requests with the secret on your behalf.", "in": "formData", "maxLength": 512, "minLength": 1, "name": "web_ui_client_secret", "type": "string" }, { "description": "OAuth 2.0 client ID, which should be used by clients that do not have browser access. The client must be a public client.", "in": "formData", "maxLength": 255, "minLength": 1, "name": "device_client_id", "type": "string" }, { "description": "URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier.", "in": "formData", "name": "issuer", "required": true, "type": "string" }, { "description": "By default, JWT tokens are expected to have audience claim matching the hostname in the configuration. To change expected audience for this provider, you can provide override_audience. Please try to avoid this. Instead, set the hostname properly in the Engine configuration and in the authorization server.", "in": "formData", "maxLength": 255, "minLength": 1, "name": "override_audience", "type": "string" }, { "default": false, "description": "Should OpenID Connect Discovery be used. Fetches information from issuer URL appended with /.well-known/openid-configuration", "in": "formData", "name": "use_oidc_discover", "type": "boolean" }, { "default": false, "description": "Should OAuth 2.0 Authorization Server Metadata be used.Fetches information from issuer URL appended with /.well-known/oauth-authorization-server", "in": "formData", "name": "use_oauth2_auth_server_metadata", "type": "boolean" }, { "description": "Required unless discovery is used. URL of the OP's OAuth 2.0 Authorization Endpoint (ignored if discovery is used).", "in": "formData", "name": "authorization_endpoint", "type": "string" }, { "description": "URL of the OP's OAuth 2.0 Token Endpoint (ignored if discovery is used).", "in": "formData", "name": "token_endpoint", "type": "string" }, { "description": "Required unless discovery is used. URL of the OP's JSON Web Key Set document (ignored if discovery is used).", "in": "formData", "name": "jwks_uri", "type": "string" }, { "collectionFormat": "multi", "description": "Required unless discovery is used. Array containing a list of the OAuth 2.0 response_type values that this OP supports (ignored if discovery is used).", "in": "formData", "items": { "type": "string" }, "maxLength": 255, "minLength": 1, "name": "response_types_supported", "type": "array" }, { "collectionFormat": "multi", "description": "Array containing a list of the OAuth 2.0 Grant Type values that this OP supports (ignored if discovery is used).", "in": "formData", "items": { "type": "string" }, "maxLength": 255, "minLength": 1, "name": "grant_types_supported", "type": "array" }, { "collectionFormat": "multi", "description": "Array containing a list of client authentication methods supported by the OP's token endpoint (ignored if discovery is used).", "in": "formData", "items": { "type": "string" }, "maxLength": 255, "minLength": 1, "name": "token_endpoint_auth_methods_supported", "type": "array" }, { "description": "URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP (ignored if discovery is used)", "in": "formData", "name": "end_session_endpoint", "type": "string" }, { "description": "URL of the authorization server's device authorization endpoint (ignored if discovery is used)", "in": "formData", "name": "device_authorization_endpoint", "type": "string" }, { "default": "READONLY", "description": "Scope that the client should request from the OP to get 'READONLY' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_READONLY", "type": "string" }, { "default": "NAMESPACES", "description": "Scope that the client should request from the OP to get 'NAMESPACES' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_NAMESPACES", "type": "string" }, { "default": "JOBS", "description": "Scope that the client should request from the OP to get 'JOBS' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_JOBS", "type": "string" }, { "default": "USERS", "description": "Scope that the client should request from the OP to get 'USERS' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_USERS", "type": "string" }, { "default": "HYPERCUBE", "description": "Scope that the client should request from the OP to get 'HYPERCUBE' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_HYPERCUBE", "type": "string" }, { "default": "CLEANUP", "description": "Scope that the client should request from the OP to get 'CLEANUP' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_CLEANUP", "type": "string" }, { "default": "LICENSES", "description": "Scope that the client should request from the OP to get 'LICENSES' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_LICENSES", "type": "string" }, { "default": "USAGE", "description": "Scope that the client should request from the OP to get 'USAGE' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_USAGE", "type": "string" }, { "default": "AUTH", "description": "Scope that the client should request from the OP to get 'AUTH' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_AUTH", "type": "string" }, { "default": "CONFIGURATION", "description": "Scope that the client should request from the OP to get 'CONFIGURATION' scope", "in": "formData", "maxLength": 255, "minLength": 1, "name": "request_scope_CONFIGURATION", "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/bad_input" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Identity provider not found", "schema": { "$ref": "#/definitions/not_found" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Updates the identity provider of type OAuth2 with the specified name", "tags": [ "auth" ] } }, "/auth/oauth2-token": { "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "This endpoint is only for \"Authorization Code Flow\" and \"Device Code Flow\" flow.\nIt works only with OAuth 2.0/OIDC providers with a client secret.\nIt is not recommended to use this endpoint if you can register a public client.\nToken forwarding for Device Code Flow is only allowed for OIDC clients.", "operationId": "fetchOAuth2TokenOnBehalf", "parameters": [ { "default": "authorization_code", "description": "Grant type of the forwarded request", "enum": [ "authorization_code", "urn:ietf:params:oauth:grant-type:device_code" ], "in": "query", "name": "grant_type", "type": "string" }, { "description": "Unique identifier of the identity provider.", "in": "formData", "name": "identity_provider_name", "pattern": "^[\\w-]{3,32}$", "required": true, "type": "string" }, { "description": "Code from the OAuth2 Server, required for authorization code flow", "in": "formData", "maxLength": 5000, "minLength": 1, "name": "code", "type": "string" }, { "description": "PKCE code verifier, required for authorization code flow", "in": "formData", "maxLength": 128, "minLength": 43, "name": "code_verifier", "type": "string" }, { "description": "Redirection URI used when initiating the request, required for authorization code flow", "format": "uri", "in": "formData", "name": "redirect_uri", "type": "string" }, { "description": "The device verification code, required for device flow", "in": "formData", "maxLength": 5000, "minLength": 1, "name": "device_code", "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/forwarded_token_response" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/bad_input" } }, "401": { "description": "Unauthenticated", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Identity provider not found", "schema": { "$ref": "#/definitions/not_found" } }, "428": { "description": "Authorization pending or slow down", "schema": { "$ref": "#/definitions/token_forward_error" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Sends a request on your behalf to the OAuth provider token endpoint with the client secret", "tags": [ "auth" ] } }, "/auth/oidc-providers": { "get": { "description": "Requires admin role, as it displays client secrets. `name` field can be used\nto display only the desired OIDC provider. By default all fields are listed, you can use `X-Fields` to filter\nthe fields. For example, X-Fields: name, label, uid", "operationId": "listOIDCIdentityProviders", "parameters": [ { "description": "Name of a OIDC provider to show", "in": "query", "name": "name", "type": "string" }, { "in": "header", "name": "X-Fields", "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "items": { "$ref": "#/definitions/identity_provider_oidc_with_secret" }, "type": "array" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Lists the OIDC providers", "tags": [ "auth" ] }, "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "The id token provided by the identity provider must be a valid JWT\ntoken where the audience matches the web_ui_client_id, the device_client_id or any of the extra_client_ids. Requires admin role.", "operationId": "createOIDCIdentityProvider", "parameters": [ { "description": "A unique string to identify the identity provider.", "in": "formData", "name": "name", "pattern": "^[\\w-]{3,32}$", "required": true, "type": "string" }, { "description": "Suggested login button string", "in": "formData", "name": "label", "pattern": "^[\\w\\-][\\w\\- ]{1,30}[\\w\\-]$", "required": true, "type": "string" }, { "description": "Should the identity provider be listed when identity providers are listed. Client secrets are never displayed whether the identity provider is hidden or not.", "in": "formData", "name": "hidden", "required": true, "type": "boolean" }, { "description": "OAuth 2.0 client id that should be used by Engine UI while logging in", "in": "formData", "maxLength": 255, "minLength": 1, "name": "web_ui_client_id", "required": true, "type": "string" }, { "description": "OAuth 2.0 client secret that should be used by Engine UI while logging in. We recommend using a public OAuth 2.0 client and not specifying a secret, as Engine UI is a single-page application and cannot store client secrets. However, if this is not possible, you can use a slightly modified version of the Authorization Code Flow and have the API send token requests with the secret on your behalf.", "in": "formData", "maxLength": 512, "minLength": 1, "name": "web_ui_client_secret", "type": "string" }, { "description": "OAuth 2.0 client ID, which should be used by clients that do not have browser access.", "in": "formData", "maxLength": 255, "minLength": 1, "name": "device_client_id", "type": "string" }, { "description": "OAuth 2.0 client secret that should be used by devices while logging in. We recommend using a public OAuth 2.0 client and not specifying a secret. However, if this is not possible, you can use a slightly modified version of the Device Code Flow and have the API send token requests with the secret on your behalf.", "in": "formData", "maxLength": 512, "minLength": 1, "name": "device_client_secret", "type": "string" }, { "collectionFormat": "multi", "description": "Array of extra OAuth 2.0 client IDs from which the API accepts ID tokens", "in": "formData", "items": { "type": "string" }, "maxLength": 255, "minLength": 1, "name": "extra_client_ids", "type": "array" }, { "description": "URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier.", "in": "formData", "name": "issuer", "required": true, "type": "string" }, { "default": false, "description": "Should OpenID Connect Discovery be used. Fetches information from issuer URL appended with /.well-known/openid-configuration", "in": "formData", "name": "use_oidc_discover", "type": "boolean" }, { "description": "Required unless discovery is used. URL of the OP's OAuth 2.0 Authorization Endpoint (ignored if discovery is used).", "in": "formData", "name": "authorization_endpoint", "type": "string" }, { "description": "URL of the OP's OAuth 2.0 Token Endpoint (ignored if discovery is used).", "in": "formData", "name": "token_endpoint", "type": "string" }, { "description": "Required unless discovery is used. URL of the OP's JSON Web Key Set document (ignored if discovery is used).", "in": "formData", "name": "jwks_uri", "type": "string" }, { "description": "URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP (ignored if discovery is used)", "in": "formData", "name": "end_session_endpoint", "type": "string" }, { "description": "URL of the authorization server's device authorization endpoint (ignored if discovery is used)", "in": "formData", "name": "device_authorization_endpoint", "type": "string" }, { "collectionFormat": "multi", "description": "Array containing a list of client authentication methods supported by the OP's token endpoint (ignored if discovery is used).", "in": "formData", "items": { "type": "string" }, "maxLength": 255, "minLength": 1, "name": "token_endpoint_auth_methods_supported", "type": "array" }, { "collectionFormat": "multi", "default": [ "openid", "profile", "email" ], "description": "The scopes that will be requested from the OP", "in": "formData", "items": { "type": "string" }, "maxLength": 255, "minLength": 1, "name": "scopes", "required": true, "type": "array" }, { "default": "sub", "description": "The claim from the OIDC ID token to use as the user's unique identifier. The `sub` claim is the default and recommended value.", "in": "formData", "maxLength": 64, "minLength": 1, "name": "uid", "type": "string" } ], "responses": { "201": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Creates an identity provider of type OIDC", "tags": [ "auth" ] }, "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Requires admin role.", "operationId": "updateOIDCIdentityProvider", "parameters": [ { "description": "Unique identifier of the identity provider.", "in": "formData", "name": "name", "pattern": "^[\\w-]{3,32}$", "required": true, "type": "string" }, { "description": "Suggested login button string", "in": "formData", "name": "label", "pattern": "^[\\w\\-][\\w\\- ]{1,30}[\\w\\-]$", "required": true, "type": "string" }, { "description": "Should the identity provider be listed when identity providers are listed. Client secrets are never displayed whether the identity provider is hidden or not.", "in": "formData", "name": "hidden", "required": true, "type": "boolean" }, { "description": "OAuth 2.0 client id that should be used by Engine UI while logging in", "in": "formData", "maxLength": 255, "minLength": 1, "name": "web_ui_client_id", "required": true, "type": "string" }, { "description": "OAuth 2.0 client secret that should be used by Engine UI while logging in. We recommend using a public OAuth 2.0 client and not specifying a secret, as Engine UI is a single-page application and cannot store client secrets. However, if this is not possible, you can use a slightly modified version of the Authorization Code Flow and have the API send token requests with the secret on your behalf.", "in": "formData", "maxLength": 512, "minLength": 1, "name": "web_ui_client_secret", "type": "string" }, { "description": "OAuth 2.0 client ID, which should be used by clients that do not have browser access.", "in": "formData", "maxLength": 255, "minLength": 1, "name": "device_client_id", "type": "string" }, { "description": "OAuth 2.0 client secret that should be used by devices while logging in. We recommend using a public OAuth 2.0 client and not specifying a secret. However, if this is not possible, you can use a slightly modified version of the Device Code Flow and have the API send token requests with the secret on your behalf.", "in": "formData", "maxLength": 512, "minLength": 1, "name": "device_client_secret", "type": "string" }, { "collectionFormat": "multi", "description": "Array of extra OAuth 2.0 client IDs from which the API accepts ID tokens", "in": "formData", "items": { "type": "string" }, "maxLength": 255, "minLength": 1, "name": "extra_client_ids", "type": "array" }, { "description": "URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier.", "in": "formData", "name": "issuer", "required": true, "type": "string" }, { "default": false, "description": "Should OpenID Connect Discovery be used. Fetches information from issuer URL appended with /.well-known/openid-configuration", "in": "formData", "name": "use_oidc_discover", "type": "boolean" }, { "description": "Required unless discovery is used. URL of the OP's OAuth 2.0 Authorization Endpoint (ignored if discovery is used).", "in": "formData", "name": "authorization_endpoint", "type": "string" }, { "description": "URL of the OP's OAuth 2.0 Token Endpoint (ignored if discovery is used).", "in": "formData", "name": "token_endpoint", "type": "string" }, { "description": "Required unless discovery is used. URL of the OP's JSON Web Key Set document (ignored if discovery is used).", "in": "formData", "name": "jwks_uri", "type": "string" }, { "description": "URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP (ignored if discovery is used)", "in": "formData", "name": "end_session_endpoint", "type": "string" }, { "description": "URL of the authorization server's device authorization endpoint (ignored if discovery is used)", "in": "formData", "name": "device_authorization_endpoint", "type": "string" }, { "collectionFormat": "multi", "description": "Array containing a list of client authentication methods supported by the OP's token endpoint (ignored if discovery is used).", "in": "formData", "items": { "type": "string" }, "maxLength": 255, "minLength": 1, "name": "token_endpoint_auth_methods_supported", "type": "array" }, { "collectionFormat": "multi", "default": [ "openid", "profile", "email" ], "description": "The scopes that will be requested from the OP", "in": "formData", "items": { "type": "string" }, "maxLength": 255, "minLength": 1, "name": "scopes", "required": true, "type": "array" }, { "default": "sub", "description": "The claim from the OIDC ID token to use as the user's unique identifier. The `sub` claim is the default and recommended value.", "in": "formData", "maxLength": 64, "minLength": 1, "name": "uid", "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/bad_input" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Identity provider not found", "schema": { "$ref": "#/definitions/not_found" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Updates the identity provider of type OIDC with the specified name", "tags": [ "auth" ] } }, "/auth/oidc-providers/login": { "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "An ID token can only be used once to get an access token.", "operationId": "loginWithOIDC", "parameters": [ { "description": "ID Token of the user", "in": "formData", "maxLength": 2048, "minLength": 80, "name": "id_token", "required": true, "type": "string" }, { "description": "Access scopes space-separated. Available scopes:\nREADONLY\nNAMESPACES\nJOBS\nUSERS\nHYPERCUBE\nCLEANUP\nLICENSES\nUSAGE\nAUTH\nCONFIGURATION", "in": "formData", "name": "scope", "type": "string" }, { "default": 14400, "description": "Time (in seconds) when the token expires.", "in": "formData", "maximum": 16070400, "minimum": 60, "name": "expires_in", "type": "integer" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/model_auth_token" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/message" } } }, "summary": "Creates a JSON Web Token(JWT) for authentication in exchange for a valid ID token from your OIDC identity provider", "tags": [ "auth" ] } }, "/auth/password-policy": { "get": { "operationId": "getPasswordPolicy", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/password_policy" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "summary": "Get the current password policy for Engine managed users", "tags": [ "auth" ] }, "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "operationId": "updatePasswordPolicy", "parameters": [ { "in": "formData", "maximum": 70, "minimum": 8, "name": "min_password_length", "required": true, "type": "integer" }, { "in": "formData", "name": "must_include_uppercase", "required": true, "type": "boolean" }, { "in": "formData", "name": "must_include_lowercase", "required": true, "type": "boolean" }, { "in": "formData", "name": "must_include_number", "required": true, "type": "boolean" }, { "in": "formData", "name": "must_include_special_char", "required": true, "type": "boolean" }, { "in": "formData", "name": "not_in_popular_passwords", "required": true, "type": "boolean" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "summary": "Update the password policy for Engine managed users", "tags": [ "auth" ] } }, "/auth/providers": { "delete": { "description": "Unused invitations that use this identity provider are\nconsidered invalid. Users using this identity provider can no longer sign in, and their identity provider must\nbe updated before they can sign in again. All JWT tokens signed by this identity provider are considered\ninvalid. Requires admin role.", "operationId": "deleteIdentityProvider", "parameters": [ { "description": "Unique identifier of the identity provider.", "in": "query", "name": "name", "pattern": "^[\\w-]{3,32}$", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Identity provider not found", "schema": { "$ref": "#/definitions/not_found" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Deletes the identity provider with the specified name", "tags": [ "auth" ] }, "get": { "description": "If the name is specified, the identity\nprovider is displayed, regardless of whether it is hidden or not.", "operationId": "listIdentityProviders", "parameters": [ { "description": "Name of the identity provider to display. If not specified, all visible identity providers are listed. To display a hidden identity provider, its name must be specified", "in": "query", "name": "name", "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "items": { "$ref": "#/definitions/identity_provider" }, "type": "array" } } }, "summary": "Lists the visible identity providers that are supported by Engine", "tags": [ "auth" ] } }, "/auth/providers/all": { "get": { "description": "Requires admin role.", "operationId": "listAllIdentityProviders", "responses": { "200": { "description": "Successful", "schema": { "items": { "$ref": "#/definitions/identity_provider" }, "type": "array" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Lists the all identity providers supported by Engine", "tags": [ "auth" ] } }, "/cleanup/results": { "delete": { "description": "If a submission token is specified, text entries are also deleted.\nAdmins can delete everyone's results.\nInviters can delete results of their own jobs as well as jobs of their invitees.\nUsers can only delete results of their own jobs.\nNote that jobs that are shared with the logged in user via access groups cannot be deleted via this endpoint.\n\nAt most 1000 files can be deleted with a single request.", "operationId": "removeResults", "parameters": [ { "collectionFormat": "multi", "in": "query", "items": { "type": "string" }, "name": "filename", "type": "array" }, { "collectionFormat": "multi", "format": "UUID", "in": "query", "items": { "type": "string" }, "name": "token", "type": "array" }, { "collectionFormat": "multi", "format": "UUID", "in": "query", "items": { "type": "string" }, "name": "hypercube_token", "type": "array" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/bad_input" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Some files are not found", "schema": { "$ref": "#/definitions/files_not_found" } }, "413": { "description": "Too many files specified", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Deletes job results and Hypercube results", "tags": [ "cleanup" ] }, "get": { "description": "Admins can see everyone's results.\nInviters can see results of their own jobs as well as jobs of their invitees.\nUsers can only see results of their own jobs.\nNote that jobs that are shared with the logged in user via access groups are not listed here.\n\nIf the page is not one and there are no elements on this page, throws 404.", "operationId": "listResults", "parameters": [ { "default": 1, "in": "query", "maximum": 2147483647, "minimum": 1, "name": "page", "type": "integer" }, { "default": 0, "in": "query", "maximum": 2147483647, "minimum": 0, "name": "per_page", "type": "integer" }, { "default": "upload_date", "enum": [ "filename", "username", "namespace", "length", "upload_date" ], "in": "query", "name": "order_by", "type": "string" }, { "default": false, "in": "query", "name": "order_asc", "type": "boolean" }, { "description": "iso8601 Datetime to select the results if they are uploaded before.", "format": "date-time", "in": "query", "name": "from_datetime", "type": "string" }, { "description": "iso8601 Datetime to select the results if they are uploaded after.", "format": "date-time", "in": "query", "name": "to_datetime", "type": "string" }, { "description": "Filter results by namespace.", "in": "query", "name": "namespace", "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/cleanable_job_result_page" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Page not found" }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Lists all job and Hypercube results", "tags": [ "cleanup" ] } }, "/configuration": { "get": { "operationId": "getConfiguration", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/model_configuration" } } }, "summary": "Returns current configuration", "tags": [ "default" ] }, "patch": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Requires admin role.", "operationId": "updateConfiguration", "parameters": [ { "description": "Whether to enable webhook access or enable it for admins only. Possible values are: ['DISABLED', 'ADMIN_ONLY', 'ENABLED']", "enum": [ "DISABLED", "ADMIN_ONLY", "ENABLED" ], "in": "formData", "name": "webhook_access", "type": "string" }, { "description": "Whether to enable instance pool access, enable it for admins or inviters only. If access to instance pools is removed for specific user roles or for all, existing instance pools are not affected. Only new pools cannot be created by these users. Existing instance pools can still be deleted. Possible values are: ['DISABLED', 'ADMIN_ONLY', 'INVITER_ONLY', 'ENABLED']", "enum": [ "DISABLED", "ADMIN_ONLY", "INVITER_ONLY", "ENABLED" ], "in": "formData", "name": "instance_pool_access", "type": "string" }, { "description": "Whether to enable job priorities. WARNING: Enable/disable job priorities when the system is not in use, as jobs submitted while the feature is enabled/disabled may end up in an inconsistent state. Possible values are: ['DISABLED', 'ENABLED']", "enum": [ "DISABLED", "ENABLED" ], "in": "formData", "name": "job_priorities_access", "type": "string" }, { "description": "Maximum size (in bytes) for text entries. Text entries that exceed this size will be truncated.", "in": "formData", "maximum": 1000000000.0, "minimum": 0, "name": "text_entries_max_size", "type": "integer" }, { "description": "Hostname of the Engine API. It is used for authentication purposes. It must match value from the authorization server. For example, https://engine.gams.com/api", "format": "uri", "in": "formData", "name": "hostname", "type": "string" }, { "description": "Custom certificate authorities that are used when validating SSL certificates e.g. when sending webhooks, connecting to identity providers etc.The certificates must be provided in PEM format (RFC 1422). Set to empty string to remove custom CAs.", "in": "formData", "name": "custom_cas", "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Not found", "schema": { "$ref": "#/definitions/message" } }, "405": { "description": "Not supported", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Updates configuration", "tags": [ "default" ] } }, "/hypercube/": { "get": { "description": "If user has admin role and `everyone` flag is set, all Hypercube jobs are listed.\nIf user is not inviter or admin and `everyone` flag is set,\nall visible Hypercube jobs (Hypercube jobs that were assigned to a user group that user is member of) are listed.\nIf user is inviter and 'everyone' flag is set, Hypercube jobs of all invitees will be listed additionally.\n\nIf `page` is not one and there are no elements at that page, throws 404.\nDue to performance issues the fields `result_exists`, `dep_tokens`, `labels` and `access_groups`\nare only provided for queries for a single Hypercube job.\n\nIf `show_only_active` flag is set it only shows hypercube jobs that are not finished.\n`labels.resource_warning`, `labels.instance`, `labels.multiplier`, `access_groups` and `tag` fields are hidden by default for compatibility reasons,\nplease use X-Fields header to get it.\nFor example: X-Fields: \\*, labels{\\*}", "operationId": "listHypercubes", "parameters": [ { "description": "Hypercube token to filter", "format": "UUID", "in": "query", "name": "hypercube_token", "type": "string" }, { "description": "Can be set by admin/inviter; shows Hypercube submissions of everyone/invitees", "in": "query", "name": "everyone", "type": "boolean" }, { "default": 1, "in": "query", "maximum": 2147483647, "minimum": 1, "name": "page", "type": "integer" }, { "default": 0, "in": "query", "maximum": 2147483647, "minimum": 0, "name": "per_page", "type": "integer" }, { "in": "header", "name": "X-Fields", "type": "string" }, { "default": "submitted_at", "enum": [ "model", "namespace", "finished", "job_count", "submitted_at", "user" ], "in": "query", "name": "order_by", "type": "string" }, { "default": false, "in": "query", "name": "order_asc", "type": "boolean" }, { "default": false, "in": "query", "name": "show_only_active", "type": "boolean" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/hypercube_page" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Page not found" }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Lists the Hypercube jobs sent by the user unless `everyone` flag is set", "tags": [ "hypercube" ] }, "post": { "consumes": [ "multipart/form-data" ], "description": "If the model is a registered model, execute permission for the namespace is required.\nIf model is a temporary model execute and write permission for the namespace is required.\nWhen the disk or volume quota reaches 80%, quota_warning is included in the response.", "operationId": "createHypercube", "parameters": [ { "description": "Name of the model", "in": "query", "name": "model", "required": true, "type": "string" }, { "description": "Name of the main gms file with its extension. Will use model + '.gms' if not provided.", "in": "query", "name": "run", "type": "string" }, { "description": "Zip file containing model files, if model is not registered", "in": "formData", "name": "model_data", "type": "file" }, { "description": "Namespace containing(or will contain) the model", "in": "query", "name": "namespace", "required": true, "type": "string" }, { "description": "File containing data in zip", "in": "formData", "name": "data", "type": "file" }, { "description": "Optional JSON file to filter the contents of the result zip file", "in": "formData", "name": "inex_file", "type": "file" }, { "description": "Optional JSON string to filter the contents of the result zip file (inex_file takes precedence if specified)", "in": "query", "name": "inex_string", "type": "string" }, { "collectionFormat": "multi", "description": "Arguments that will be passed to GAMS call", "in": "query", "items": { "type": "string" }, "name": "arguments", "type": "array" }, { "collectionFormat": "multi", "description": "Tokens of jobs on which this job depends. The order defines the order in which the results of dependent jobs are extracted.", "format": "UUID", "in": "query", "items": { "type": "string" }, "name": "dep_tokens", "type": "array" }, { "collectionFormat": "multi", "description": "Labels that will be attached to the job in key=value. Currently supported labels are: cpu_request, memory_request, workspace_request, node_selectors, tolerations, instance", "in": "query", "items": { "type": "string" }, "name": "labels", "type": "array" }, { "description": "Human-readable tag to assign to job (at most 255 characters)", "in": "query", "name": "tag", "type": "string" }, { "collectionFormat": "multi", "description": "Labels of user groups that should be able to access this job.", "in": "query", "items": { "type": "string" }, "name": "access_groups", "type": "array" }, { "description": "Job priority. Only available if job priorities feature is enabled. Possible values are: low, medium, high", "enum": [ "low", "medium", "high" ], "in": "query", "name": "priority", "type": "string" }, { "in": "query", "name": "stdout_filename", "type": "string" }, { "description": "Hypercube description file", "in": "formData", "name": "hypercube_file", "required": true, "type": "file" } ], "responses": { "201": { "description": "Successful", "schema": { "$ref": "#/definitions/hypercube_token" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "402": { "description": "Quota exceeded", "schema": { "$ref": "#/definitions/quota_exceeded" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Model or namespace not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Posts a Hypercube job", "tags": [ "hypercube" ] } }, "/hypercube/{hypercube_token}": { "delete": { "description": "Job must belong to the logged in user, an invitee of the logged in user, or the logged in user must have admin role.", "operationId": "killHypercube", "parameters": [ { "default": false, "description": "Sends SIGKILL if true, SIGINT otherwise", "in": "query", "name": "hard_kill", "type": "boolean" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Already cancelled", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Hypercube not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Terminates the unfinished jobs that belong to a Hypercube job", "tags": [ "hypercube" ] }, "parameters": [ { "in": "path", "name": "hypercube_token", "required": true, "type": "string" } ] }, "/hypercube/{hypercube_token}/access-groups": { "parameters": [ { "in": "path", "name": "hypercube_token", "required": true, "type": "string" } ], "put": { "description": "Can be queried via listHypercubes endpoint.", "operationId": "updateHypercubeAccessGroups", "parameters": [ { "collectionFormat": "multi", "description": "Labels of user groups that should be able to access this job.", "in": "query", "items": { "type": "string" }, "name": "access_groups", "type": "array" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Job not found", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Update access groups that can access a Hypercube job", "tags": [ "hypercube" ] } }, "/hypercube/{hypercube_token}/result": { "delete": { "description": "Job must belong to the logged in user, an invitee of the logged in user, or logged in user must have admin role.", "operationId": "deleteHypercubeZip", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Result not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Deletes the results of the Hypercube job", "tags": [ "hypercube" ] }, "get": { "description": "The job must belong to the logged in user, an invitee of the logged in user, or logged in user must have admin role.", "operationId": "getHypercubeZip", "produces": [ "application/zip" ], "responses": { "200": { "description": "Successful", "schema": { "type": "file" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Result not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Downloads Hypercube job result", "tags": [ "hypercube" ] }, "head": { "description": "The job must belong to the logged in user, an invitee of the logged in user, or the logged in user must have admin role.", "operationId": "getHypercubeZipInfo", "responses": { "200": { "description": "Successful", "headers": { "md5_hash": { "description": "MD5 hash of file", "type": "string" }, "st_size": { "description": "Size of the file in bytes", "type": "string" } } }, "403": { "description": "Unauthorized access / File not found" }, "404": { "description": "No job found" }, "500": { "description": "Internal error" } }, "security": [ { "BasicAuth": [] } ], "summary": "Gets md5 hash and file size information of Hypercube job result", "tags": [ "hypercube" ] }, "parameters": [ { "in": "path", "name": "hypercube_token", "required": true, "type": "string" } ] }, "/hypercube/{hypercube_token}/status": { "parameters": [ { "in": "path", "name": "hypercube_token", "required": true, "type": "string" } ] }, "/hypercube/{hypercube_token}/tag": { "parameters": [ { "in": "path", "name": "hypercube_token", "required": true, "type": "string" } ], "put": { "description": "Stored in `tag` field. Can be queried via listHypercubes endpoint.", "operationId": "updateHypercubeTag", "parameters": [ { "description": "Human-readable tag to assign to job (at most 255 characters)", "in": "query", "name": "tag", "pattern": "^.{0,255}$", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Job not found", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Update human-readable tag of a Hypercube job", "tags": [ "hypercube" ] } }, "/jobs/": { "get": { "description": "If user has admin role and `everyone` flag is set, all jobs are listed.\nIf user is not inviter or admin and `everyone` flag is set,\nall visible jobs (jobs that were assigned to a user group that user is member of) are listed.\nIf user is inviter and 'everyone' flag is set, jobs of all invitees will be listed additionally.\n\nIf `page` is not one and there are no elements at that page, throws 404.\n\n`per_page` is zero by default and it indicates that you want all the values.\nIf a non-zero value provided to `per_page`, result will be paginated by that `page_size`\n\nif `show_only_active` set, submissions that are waiting, queued, running or cancelling will be returned.\n\nThe fields that are displayed by default are:\n`model`, `status`, `process_status`, `submitted_at`, `stdout_filename`, `namespace`, `token`, `finished_at`\nTo see other fields, please use X-Fields accordingly. E.g `X-Fields: *` will show everything.", "operationId": "listJobs", "parameters": [ { "description": "Can be set by admin/inviter; shows submissions of everyone/invitees", "in": "query", "name": "everyone", "type": "boolean" }, { "in": "header", "name": "X-Fields", "type": "string" }, { "default": 1, "in": "query", "maximum": 2147483647, "minimum": 1, "name": "page", "type": "integer" }, { "default": 0, "in": "query", "maximum": 2147483647, "minimum": 0, "name": "per_page", "type": "integer" }, { "default": "submitted_at", "enum": [ "model", "namespace", "status", "process_status", "submitted_at", "finished_at", "user" ], "in": "query", "name": "order_by", "type": "string" }, { "default": false, "in": "query", "name": "order_asc", "type": "boolean" }, { "default": false, "in": "query", "name": "show_only_active", "type": "boolean" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/job_no_text_entry_page" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Page not found" }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Lists the jobs of the user unless `everyone` flag is set", "tags": [ "jobs" ] }, "post": { "consumes": [ "multipart/form-data" ], "description": "Requires execute permission for registered models,\nrequires write and execute permissions for unregistered models.\nWhen the disk or volume quota reaches 80%, quota_warning is included in the response.", "operationId": "createJob", "parameters": [ { "description": "Name of the model", "in": "query", "name": "model", "required": true, "type": "string" }, { "description": "Name of the main gms file with its extension. Will use model + '.gms' if not provided.", "in": "query", "name": "run", "type": "string" }, { "description": "Zip file containing model files, if model is not registered", "in": "formData", "name": "model_data", "type": "file" }, { "description": "Namespace containing(or will contain) the model", "in": "query", "name": "namespace", "required": true, "type": "string" }, { "description": "File containing data in zip", "in": "formData", "name": "data", "type": "file" }, { "description": "Optional JSON file to filter the contents of the result zip file", "in": "formData", "name": "inex_file", "type": "file" }, { "description": "Optional JSON string to filter the contents of the result zip file (inex_file takes precedence if specified)", "in": "query", "name": "inex_string", "type": "string" }, { "collectionFormat": "multi", "in": "query", "items": { "type": "string" }, "name": "text_entries", "type": "array" }, { "collectionFormat": "multi", "in": "query", "items": { "type": "string" }, "name": "stream_entries", "type": "array" }, { "default": "log_stdout.txt", "description": "Name of the file that captures stdout", "in": "query", "name": "stdout_filename", "type": "string" }, { "collectionFormat": "multi", "description": "Arguments that will be passed to GAMS call", "in": "query", "items": { "type": "string" }, "name": "arguments", "type": "array" }, { "collectionFormat": "multi", "description": "Tokens of jobs on which this job depends. The order defines the order in which the results of dependent jobs are extracted.", "format": "UUID", "in": "query", "items": { "type": "string" }, "name": "dep_tokens", "type": "array" }, { "collectionFormat": "multi", "description": "Labels that will be attached to the job in key=value. Currently supported labels are: cpu_request, memory_request, workspace_request, node_selectors, tolerations, instance", "in": "query", "items": { "type": "string" }, "name": "labels", "type": "array" }, { "description": "Human-readable tag to assign to job (at most 255 characters)", "in": "query", "name": "tag", "type": "string" }, { "collectionFormat": "multi", "description": "Labels of user groups that should be able to access this job.", "in": "query", "items": { "type": "string" }, "name": "access_groups", "type": "array" }, { "description": "Job priority. Only available if job priorities feature is enabled. Possible values are: low, medium, high", "enum": [ "low", "medium", "high" ], "in": "query", "name": "priority", "type": "string" } ], "responses": { "201": { "description": "Job created", "schema": { "$ref": "#/definitions/message_and_token" } }, "400": { "description": "Input is not valid" }, "401": { "description": "Invalid authentication" }, "402": { "description": "Quota exceeded", "schema": { "$ref": "#/definitions/quota_exceeded" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Namespace could not be found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Submits a new job to be solved", "tags": [ "jobs" ] } }, "/jobs/status-codes": { "get": { "operationId": "get_status_codes", "parameters": [ { "description": "An optional fields mask", "format": "mask", "in": "header", "name": "X-Fields", "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "items": { "$ref": "#/definitions/status_code_meaning" }, "type": "array" } } }, "summary": "Returns mapping of job status codes to human readable messages", "tags": [ "jobs" ] } }, "/jobs/{token}": { "delete": { "description": "It has no effect if the job is finished.\nIf the job is pending, worker will disregard the job when it receives the job.\nIf the job is running, it will be terminated.\nThe job must belong to the logged in user, an invitee of the logged in user, or the logged in user must have admin role.", "operationId": "killJob", "parameters": [ { "default": false, "description": "Sends SIGKILL if true, SIGINT otherwise", "in": "query", "name": "hard_kill", "type": "boolean" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Job is already finished", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Job not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Sends interrupt signal to a job", "tags": [ "jobs" ] }, "get": { "description": "The job must belong to the logged in user, an invitee of the logged in user, or the logged in user must have admin role.\n`labels.resource_warning`, `labels.instance`, `labels.multiplier`, `access_groups` and `tag` fields are hidden by default for compatibility reasons,\nplease use X-Fields header to get it.\nFor example: X-Fields: \\*, labels{\\*}", "operationId": "getJob", "parameters": [ { "in": "header", "name": "X-Fields", "type": "string" } ], "responses": { "200": { "description": "Succesful", "schema": { "$ref": "#/definitions/job" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Job not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Returns the details of a job", "tags": [ "jobs" ] }, "parameters": [ { "in": "path", "name": "token", "required": true, "type": "string" } ] }, "/jobs/{token}/access-groups": { "parameters": [ { "in": "path", "name": "token", "required": true, "type": "string" } ], "put": { "description": "Can be queried via getJob endpoint.", "operationId": "updateJobAccessGroups", "parameters": [ { "collectionFormat": "multi", "description": "Labels of user groups that should be able to access this job.", "in": "query", "items": { "type": "string" }, "name": "access_groups", "type": "array" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Job not found", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Update access groups that can access a job", "tags": [ "jobs" ] } }, "/jobs/{token}/result": { "delete": { "description": "The job must belong to the logged in user, an invitee of the logged in user, or the logged in user must have admin role.", "operationId": "deleteJobZip", "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Job data does not exist", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "No job found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Deletes the job result and all the text entries", "tags": [ "jobs" ] }, "get": { "description": "The job must belong to the logged in user, an invitee of the logged in user, or the logged in user must have admin role.", "operationId": "getJobZip", "produces": [ "application/zip" ], "responses": { "200": { "description": "Success", "headers": { "content-disposition": { "description": "attachment; filename=data.zip", "type": "string" }, "content-type": { "description": "application/zip", "type": "string" } }, "schema": { "type": "file" } }, "403": { "description": "Job data does not exist", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "No job found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Downloads job result", "tags": [ "jobs" ] }, "head": { "description": "The job must belong to the logged in user, an invitee of the logged in user, or the logged in user must have admin role.", "operationId": "getJobZipInfo", "responses": { "200": { "description": "Successful", "headers": { "md5_hash": { "description": "MD5 hash of file", "type": "string" }, "st_size": { "description": "Size of the file in bytes", "type": "string" } } }, "403": { "description": "Unauthorized access" }, "404": { "description": "Job or file not found" }, "500": { "description": "Internal error" } }, "security": [ { "BasicAuth": [] } ], "summary": "Gets size and md5 hash of job result", "tags": [ "jobs" ] }, "parameters": [ { "in": "path", "name": "token", "required": true, "type": "string" } ] }, "/jobs/{token}/stream-entry": { "delete": { "description": "The job must belong to the logged in user, an invitee of the logged in user, or the logged in user must have admin role.", "operationId": "consumeStreamEntry", "parameters": [ { "description": "Token of the job whose status is to be queried", "in": "path", "name": "token", "required": true, "type": "string" }, { "description": "Name of the text entry to be queried", "in": "query", "name": "entry_name", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/stream_entry" } }, "308": { "description": "Stream entry is gone", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "No job found / No stream entry found", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Flushes and returns the stream entry queue", "tags": [ "jobs" ] } }, "/jobs/{token}/stream-entry/{entry_name}": { "delete": { "description": "The job must belong to the logged in user, an invitee of the logged in user, or the logged in user must have admin role.", "operationId": "popStreamEntry", "parameters": [ { "description": "Token of the job whose status is to be queried", "in": "path", "name": "token", "required": true, "type": "string" }, { "description": "Name of the stream entry to be queried", "in": "path", "name": "entry_name", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/stream_entry" } }, "308": { "description": "Stream entry is gone", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "No job found / No stream entry found", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Flushes and returns the stream entry queue", "tags": [ "jobs" ] } }, "/jobs/{token}/tag": { "parameters": [ { "in": "path", "name": "token", "required": true, "type": "string" } ], "put": { "description": "Stored in `tag` field. Can be queried via getJob endpoint.", "operationId": "updateJobTag", "parameters": [ { "description": "Human-readable tag to assign to job (at most 255 characters)", "in": "query", "name": "tag", "pattern": "^.{0,255}$", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Invalid input" }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Job not found", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Update human-readable tag of a job", "tags": [ "jobs" ] } }, "/jobs/{token}/text-entry": { "get": { "description": "Start position and length can be specified to get a partial text entry.\nThe job must belong to the logged in user, an invitee of the logged in user, or the logged in user must have admin role.", "operationId": "queryJobTextEntry", "parameters": [ { "description": "Token of the job whose status is to be queried", "in": "path", "name": "token", "required": true, "type": "string" }, { "description": "Name of the text entry to be queried", "in": "query", "name": "entry_name", "required": true, "type": "string" }, { "default": 1, "description": "Start position of the substring", "in": "query", "maximum": 2147483647, "minimum": 1, "name": "start_position", "type": "integer" }, { "description": "Number of chars you want to extract; if omitted, whole string is extracted", "in": "query", "maximum": 2147483647, "minimum": 1, "name": "length", "type": "integer" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/text_entry" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "No job found / The text entry cannot be found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Gets the value of a text entry", "tags": [ "jobs" ] }, "head": { "description": "The job must belong to the logged in user, an invitee of the logged in user, or the logged in user must have admin role.", "operationId": "queryJobTextEntryInfo", "parameters": [ { "description": "Token of the job whose status is to be queried", "in": "path", "name": "token", "required": true, "type": "string" }, { "description": "Name of the text entry to be queried", "in": "query", "name": "entry_name", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "headers": { "char_length": { "description": "an integer will be here", "type": "string" } } }, "403": { "description": "Unauthorized access" }, "404": { "description": "No job found / The text entry cannot be found" } }, "security": [ { "BasicAuth": [] } ], "summary": "Returns the number of characters of the text entry", "tags": [ "jobs" ] } }, "/jobs/{token}/text-entry/{entry_name}": { "get": { "description": "Start position and length can be specified to get a partial text entry.\nThe job must belong to the logged in user, an invitee of the logged in user, or the logged in user must have admin role.", "operationId": "getJobTextEntry", "parameters": [ { "description": "Token of the job whose status is to be queried", "in": "path", "name": "token", "required": true, "type": "string" }, { "description": "Name of the text entry to be queried", "in": "path", "name": "entry_name", "required": true, "type": "string" }, { "default": 1, "description": "Start position of the substring", "in": "query", "maximum": 2147483647, "minimum": 1, "name": "start_position", "type": "integer" }, { "description": "Number of chars you want to extract; if omitted, whole string is extracted", "in": "query", "maximum": 2147483647, "minimum": 1, "name": "length", "type": "integer" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/text_entry" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "No job found / The text entry cannot be found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Gets the value of a text entry", "tags": [ "jobs" ] }, "head": { "description": "The job must belong to the logged in user, an invitee of the logged in user, or the logged in user must have admin role.", "operationId": "getJobTextEntryInfo", "parameters": [ { "description": "Token of the job whose status is to be queried", "in": "path", "name": "token", "required": true, "type": "string" }, { "description": "Name of the text entry to be queried", "in": "path", "name": "entry_name", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "headers": { "char_length": { "description": "an integer will be here", "type": "string" } } }, "403": { "description": "Unauthorized access" }, "404": { "description": "No job found / The text entry cannot be found" } }, "security": [ { "BasicAuth": [] } ], "summary": "Returns the number of characters of the text entry", "tags": [ "jobs" ] } }, "/jobs/{token}/unread-logs": { "delete": { "description": "The job must belong to the logged in user, an invitee of the logged in user, or the logged in user must have admin role.", "operationId": "popJobLogs", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/log_piece" } }, "308": { "description": "Partial log is not available, get the full log", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Cannot get logs of pending job / Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "No job found", "schema": { "$ref": "#/definitions/message" } }, "410": { "description": "Job will not start", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Flushes and returns stdout of job", "tags": [ "jobs" ] }, "parameters": [ { "in": "path", "name": "token", "required": true, "type": "string" } ] }, "/licenses/": { "delete": { "description": "Deletes licenses from invited users if the affected user is an inviter.\nThe user must be the owner of the license, not just an heir.\nRequires admin privileges.", "operationId": "deleteLicense", "parameters": [ { "in": "query", "name": "username", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Not found", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Deletes the license associated with the given user", "tags": [ "licenses" ] }, "get": { "operationId": "getLicense", "parameters": [ { "description": "Username of the user to filter", "in": "query", "name": "username", "type": "string" }, { "in": "header", "name": "X-Fields", "type": "string" }, { "default": false, "description": "Show only license owners, not the heirs", "in": "query", "name": "only-owners", "type": "boolean" } ], "responses": { "200": { "description": "Successful", "schema": { "items": { "$ref": "#/definitions/license" }, "type": "array" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Not found", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Lists the users' licenses", "tags": [ "licenses" ] }, "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Overwrites the user's current license, if any.\nWhen inviters receive a license, they pass the license on to the users\nthey have invited. Requires admin role.", "operationId": "updateLicense", "parameters": [ { "in": "formData", "name": "username", "required": true, "type": "string" }, { "description": "Base64 encoded License", "in": "formData", "maxLength": 1000, "name": "license", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Not found", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Associates a license with a user", "tags": [ "licenses" ] } }, "/licenses/engine": { "get": { "operationId": "getEngineLicense", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/engine_license" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Returns Engine license", "tags": [ "licenses" ] }, "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "operationId": "updateEngineLicense", "parameters": [ { "description": "Engine license", "in": "formData", "name": "license", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Input is not valid" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Updates Engine license", "tags": [ "licenses" ] } }, "/licenses/system-wide": { "delete": { "operationId": "deleteSystemWideGAMSLicense", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Not found", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Deletes the system-wide GAMS license (only admins)", "tags": [ "licenses" ] }, "get": { "operationId": "getSystemWideGAMSLicense", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/system_wide_license" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Fetches the system-wide GAMS license (only admins)", "tags": [ "licenses" ] }, "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "operationId": "updateSystemWideGAMSLicense", "parameters": [ { "description": "Base64 encoded system-wide GAMS License", "in": "formData", "maxLength": 1000, "name": "license", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Updates the system-wide GAMS license (only admins)", "tags": [ "licenses" ] } }, "/namespaces/": { "get": { "description": "You must have some permission on namespace to see it.\nAdmins can see every namespace and every permission.\nInviters can see namespaces for which they have permission, as well as the permissions of invitees.\nUsers can see namespaces in which they have permissions, as well as the permissions for themselves.", "operationId": "listNamespaces", "responses": { "200": { "description": "Successful", "schema": { "items": { "$ref": "#/definitions/namespace" }, "type": "array" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Lists the namespaces", "tags": [ "namespaces" ] } }, "/namespaces/permissions/me": { "get": { "deprecated": true, "description": "If the user does not have write permission, then the `disk_quota` is None. If the user has write permission\nbut `disk_quota` is still None, it means namespace does not have any disk quota.", "operationId": "getAccessibleNamespaces", "responses": { "200": { "description": "Successful", "schema": { "items": { "$ref": "#/definitions/namespace_with_permission" }, "type": "array" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Lists the namespaces where the user has a non-zero permission, along with that `permission` and `disk_quota`", "tags": [ "namespaces" ] } }, "/namespaces/{namespace}": { "delete": { "description": "Models, permissions and results assigned to this namespace are deleted.\nIf jobs are running in this namespace, they are aborted.\nRequires admin role.", "operationId": "deleteNamespace", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Deletes a namespace", "tags": [ "namespaces" ] }, "get": { "description": "If the model argument is specified, the information about this model is\ndisplayed only if the model is registered in the namespace.\nModels that are not assigned to a user group are visible to anyone with any\npermission (read, write, and/or execute) in the namespace.\nModels assigned to one or more user groups are only visible if the user can see any of these user groups.\n`protect_model_files` field is hidden by default for compatibility reasons,\nplease use X-Fields header to get it.\nFor example: X-Fields: \\*", "operationId": "listModels", "parameters": [ { "in": "header", "name": "X-Fields", "type": "string" }, { "description": "Name of the model to filter", "in": "query", "name": "model", "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "items": { "$ref": "#/definitions/models" }, "type": "array" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Lists the models in a namespace", "tags": [ "namespaces" ] }, "parameters": [ { "in": "path", "name": "namespace", "required": true, "type": "string" } ], "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Requires admin role", "operationId": "createNamespace", "parameters": [ { "description": "disk quota in bytes", "exclusiveMinimum": true, "in": "formData", "minimum": 0, "name": "disk_quota", "type": "integer" } ], "responses": { "201": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Input error", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Creates a namespace", "tags": [ "namespaces" ] } }, "/namespaces/{namespace}/disk-quota": { "delete": { "description": "Requires admin role", "operationId": "deleteNamespaceQuota", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Input error", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Namespace not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Deletes namespace disk quota", "tags": [ "namespaces" ] }, "get": { "description": "Requires write permission", "operationId": "getNamespaceQuota", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/namespace_quota" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Namespace not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Displays namespace disk quota", "tags": [ "namespaces" ] }, "parameters": [ { "in": "path", "name": "namespace", "required": true, "type": "string" } ], "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Requires admin role", "operationId": "updateNamespaceQuota", "parameters": [ { "default": 1000000000, "description": "disk quota in bytes", "exclusiveMinimum": true, "in": "formData", "minimum": 0, "name": "disk_quota", "required": true, "type": "integer" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Input error", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Namespace not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Updates namespace disk quota", "tags": [ "namespaces" ] } }, "/namespaces/{namespace}/models/{model}": { "delete": { "description": "Requires write permission.", "operationId": "deleteModel", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Namespace is not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Deletes a model registered in the namespace", "tags": [ "namespaces" ] }, "get": { "description": "Requires read permission.", "operationId": "getModel", "responses": { "200": { "description": "Successful", "headers": { "content-disposition": { "description": "attachment; filename=model.zip", "type": "string" }, "content-type": { "description": "application/zip", "type": "string" } }, "schema": { "type": "file" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Namespace is not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Downloads model data", "tags": [ "namespaces" ] }, "parameters": [ { "in": "path", "name": "namespace", "required": true, "type": "string" }, { "in": "path", "name": "model", "required": true, "type": "string" } ], "patch": { "consumes": [ "multipart/form-data" ], "operationId": "updateModel", "parameters": [ { "description": "Zip file containing files of model", "in": "formData", "name": "data", "type": "file" }, { "description": "JSON file that describes which files will be included/excluded from results archive", "in": "formData", "name": "inex_file", "type": "file" }, { "description": "JSON string that describes which files will be included/excluded from results archive (if provided, inex_file takes precendence)", "in": "query", "name": "inex_string", "type": "string" }, { "collectionFormat": "multi", "description": "Arguments that will be passed to GAMS call", "in": "query", "items": { "type": "string" }, "name": "arguments", "type": "array" }, { "description": "Main GMS file to run, please include file extension as well. Will use model + '.gms' if not provided.", "in": "query", "name": "run", "type": "string" }, { "description": "Whether to protect model files from being overwritten by data files.", "in": "query", "name": "protect_model_files", "type": "boolean" }, { "collectionFormat": "multi", "description": "Restrict access to specific user groups", "in": "query", "items": { "type": "string" }, "name": "user_groups", "type": "array" }, { "collectionFormat": "multi", "description": "Files to store as text entries", "in": "query", "items": { "type": "string" }, "name": "text_entries", "type": "array" }, { "collectionFormat": "multi", "description": "Files to stream during execution", "in": "query", "items": { "type": "string" }, "name": "stream_entries", "type": "array" }, { "default": false, "description": "If `inex_file` is provided, setting this throws error, otherwise setting this to true deletes the inex file", "in": "query", "name": "delete_inex_file", "type": "boolean" }, { "default": false, "description": "If `arguments` is provided, setting this throws error, otherwise setting this deletes the arguments", "in": "query", "name": "delete_arguments", "type": "boolean" }, { "default": false, "description": "If `run` is provided, setting this throws error, otherwise setting this to true deletes the run filename", "in": "query", "name": "delete_run", "type": "boolean" }, { "default": false, "description": "If `user_groups` is provided, setting this throws error, otherwise setting this deletes the user groups", "in": "query", "name": "delete_user_groups", "type": "boolean" }, { "default": false, "description": "If `text_entries` is provided, setting this throws error, otherwise setting this deletes the text entries", "in": "query", "name": "delete_text_entries", "type": "boolean" }, { "default": false, "description": "If `stream_entries` is provided, setting this throws error, otherwise setting this deletes the stream entries", "in": "query", "name": "delete_stream_entries", "type": "boolean" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Input error", "schema": { "$ref": "#/definitions/message" } }, "402": { "description": "Namespace disk quota reached", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Namespace is not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Partially update registered models", "tags": [ "namespaces" ] }, "post": { "consumes": [ "multipart/form-data" ], "description": "Requires write permission.", "operationId": "createModel", "parameters": [ { "description": "Zip file containing files of model", "in": "formData", "name": "data", "required": true, "type": "file" }, { "description": "JSON file that describes which files will be included/excluded from results archive", "in": "formData", "name": "inex_file", "type": "file" }, { "description": "JSON string that describes which files will be included/excluded from results archive (if provided, inex_file takes precendence)", "in": "query", "name": "inex_string", "type": "string" }, { "collectionFormat": "multi", "description": "Arguments that will be passed to GAMS call", "in": "query", "items": { "type": "string" }, "name": "arguments", "type": "array" }, { "collectionFormat": "multi", "description": "Files to store as text entries", "in": "query", "items": { "type": "string" }, "name": "text_entries", "type": "array" }, { "collectionFormat": "multi", "description": "Files to stream during execution", "in": "query", "items": { "type": "string" }, "name": "stream_entries", "type": "array" }, { "description": "Main GMS file to run, please include file extension as well. Will use model + '.gms' if not provided.", "in": "query", "name": "run", "type": "string" }, { "description": "Whether to protect model files from being overwritten by data files.", "in": "query", "name": "protect_model_files", "type": "boolean" }, { "collectionFormat": "multi", "description": "Restrict access to specific user groups", "in": "query", "items": { "type": "string" }, "name": "user_groups", "type": "array" } ], "responses": { "201": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "402": { "description": "Namespace disk quota reached", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Namespace is not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Registers a new model in the given namespace", "tags": [ "namespaces" ] } }, "/namespaces/{namespace}/permissions": { "get": { "description": "Admins can query all users, inviters can only query the invitees.\nUsers can query themselves.", "operationId": "getUserPermission", "parameters": [ { "description": "Username", "in": "query", "name": "username", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/perm_and_username" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "User or namespace not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Gets permissions of the given user for the given namespace", "tags": [ "namespaces" ] }, "parameters": [ { "in": "path", "name": "namespace", "required": true, "type": "string" } ], "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Admins can grant all permissions, inviting persons can only grant the permissions they have.\nRequires admin or inviter role.", "operationId": "replaceUserPermission", "parameters": [ { "description": "Username", "in": "formData", "name": "username", "required": true, "type": "string" }, { "description": "4 - Read access to namespace\n2 - Write access to namespace(delete, update, create)\n1 - Execute model access to namespace\n Sum to calculate permission", "in": "formData", "maximum": 7, "minimum": 0, "name": "permissions", "required": true, "type": "integer" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Sets permissions of the given user for the given namespace", "tags": [ "namespaces" ] } }, "/namespaces/{namespace}/permissions/me": { "get": { "deprecated": true, "description": "If user has admin role, it always returns 7.", "operationId": "getMyPermissions", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/perm_and_username" } }, "404": { "description": "Namespace not found", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Returns the permissions of the logged in user in the given namespace", "tags": [ "namespaces" ] }, "parameters": [ { "in": "path", "name": "namespace", "required": true, "type": "string" } ] }, "/namespaces/{namespace}/user-groups": { "delete": { "description": "Inviters with write permission to the namespace can delete their own groups as well as the groups of any invitees.\nAdmins can delete any group.", "operationId": "deleteUserGroup", "parameters": [ { "description": "Group label", "in": "query", "name": "label", "pattern": "^[a-zA-Z0-9_]{4,70}$", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Deletes a user group", "tags": [ "namespaces" ] }, "get": { "description": "If user, fetches groups in which the user is a member.\nIf inviter, fetches groups the inviter is a member of, as well as all groups of invitees.\nIf admin, fetches all groups.", "operationId": "getUserGroups", "responses": { "200": { "description": "Successful", "schema": { "items": { "$ref": "#/definitions/user_groups" }, "type": "array" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Namespace not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Fetches user groups", "tags": [ "namespaces" ] }, "parameters": [ { "in": "path", "name": "namespace", "required": true, "type": "string" } ], "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Requires admin role or inviter role with write permissions on the namespace.", "operationId": "createUserGroup", "parameters": [ { "description": "Group label", "in": "formData", "name": "label", "pattern": "^[a-zA-Z0-9_]{4,70}$", "required": true, "type": "string" } ], "responses": { "201": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Namespace not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Creates a new user group", "tags": [ "namespaces" ] } }, "/namespaces/{namespace}/user-groups/{label}": { "delete": { "description": "Inviters can remove any invitees from a group they are a member of or that belongs to an invitee.\nAdmins can remove anyone from any group.", "operationId": "removeUserFromGroup", "parameters": [ { "description": "Username to remove", "in": "query", "name": "username", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Removes a user from a group", "tags": [ "namespaces" ] }, "parameters": [ { "in": "path", "name": "namespace", "required": true, "type": "string" }, { "in": "path", "name": "label", "required": true, "type": "string" } ], "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Inviters can add any invitees to a group they are a member of or that belongs to an invitee.\nAdmins can add anyone to any group.", "operationId": "addUserToGroup", "parameters": [ { "description": "Username to add", "in": "formData", "name": "username", "required": true, "type": "string" } ], "responses": { "201": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Adds a user to a group", "tags": [ "namespaces" ] } }, "/namespaces/{namespace}/{model}": { "delete": { "deprecated": true, "description": "Requires write permission.", "operationId": "deleteModelDeprecated", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Deletes a model registered in the namespace", "tags": [ "namespaces" ] }, "get": { "deprecated": true, "description": "Requires read permission.", "operationId": "getModelDeprecated", "responses": { "200": { "description": "Successful", "headers": { "content-disposition": { "description": "attachment; filename=model.zip", "type": "string" }, "content-type": { "description": "application/zip", "type": "string" } }, "schema": { "type": "file" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Downloads model data", "tags": [ "namespaces" ] }, "parameters": [ { "in": "path", "name": "namespace", "required": true, "type": "string" }, { "in": "path", "name": "model", "required": true, "type": "string" } ], "patch": { "consumes": [ "multipart/form-data" ], "deprecated": true, "operationId": "updateModelDeprecated", "parameters": [ { "description": "Zip file containing files of model", "in": "formData", "name": "data", "type": "file" }, { "description": "JSON file that describes which files will be included/excluded from results archive", "in": "formData", "name": "inex_file", "type": "file" }, { "description": "JSON string that describes which files will be included/excluded from results archive (if provided, inex_file takes precendence)", "in": "query", "name": "inex_string", "type": "string" }, { "collectionFormat": "multi", "description": "Arguments that will be passed to GAMS call", "in": "query", "items": { "type": "string" }, "name": "arguments", "type": "array" }, { "description": "Main GMS file to run, please include file extension as well. Will use model + '.gms' if not provided.", "in": "query", "name": "run", "type": "string" }, { "description": "Whether to protect model files from being overwritten by data files.", "in": "query", "name": "protect_model_files", "type": "boolean" }, { "collectionFormat": "multi", "description": "Restrict access to specific user groups", "in": "query", "items": { "type": "string" }, "name": "user_groups", "type": "array" }, { "collectionFormat": "multi", "description": "Files to store as text entries", "in": "query", "items": { "type": "string" }, "name": "text_entries", "type": "array" }, { "collectionFormat": "multi", "description": "Files to stream during execution", "in": "query", "items": { "type": "string" }, "name": "stream_entries", "type": "array" }, { "default": false, "description": "If `inex_file` is provided, setting this throws error, otherwise setting this to true deletes the inex file", "in": "query", "name": "delete_inex_file", "type": "boolean" }, { "default": false, "description": "If `arguments` is provided, setting this throws error, otherwise setting this deletes the arguments", "in": "query", "name": "delete_arguments", "type": "boolean" }, { "default": false, "description": "If `run` is provided, setting this throws error, otherwise setting this to true deletes the run filename", "in": "query", "name": "delete_run", "type": "boolean" }, { "default": false, "description": "If `user_groups` is provided, setting this throws error, otherwise setting this deletes the user groups", "in": "query", "name": "delete_user_groups", "type": "boolean" }, { "default": false, "description": "If `text_entries` is provided, setting this throws error, otherwise setting this deletes the text entries", "in": "query", "name": "delete_text_entries", "type": "boolean" }, { "default": false, "description": "If `stream_entries` is provided, setting this throws error, otherwise setting this deletes the stream entries", "in": "query", "name": "delete_stream_entries", "type": "boolean" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Input error", "schema": { "$ref": "#/definitions/message" } }, "402": { "description": "Namespace disk quota reached", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Partially update registered models", "tags": [ "namespaces" ] }, "post": { "consumes": [ "multipart/form-data" ], "deprecated": true, "description": "Requires write permission.", "operationId": "createModelDeprecated", "parameters": [ { "description": "Zip file containing files of model", "in": "formData", "name": "data", "required": true, "type": "file" }, { "description": "JSON file that describes which files will be included/excluded from results archive", "in": "formData", "name": "inex_file", "type": "file" }, { "description": "JSON string that describes which files will be included/excluded from results archive (if provided, inex_file takes precendence)", "in": "query", "name": "inex_string", "type": "string" }, { "collectionFormat": "multi", "description": "Arguments that will be passed to GAMS call", "in": "query", "items": { "type": "string" }, "name": "arguments", "type": "array" }, { "collectionFormat": "multi", "description": "Files to store as text entries", "in": "query", "items": { "type": "string" }, "name": "text_entries", "type": "array" }, { "collectionFormat": "multi", "description": "Files to stream during execution", "in": "query", "items": { "type": "string" }, "name": "stream_entries", "type": "array" }, { "description": "Main GMS file to run, please include file extension as well. Will use model + '.gms' if not provided.", "in": "query", "name": "run", "type": "string" }, { "description": "Whether to protect model files from being overwritten by data files.", "in": "query", "name": "protect_model_files", "type": "boolean" }, { "collectionFormat": "multi", "description": "Restrict access to specific user groups", "in": "query", "items": { "type": "string" }, "name": "user_groups", "type": "array" } ], "responses": { "201": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "402": { "description": "Namespace disk quota reached", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Registers a new model in the given namespace", "tags": [ "namespaces" ] } }, "/usage/": { "get": { "description": "Admins can query everyone's usage data.\nInviters can query usage data of invitees or usage data of jobs they have access to.\nUsers can only query their own usage data or usage data of jobs they have access to.\n`resource_warning`, `instance`, and `multiplier` fields are hidden by default for compatibility reasons,\nplease use X-Fields header to get it.\nFor example: X-Fields: job_usage{\\*, labels{\\*}}, hypercube_job_usage{\\*, labels{\\*}}, pool_usage{\\*}", "operationId": "getUsage", "parameters": [ { "description": "Name of the user", "in": "query", "name": "username", "required": true, "type": "string" }, { "default": false, "description": "Show invitees as well", "in": "query", "name": "recursive", "type": "boolean" }, { "description": "iso8601 Datetime to filter jobs out when they are submitted before.", "format": "date-time", "in": "query", "name": "from_datetime", "type": "string" }, { "description": "iso8601 Datetime to filter jobs out when they are submitted after.", "format": "date-time", "in": "query", "name": "to_datetime", "type": "string" }, { "in": "header", "name": "X-Fields", "type": "string" }, { "collectionFormat": "multi", "description": "Job tokens to filter", "format": "UUID", "in": "query", "items": { "type": "string" }, "name": "token", "type": "array" }, { "collectionFormat": "multi", "description": "Hypercube tokens to filter", "format": "UUID", "in": "query", "items": { "type": "string" }, "name": "hypercube_token", "type": "array" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/model_usage" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/bad_input" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Namespace not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Queries the usage data of a user with or without the user's invitees", "tags": [ "usage" ] } }, "/usage/instances": { "delete": { "description": "Requires admin role.", "operationId": "deleteInstance", "parameters": [ { "description": "Label of instance to delete", "in": "query", "maxLength": 60, "minLength": 1, "name": "label", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/bad_input" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Instance not found", "schema": { "$ref": "#/definitions/message" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Deletes existing instance", "tags": [ "usage" ] }, "get": { "description": "Requires admin role or the user must be able to use raw resource requests.", "operationId": "getInstances", "responses": { "200": { "description": "Successful", "schema": { "items": { "$ref": "#/definitions/model_instance_info_full" }, "type": "array" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "User not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Lists all instances", "tags": [ "usage" ] }, "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Requires admin role.", "operationId": "createInstance", "parameters": [ { "description": "Label to assign to instance", "in": "formData", "maxLength": 60, "minLength": 1, "name": "label", "required": true, "type": "string" }, { "description": "CPU units (vCPU/Core, Hyperthread)", "in": "formData", "minimum": 0, "name": "cpu_request", "required": true, "type": "number" }, { "description": "Memory units (MiB)", "exclusiveMinimum": true, "in": "formData", "minimum": 0, "name": "memory_request", "required": true, "type": "integer" }, { "description": "Instance multiplier (applied when worker is idle)", "in": "formData", "minimum": 0, "name": "multiplier_idle", "required": true, "type": "number" }, { "description": "Instance multiplier (applied when worker is busy)", "in": "formData", "minimum": 0, "name": "multiplier", "required": true, "type": "number" }, { "description": "Max amount of disk space that can be used during the solve (MiB)", "in": "formData", "maximum": 1000000, "minimum": 100, "name": "workspace_request", "required": true, "type": "integer" }, { "collectionFormat": "multi", "description": "Toleration information for the pod", "in": "formData", "items": { "type": "string" }, "name": "tolerations", "type": "array" }, { "collectionFormat": "multi", "description": "Node selector information for the pod", "in": "formData", "items": { "type": "string" }, "name": "node_selectors", "type": "array" }, { "description": "Base64-encoded GAMS license to be used on this instance (takes precedence over the user license and the system-wide license, not supported in Engine One)", "in": "formData", "maxLength": 1000, "name": "gams_license", "type": "string" } ], "responses": { "201": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/bad_input" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Adds new instance", "tags": [ "usage" ] }, "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Requires admin role.", "operationId": "updateInstance", "parameters": [ { "description": "Label to assign to instance", "in": "formData", "maxLength": 60, "minLength": 1, "name": "label", "required": true, "type": "string" }, { "description": "CPU units (vCPU/Core, Hyperthread)", "in": "formData", "minimum": 0, "name": "cpu_request", "required": true, "type": "number" }, { "description": "Memory units (MiB)", "exclusiveMinimum": true, "in": "formData", "minimum": 0, "name": "memory_request", "required": true, "type": "integer" }, { "description": "Instance multiplier (applied when worker is idle)", "in": "formData", "minimum": 0, "name": "multiplier_idle", "required": true, "type": "number" }, { "description": "Instance multiplier (applied when worker is busy)", "in": "formData", "minimum": 0, "name": "multiplier", "required": true, "type": "number" }, { "description": "Max amount of disk space that can be used during the solve (MiB)", "in": "formData", "maximum": 1000000, "minimum": 100, "name": "workspace_request", "required": true, "type": "integer" }, { "collectionFormat": "multi", "description": "Toleration information for the pod", "in": "formData", "items": { "type": "string" }, "name": "tolerations", "type": "array" }, { "collectionFormat": "multi", "description": "Node selector information for the pod", "in": "formData", "items": { "type": "string" }, "name": "node_selectors", "type": "array" }, { "description": "Base64-encoded GAMS license to be used on this instance (takes precedence over the user license and the system-wide license, not supported in Engine One)", "in": "formData", "maxLength": 1000, "name": "gams_license", "type": "string" }, { "description": "Label of instance to modify", "in": "formData", "maxLength": 60, "minLength": 1, "name": "old_label", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/bad_input" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Instance not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Updates existing instance", "tags": [ "usage" ] } }, "/usage/instances/{username}": { "delete": { "description": "This means that the user inherits instances of inviter.\nAdmins can delete instances of anyone.\nInviters can delete instances of direct/indirect invitees.", "operationId": "deleteUserInstances", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "User not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Deletes instances assigned to a user", "tags": [ "usage" ] }, "get": { "description": "Admins can list instances of anyone.\nInviters can list instances of direct/indirect invitees.\nUsers can list own instances.\n\n**NOTE**:\nThe `default_instance` and `default_inherited_from` parameters are null if the default instance is a\npool instance and therefore cannot be used safely. They are retained here for compatibility reasons.\nPlease use the `GET /usage/instances/{username}/default` endpoint instead to get a user's default instance.", "operationId": "getUserInstances", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/model_userinstance_info" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/bad_input" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "User not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Lists all instances user has permissions to use", "tags": [ "usage" ] }, "parameters": [ { "in": "path", "name": "username", "required": true, "type": "string" } ], "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Admins can update instances of anyone.\nAdmin can assign any existing instances.\nAdmins cannot be assigned instances.\nInviters can update instances of direct/indirect invitees.\nInviters can only assign instances that have been assigned to them.", "operationId": "updateUserInstances", "parameters": [ { "collectionFormat": "multi", "description": "Instances and instance pools to assign to user", "in": "formData", "items": { "type": "string" }, "maxLength": 60, "minLength": 1, "name": "labels", "type": "array" }, { "description": "Label of the instance or instance pool to be used as default", "in": "formData", "maxLength": 60, "minLength": 1, "name": "default_label", "type": "string" }, { "description": "Delete all pools associated with an instance that the user is no longer allowed to use (default: false)", "in": "formData", "name": "delete_pools", "type": "boolean" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/bad_input" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "User not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Updates instances (and instance pools) a user has permissions to use", "tags": [ "usage" ] } }, "/usage/instances/{username}/default": { "get": { "description": "Admins can get default instance of anyone.\nInviters can get default instance of direct/indirect invitees.\nUsers can get own default instance.", "operationId": "getUserDefaultInstance", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/model_default_user_instance" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "User not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Returns the default instance of a user", "tags": [ "usage" ] }, "parameters": [ { "in": "path", "name": "username", "required": true, "type": "string" } ], "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Admins can update default instance of anyone.\nInviters can update default instance of direct/indirect invitees.\nUsers can update their own default instance.\nInstance specified must be available to the user.", "operationId": "updateUserDefaultInstance", "parameters": [ { "description": "Label of the instance or instance pool to be used as default", "in": "formData", "maxLength": 60, "minLength": 1, "name": "default_label", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/bad_input" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Default instance not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Updates the default instance (or instance pool) of the specified user", "tags": [ "usage" ] } }, "/usage/pools": { "delete": { "description": "Admins can delete any instance pool.\nInviters can delete instance pools from themselves or from invitees.\nUsers can delete their own instance pools.", "operationId": "deleteInstancePool", "parameters": [ { "description": "Label of instance pool to delete", "in": "query", "maxLength": 60, "minLength": 1, "name": "label", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad Input", "schema": { "$ref": "#/definitions/bad_input" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Instance pool not found", "schema": { "$ref": "#/definitions/message" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal Error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Deletes existing instance pool", "tags": [ "usage" ] }, "get": { "description": "Requires admin role.", "operationId": "getInstancePools", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/model_userinstancepool_info" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "User not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Lists all instance pools", "tags": [ "usage" ] }, "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "operationId": "createInstancePool", "parameters": [ { "description": "Label to assign to instance pool", "in": "formData", "maxLength": 60, "minLength": 1, "name": "label", "required": true, "type": "string" }, { "description": "Label of the instance or instance pool to use for pool", "in": "formData", "maxLength": 60, "minLength": 1, "name": "instance", "required": true, "type": "string" }, { "description": "Pool size (number of machines)", "in": "formData", "maximum": 50, "minimum": 0, "name": "size", "required": true, "type": "integer" } ], "responses": { "201": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad Input", "schema": { "$ref": "#/definitions/bad_input" } }, "401": { "description": "Invalid authentication" }, "402": { "description": "Quota exceeded", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Instance not found", "schema": { "$ref": "#/definitions/message" } }, "405": { "description": "Not allowed on Engine One", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal Error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Adds new instance pool", "tags": [ "usage" ] }, "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Admins can scale any instance pool.\nInviters can scale instance pools from themselves or from invitees.\nUsers can scale their own instance pools.", "operationId": "updateInstancePool", "parameters": [ { "description": "Label of instance pool to update", "in": "formData", "maxLength": 60, "minLength": 1, "name": "label", "required": true, "type": "string" }, { "description": "New pool size (number of machines)", "in": "formData", "maximum": 50, "minimum": 0, "name": "size", "required": true, "type": "integer" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad Input", "schema": { "$ref": "#/definitions/bad_input" } }, "401": { "description": "Invalid authentication" }, "402": { "description": "Quota exceeded", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Instance pool not found", "schema": { "$ref": "#/definitions/message" } }, "405": { "description": "Not allowed on Engine One", "schema": { "$ref": "#/definitions/message" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal Error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Adjusts the size of the instance pool", "tags": [ "usage" ] } }, "/usage/pools/{username}": { "get": { "description": "Admins can list instance pools of anyone.\nInviters can list instance pools of direct/indirect invitees.\nUsers can list own instance pools.", "operationId": "getUserInstancePools", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/model_userinstancepool_info" } }, "401": { "description": "Invalid authentication" }, "404": { "description": "User not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Lists all instance pools user has permissions to use", "tags": [ "usage" ] }, "parameters": [ { "in": "path", "name": "username", "required": true, "type": "string" } ] }, "/usage/quota": { "delete": { "description": "Admins can delete quotas of everyone. Inviters can delete quotas of invitees.", "operationId": "deleteQuota", "parameters": [ { "description": "Name of the user", "in": "query", "name": "username", "required": true, "type": "string" }, { "description": "Name of the field to delete, if not provided all fields are deleted", "enum": [ "volume_quota", "parallel_quota", "disk_quota" ], "in": "query", "name": "field", "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/bad_input" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "User not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Deletes the quota that is bound to the given user", "tags": [ "usage" ] }, "get": { "description": "Users inherit quotas from their (grand) inviters as well.\nAdmins can query the quotas of everyone. Inviters can query the quotas of themselves and invitees. Users can query quotas for themselves.", "operationId": "getQuota", "parameters": [ { "description": "Name of the user", "in": "query", "name": "username", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "items": { "$ref": "#/definitions/quota" }, "type": "array" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/bad_input" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "User not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Gets quotas for the given user", "tags": [ "usage" ] }, "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "If the user is inviter,\neveryone in the user's subtree is also effected. Admins cannot have quotas.\nAdmins can update quotas of everyone. Inviters can update quotas of invitees.", "operationId": "updateQuota", "parameters": [ { "description": "Name of the user", "in": "formData", "name": "username", "required": true, "type": "string" }, { "description": "Number of GAMS Seconds that the user and the user's invitees can run in parallel", "in": "formData", "minimum": 0, "name": "parallel_quota", "type": "number" }, { "description": "Number of GAMS Seconds that the user and the user's invitees can run in total", "in": "formData", "minimum": 0, "name": "volume_quota", "type": "number" }, { "description": "Storage in bytes that the user and the user's invitees can use in total", "in": "formData", "maximum": 100000000000000, "minimum": 0, "name": "disk_quota", "type": "integer" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/bad_input" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "User not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Updates the quota that is bound to the given user", "tags": [ "usage" ] } }, "/users/": { "delete": { "description": "Admins can delete anyone, inviters can delete users who are directly/indirectly invited.\nRequires admin or inviter role.", "operationId": "deleteUser", "parameters": [ { "description": "Username of the user to delete", "in": "query", "name": "username", "pattern": "^[a-zA-Z0-9_]{4,70}$", "required": true, "type": "string" }, { "description": "Also delete all submission results that are related to the user", "in": "query", "name": "delete_results", "type": "boolean" }, { "default": false, "description": "Delete users invited directly/indirectly by this user", "in": "query", "name": "delete_children", "type": "boolean" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "User not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Deletes a user", "tags": [ "users" ] }, "get": { "description": "If inviter, lists users invited directly/indirectly unless `everyone` is set to False.\nIf normal user, shows details of logged-in user.\nSetting username filters the results.\nWhen `everyone` is set to False, only information about the logged-in user is shown.", "operationId": "listUsers", "parameters": [ { "description": "Username of the user to filter", "in": "query", "name": "username", "pattern": "^[a-zA-Z0-9_]{4,70}$", "type": "string" }, { "default": true, "description": "If True, which is default, shows invitees.", "in": "query", "name": "everyone", "type": "boolean" }, { "in": "header", "name": "X-Fields", "type": "string" }, { "collectionFormat": "multi", "description": "Supported filters are: 'deleted=boolean'", "in": "query", "items": { "type": "string" }, "name": "filter", "type": "array" } ], "responses": { "200": { "description": "Successful", "schema": { "items": { "$ref": "#/definitions/user" }, "type": "array" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "If admin, lists all users unless `everyone` is set to False", "tags": [ "users" ] }, "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Username must be unique.\nInvitation code is considered invalid if the identity provider attached to it is deleted.", "operationId": "register", "parameters": [ { "in": "formData", "name": "username", "pattern": "^[a-zA-Z0-9_]{4,70}$", "required": true, "type": "string" }, { "in": "formData", "name": "password", "type": "string" }, { "description": "Invitation code", "in": "formData", "name": "invitation_code", "required": true, "type": "string" }, { "description": "3rd party signed JWT token for identification. Needs to be an ID token for OIDC providers and an access token for OAuth 2.0 providers.", "in": "formData", "name": "identification_token", "type": "string" } ], "responses": { "201": { "description": "Success", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/bad_input" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "summary": "Creates a new user if the invitation code is valid and not used", "tags": [ "users" ] }, "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Users can change their own passwords,\nInviters can change password of invitees,\nAdmins can change the password of anyone.\nThis has no effect if the target user is not using Engine as identity provider.", "operationId": "replaceUserPassword", "parameters": [ { "description": "Username of the user whose password is to be changed", "in": "formData", "name": "username", "pattern": "^[a-zA-Z0-9_]{4,70}$", "required": true, "type": "string" }, { "in": "formData", "name": "password", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/bad_input" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "User not found", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Changes password of the user with the given username", "tags": [ "users" ] } }, "/users/identity-provider": { "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Admins can update anyone's identity provider to any identity provider.\nInviters can update their subtree's identity provider to any allowed identity provider.\nTo block the user, leave `identity_provider_name` empty.", "operationId": "updateUserIdentityProvider", "parameters": [ { "description": "Name of the user whose identity provider is to be updated", "in": "formData", "name": "username", "required": true, "type": "string" }, { "description": "Name of the identity provider. To switch back to using Engine as identity provider, use `gams_engine` as value. If it is empty, the user will be blocked and won't be able to login. ", "in": "formData", "name": "identity_provider_name", "type": "string" }, { "description": "Subject of the user in the 3rd party identity provider. Leave empty when using Engine as your identity provider. You can leave it blank if you do not know the user's subject in the OAuth 2.0 or OIDC provider", "in": "formData", "name": "identity_provider_user_subject", "type": "string" }, { "description": "When `gams_engine` is the identity provider, this field is required and used as the user's password.", "in": "formData", "name": "password", "type": "string" } ], "responses": { "200": { "description": "Identity provider updated", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/bad_input" } }, "401": { "description": "Unauthenticated", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Identity provider or user not found", "schema": { "$ref": "#/definitions/not_found" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Updates the identity provider of the user or blocks the user", "tags": [ "users" ] } }, "/users/invitation": { "delete": { "description": "Admins can delete all unused invitations,\ninviters can only delete invitations that belong to them or\nthat belong to direct/indirect invitees of them.", "operationId": "deleteInvitation", "parameters": [ { "description": "Token of the invitation to be deleted", "in": "query", "name": "token", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Deletes an invitation if it is unused", "tags": [ "users" ] }, "get": { "description": "\"Everyone\" argument can only be set by the admin,\nand if it is set, all invitations are listed.\nRequires inviter or admin role.", "operationId": "listInvitations", "parameters": [ { "description": "Invitation code to filter", "in": "query", "name": "token", "type": "string" }, { "description": "Can only be set by admin, lists all invitations", "in": "query", "name": "everyone", "type": "boolean" }, { "in": "header", "name": "X-Fields", "type": "string" }, { "collectionFormat": "multi", "description": "Supported filters are: 'used=boolean'", "in": "query", "items": { "type": "string" }, "name": "filter", "type": "array" } ], "responses": { "200": { "description": "Successful", "schema": { "items": { "$ref": "#/definitions/invitation" }, "type": "array" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Lists the invitation codes created by the user", "tags": [ "users" ] }, "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Admins can invite admins, inviters and normal users. Inviters can invite\ninviters and normal users. Inviters cannot grant permissions that they\ndo not possess. Only admins can specify `gams_license`.\nRequires admin or inviter role.", "operationId": "createInvitation", "parameters": [ { "collectionFormat": "multi", "description": "Possible values are: ['inviter', 'admin']", "enum": [ "inviter", "admin" ], "in": "formData", "items": { "type": "string" }, "name": "roles", "type": "array" }, { "collectionFormat": "multi", "description": "Syntax is permission_number@namespace_name, ie \"7@global\"", "in": "formData", "items": { "type": "string" }, "name": "namespace_permissions", "type": "array" }, { "description": "Number of GAMS Seconds that the user and the user's invitees can run in parallel", "in": "formData", "minimum": 0, "name": "parallel_quota", "type": "number" }, { "description": "Number of GAMS Seconds that the user and the user's invitees can run in total", "in": "formData", "minimum": 0, "name": "volume_quota", "type": "number" }, { "description": "Storage space in bytes that the user and the user's invitees can use in total", "in": "formData", "maximum": 100000000000000, "minimum": 0, "name": "disk_quota", "type": "integer" }, { "collectionFormat": "multi", "description": "Instances to assign to user", "in": "formData", "items": { "type": "string" }, "maxLength": 60, "minLength": 1, "name": "labels", "type": "array" }, { "description": "Label of the instance to be used as default", "in": "formData", "maxLength": 60, "minLength": 1, "name": "default_label", "type": "string" }, { "description": "Whether to inherit instances from inviter", "in": "formData", "name": "inherit_instances", "type": "boolean" }, { "collectionFormat": "multi", "description": "User groups to put the user in, in format user_group@namespace format", "in": "formData", "items": { "type": "string" }, "name": "user_groups", "type": "array" }, { "description": "Base64 encoded GAMS license to attach to user", "in": "formData", "maxLength": 1000, "name": "gams_license", "type": "string" }, { "description": "Name of the 3rd party identity provider that will be used to authenticate the user, use \"gams_engine\" or leave empty to use Engine as your identity provider. You can leave it blank only if you have only Engine as an invitable identity provider", "in": "formData", "name": "identity_provider_name", "type": "string" }, { "description": "Subject of the user in the 3rd party identity provider. Leave empty when using Engine as your identity provider. You can leave it blank if you do not know the user's subject in the OAuth 2.0 or OIDC provider", "in": "formData", "name": "identity_provider_user_subject", "type": "string" }, { "collectionFormat": "multi", "description": "If the invited user has the inviter role, this argument lists the identity providers that the user can use to invite.", "in": "formData", "items": { "type": "string" }, "name": "invitable_identity_providers", "type": "array" } ], "responses": { "201": { "description": "Successful", "schema": { "$ref": "#/definitions/invitation_token" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/bad_input" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Namespace not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Creates an invitation code for new user", "tags": [ "users" ] } }, "/users/invitation/{token}": { "get": { "description": "The invitation must be unused.", "operationId": "getInvitationMetadata", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/invitation" } }, "404": { "description": "Invitation not found", "schema": { "$ref": "#/definitions/not_found" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "summary": "Get the metadata attached to the invitation", "tags": [ "users" ] }, "parameters": [ { "in": "path", "name": "token", "required": true, "type": "string" } ] }, "/users/inviters-providers/{username}": { "get": { "description": "Requires admin or inviter role.\nIf the listed user is admin, returns all identity providers.\nIf the listed user is inviter, returns the identity providers that the user can invite with.\nIf the listed user has no role, returns an empty list.", "operationId": "listIdentityProvidersOfInviter", "responses": { "200": { "description": "Successful", "schema": { "items": { "$ref": "#/definitions/identity_provider" }, "type": "array" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "User not found", "schema": { "$ref": "#/definitions/not_found" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Lists the identity providers that the specified user can use when inviting", "tags": [ "users" ] }, "parameters": [ { "in": "path", "name": "username", "required": true, "type": "string" } ], "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Requires admin or inviter role", "operationId": "assignIdentityProvidersToInviter", "parameters": [ { "collectionFormat": "multi", "description": "Unique identifiers of identity providers", "in": "formData", "items": { "type": "string" }, "name": "name", "type": "array" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Identity provider or user not found", "schema": { "$ref": "#/definitions/not_found" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Updates the list of identity providers that the specified user can use when inviting", "tags": [ "users" ] } }, "/users/role": { "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Admins can modify anyone.\nInviters can modify direct/indirect invitees.", "operationId": "updateUserRole", "parameters": [ { "description": "Username of the user whose roles are to be changed", "in": "formData", "name": "username", "pattern": "^[a-zA-Z0-9_]{4,70}$", "required": true, "type": "string" }, { "collectionFormat": "multi", "description": "New roles of the user, possible values are: ['inviter', 'admin']", "enum": [ "inviter", "admin" ], "in": "formData", "items": { "type": "string" }, "name": "roles", "type": "array" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "User not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Promotes/demotes user", "tags": [ "users" ] } }, "/users/username": { "put": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "Requires admin permissions.", "operationId": "replaceUserName", "parameters": [ { "description": "Username of the user whose username is to be changed", "in": "formData", "name": "username", "pattern": "^[a-zA-Z0-9_]{4,70}$", "required": true, "type": "string" }, { "in": "formData", "name": "new_username", "pattern": "^[a-zA-Z0-9_]{4,70}$", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "User not found", "schema": { "$ref": "#/definitions/message" } }, "429": { "description": "Username changed recently", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Changes username of the user with the given username", "tags": [ "users" ] } }, "/users/webhooks": { "delete": { "description": "The webhook feature has to be enabled via the `/configuration` endpoint.\nIn case the webhook_access configuration is set to `ADMIN_ONLY`,\nonly admins are able to access this endpoint.", "operationId": "deleteWebhook", "parameters": [ { "description": "The ID of the webhook to be removed", "exclusiveMinimum": true, "in": "query", "minimum": 0, "name": "id", "required": true, "type": "integer" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/message" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Webhook not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Removes an existing webhook", "tags": [ "users" ] }, "get": { "description": "If inviter, lists webhooks of direct/indirect invitees.\nIf user, lists webhooks of logged-in user.\n\nThe webhook feature has to be enabled via the `/configuration` endpoint.\nIn case the webhook_access configuration is set to `ADMIN_ONLY`,\nonly admins are able to access this endpoint.", "operationId": "listWebhooks", "responses": { "200": { "description": "Succesful", "schema": { "items": { "$ref": "#/definitions/webhook" }, "type": "array" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access" }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "If admin, lists all webhooks", "tags": [ "users" ] }, "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "The webhook feature has to be enabled via the `/configuration` endpoint.\nIn case the webhook_access configuration is set to `ADMIN_ONLY`,\nonly admins are able to access this endpoint.", "operationId": "createWebhook", "parameters": [ { "description": "The URL to which the payload is to be sent", "format": "uri", "in": "formData", "name": "url", "type": "string" }, { "default": "form", "description": "The media type used to serialize the data. Possible values are form and json (form is the default).", "enum": [ "form", "json" ], "in": "formData", "name": "content_type", "type": "string" }, { "description": "The secret key used to generate the HMAC. This HMAC will be included in the X-ENGINE-HMAC header.", "in": "formData", "maxLength": 255, "minLength": 8, "name": "secret", "type": "string" }, { "default": false, "description": "Whether the webhook should also be registered for invitees. If the logged-in user is admin, recursive means that the webhook is registered globally for all users.", "in": "formData", "name": "recursive", "type": "boolean" }, { "collectionFormat": "multi", "description": "(Non-parameterized) events to subscribe to (default: all events). Possible values:\nALL\nJOB_FINISHED\nHC_JOB_FINISHED\nJOB_OUT_OF_RESOURCES\nHC_JOB_OUT_OF_RESOURCES\nINVALIDATE_CACHE", "enum": [ "ALL", "JOB_FINISHED", "HC_JOB_FINISHED", "JOB_OUT_OF_RESOURCES", "HC_JOB_OUT_OF_RESOURCES", "INVALIDATE_CACHE" ], "in": "formData", "items": { "type": "string" }, "name": "events", "type": "array" }, { "collectionFormat": "multi", "description": "Parameterized events to subscribe to (format: EVENT_NAME=value). Possible values:\nVOLUME_QUOTA_THRESHOLD\nJOB_DURATION_THRESHOLD\nHC_JOB_DURATION_THRESHOLD", "in": "formData", "items": { "type": "string" }, "name": "parameterized_events", "type": "array" }, { "default": false, "description": "Whether to disable validation of SSL certificates when submitting this webhook. We strongly recommend not disabling certificate validation to protect against Man in The Middle attacks.", "in": "formData", "name": "insecure_ssl", "type": "boolean" } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/message_with_webhook_id" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/bad_input" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Creates a new webhook", "tags": [ "users" ] } }, "/users/webhooks/webpush": { "delete": { "operationId": "deleteWebpushSubscription", "parameters": [ { "description": "The endpoint URL of the Web Push subscription", "in": "query", "name": "endpoint", "required": true, "type": "string" }, { "default": false, "description": "Whether to delete the webhook associated with the Web Push subscription", "in": "query", "name": "delete_webhook", "type": "boolean" } ], "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Subscription not found", "schema": { "$ref": "#/definitions/not_found" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Remove a Web Push subscription from a webhook", "tags": [ "users" ] }, "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "description": "The webhook feature has to be enabled via the `/configuration` endpoint.\nIn case the webhook_access configuration is set to `ADMIN_ONLY`,\nonly admins are able to access this endpoint.", "operationId": "createWebpushSubscription", "parameters": [ { "description": "The ID of the webhook to subscribe to", "exclusiveMinimum": true, "in": "formData", "minimum": 0, "name": "webhook_id", "required": true, "type": "integer" }, { "description": "The URL to which the payload is to be sent", "format": "uri", "in": "formData", "name": "endpoint", "required": true, "type": "string" }, { "description": "Shared secret (ECDH P-256)", "in": "formData", "name": "key_p256dh", "required": true, "type": "string" }, { "description": "Authentication secret", "in": "formData", "name": "key_auth", "required": true, "type": "string" } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/message" } }, "400": { "description": "Bad input", "schema": { "$ref": "#/definitions/bad_input" } }, "401": { "description": "Invalid authentication" }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "404": { "description": "Webhook not found", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Create a Web Push subscription for a webhook", "tags": [ "users" ] } }, "/users/webhooks/webpush/vapid": { "get": { "description": "The webhook feature has to be enabled via the `/configuration` endpoint.\nIn case the webhook_access configuration is set to `ADMIN_ONLY`,\nonly admins are able to access this endpoint.", "operationId": "getVAPIDInfo", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/vapid_info" } }, "401": { "description": "Invalid authentication", "schema": { "$ref": "#/definitions/message" } }, "403": { "description": "Unauthorized access", "schema": { "$ref": "#/definitions/message" } }, "500": { "description": "Internal error", "schema": { "$ref": "#/definitions/message" } } }, "security": [ { "BasicAuth": [] } ], "summary": "Retrieves VAPID information required for Web Push", "tags": [ "users" ] } }, "/version": { "get": { "operationId": "getVersion", "responses": { "200": { "description": "Successful", "schema": { "$ref": "#/definitions/model_version" } } }, "summary": "Returns Engine and GAMS versions", "tags": [ "default" ] } } }, "produces": [ "application/json" ], "responses": { "MaskError": { "description": "When any error occurs on mask" }, "ParseError": { "description": "When a mask can't be parsed" } }, "securityDefinitions": { "BasicAuth": { "type": "basic" } }, "swagger": "2.0", "tags": [ { "description": "Default namespace", "name": "default" }, { "description": "Namespace related operations", "name": "namespaces" }, { "description": "Send jobs, query results, poll logs etc.", "name": "jobs" }, { "description": "Create invitation codes, list users, etc.", "name": "users" }, { "description": "Get token for authentication", "name": "auth" }, { "description": "Post Hypercube jobs", "name": "hypercube" }, { "description": "Free resources", "name": "cleanup" }, { "description": "Manage GAMS licenses", "name": "licenses" }, { "description": "Retrieve user usage data, manage instances and quotas", "name": "usage" } ] }