{"swagger": "2.0", "basePath": "/api", "paths": {"/binaries/{target}/{version}": {"parameters": [{"description": "ubuntu-bionic|ubuntu-xenial|centos-7|macos-catalina|windows|windows-msi", "name": "target", "in": "path", "required": true, "type": "string"}, {"description": "x.x.x(-rc.x)", "name": "version", "in": "path", "required": true, "type": "string"}], "post": {"responses": {"400": {"description": "Bad request - Target platform or version unknown"}, "200": {"description": "Success"}}, "operationId": "post_binaries_version", "tags": ["default"]}}, "/choose-plan": {"parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/ChoosePlan"}}], "post": {"responses": {"403": {"description": "Not authorized - account not valid"}, "200": {"description": "Success"}}, "operationId": "post_choose_plan", "security": [{"jwt": []}], "tags": ["default"]}}, "/create-support-ticket": {"post": {"responses": {"404": {"description": "Attached bundle_id not found or not accessible"}, "400": {"description": "Bad request \u2014 missing or invalid fields"}, "200": {"description": "Success \u2014 returns Hubspot ticket id (may be null if Hubspot is unconfigured)"}}, "operationId": "post_create_support_ticket", "parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/SupportTicket"}}], "tags": ["default"]}}, "/device/code": {"parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/DeviceCodeRequest"}}], "post": {"responses": {"400": {"description": "Request incorrect - JSON not valid"}, "200": {"description": "Success"}}, "operationId": "post_device_code", "tags": ["default"]}}, "/device/token": {"parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/DeviceTokenRequest"}}], "post": {"responses": {"400": {"description": "RFC 8628 error: authorization_pending, slow_down, expired_token, access_denied, ..."}, "200": {"description": "Success - same payload as /api/login"}}, "operationId": "post_device_token", "tags": ["default"]}}, "/freemium/parts/batch": {"post": {"responses": {"410": {"description": "Gone"}, "200": {"description": "Success"}}, "operationId": "post_bom_batch", "tags": ["default"]}}, "/list-plans": {"get": {"responses": {"403": {"description": "Not authorized - account not valid"}, "200": {"description": "Success"}}, "operationId": "get_list_plan", "security": [{"jwt": []}], "tags": ["default"]}}, "/login": {"parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/Login"}}], "post": {"responses": {"401": {"description": "User not identified - incorrect email or password"}, "403": {"description": "Not authorized - account not valid"}, "400": {"description": "Request incorrect - JSON not valid"}, "200": {"description": "Success"}}, "operationId": "post_login", "tags": ["default"]}}, "/logout": {"parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/Logout"}}], "post": {"responses": {"403": {"description": "Not authorized - account not valid"}, "200": {"description": "Success"}}, "operationId": "post_logout", "tags": ["default"]}}, "/my-licenses": {"get": {"responses": {"403": {"description": "Not authorized"}, "200": {"description": "Success"}}, "summary": "List the current user's active licenses", "description": "`is_current` flags the row whose machine_id matches the JWT's\ndevice_id claim \u2014 that's the seat the calling client is currently\nconsuming. Useful for clients that want to render a \"you're logged\nin here\" indicator.", "operationId": "get_my_licenses", "security": [{"jwt": []}], "tags": ["default"]}}, "/parts": {"post": {"responses": {"400": {"description": "Bad request"}, "200": {"description": "Success"}}, "operationId": "post_bom", "security": [{"jwt": []}], "tags": ["default"]}}, "/parts/autocomplete": {"post": {"responses": {"400": {"description": "Bad request"}, "200": {"description": "Success"}}, "operationId": "post_autocomplete", "security": [{"jwt": []}], "tags": ["default"]}}, "/parts/batch": {"post": {"responses": {"400": {"description": "Bad request"}, "200": {"description": "Success"}}, "operationId": "post_bom_batch", "security": [{"jwt": []}], "tags": ["default"]}}, "/parts/model_3d_obj": {"get": {"responses": {"400": {"description": "Bad request"}, "200": {"description": "Success"}}, "operationId": "get_model3_d_obj", "security": [{"jwt": []}], "tags": ["default"]}}, "/parts/model_3d_step": {"get": {"responses": {"404": {"description": "File not Found"}, "400": {"description": "Bad request"}, "200": {"description": "Success"}}, "operationId": "get_model3_d_step", "security": [{"jwt": []}], "tags": ["default"]}}, "/parts/search": {"post": {"responses": {"400": {"description": "Bad request"}, "200": {"description": "Success"}}, "operationId": "post_search", "security": [{"jwt": []}], "tags": ["default"]}}, "/parts/update": {"post": {"responses": {"400": {"description": "Bad request"}, "200": {"description": "Success"}}, "operationId": "post_update", "security": [{"jwt": []}], "tags": ["default"]}}, "/refresh/{device_id}": {"parameters": [{"description": "device_id of the machine.", "name": "device_id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"403": {"description": "Not authorized - account not valid"}, "200": {"description": "Success"}}, "operationId": "get_refresh", "security": [{"jwt": []}], "tags": ["default"]}}, "/runtime-version": {"parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/RuntimeVersionRequest"}}], "post": {"responses": {"400": {"description": "Bad request - unparseable version or unknown target"}, "200": {"description": "Success"}}, "description": "Resolve the jitx-client runtime version a py-jitx CLI should install.", "operationId": "post_runtime_version", "tags": ["default"]}}, "/sourcing/batch": {"post": {"responses": {"400": {"description": "Bad request"}, "200": {"description": "Success"}}, "operationId": "post_sourcing_batch", "security": [{"jwt": []}], "tags": ["default"]}}, "/sourcing_octopart/batch": {"post": {"responses": {"400": {"description": "Bad request"}, "200": {"description": "Success"}}, "operationId": "post_sourcing_octopart_batch", "security": [{"jwt": []}], "tags": ["default"]}}, "/stanza/run": {"post": {"responses": {"200": {"description": "Success"}}, "operationId": "post_stanza_run", "tags": ["default"]}}, "/stats": {"parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/Stats"}}], "post": {"responses": {"200": {"description": "Success"}}, "operationId": "post_stats", "security": [{"jwt": []}], "tags": ["default"]}}, "/support-bundle": {"post": {"responses": {"500": {"description": "Failed to generate upload link"}, "200": {"description": "Success \u2014 returns bundle_id and presigned upload form"}}, "operationId": "post_support_bundle_register", "parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/SupportBundleRegister"}}], "tags": ["default"]}}, "/support-bundle/{bundle_id}/complete": {"parameters": [{"description": "ULID returned by /api/support-bundle", "name": "bundle_id", "in": "path", "required": true, "type": "string"}], "post": {"responses": {"409": {"description": "Bundle already marked complete"}, "404": {"description": "Bundle not found or not owned by current user"}, "200": {"description": "Success"}}, "operationId": "post_support_bundle_complete", "parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/SupportBundleComplete"}}], "tags": ["default"]}}, "/upload-open-project/{proj_name}": {"parameters": [{"description": "Name of project.", "name": "proj_name", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"400": {"description": "Bad request - Link generation failure."}, "200": {"description": "Success"}}, "operationId": "get_upload_open_project", "tags": ["default"]}}}, "info": {"title": "API", "version": "1.0"}, "produces": ["application/json"], "consumes": ["application/json"], "securityDefinitions": {"jwt": {"type": "apiKey", "in": "header", "name": "Authorization"}}, "tags": [{"name": "default", "description": "Default namespace"}], "definitions": {"DeviceCodeRequest": {"required": ["device_id"], "properties": {"device_id": {"type": "string", "description": "Machine identifier, same as /api/login"}, "device_name": {"type": "string", "description": "Human-readable hostname, shown on the consent page"}, "client": {"type": "string", "description": "Requesting client, e.g. 'vscode' or 'py-jitx'"}}, "type": "object"}, "DeviceTokenRequest": {"required": ["device_code"], "properties": {"grant_type": {"type": "string", "description": "Optional; must be urn:ietf:params:oauth:grant-type:device_code if present"}, "device_code": {"type": "string"}}, "type": "object"}, "Login": {"properties": {"email": {"type": "string"}, "password": {"type": "string"}, "device_id": {"type": "string"}}, "type": "object"}, "Logout": {"properties": {"machine_id": {"type": "string"}}, "type": "object"}, "ChoosePlan": {"properties": {"plan": {"type": "string"}}, "type": "object"}, "RuntimeVersionRequest": {"properties": {"py-jitx-version": {"type": "string", "example": "4.2.0a14"}, "target": {"type": "string", "example": "macos-catalina"}}, "type": "object"}, "SupportBundleRegister": {"properties": {"description": {"type": "string"}}, "type": "object"}, "SupportBundleComplete": {"properties": {"size_bytes": {"type": "integer"}}, "type": "object"}, "Stats": {"properties": {"data": {"type": "array", "items": {"$ref": "#/definitions/StatDatapoint"}}}, "type": "object"}, "StatDatapoint": {"properties": {"action": {"type": "string"}, "timestamp": {"type": "integer"}}, "type": "object"}, "SupportTicket": {"required": ["description", "subject"], "properties": {"subject": {"type": "string"}, "description": {"type": "string"}, "name": {"type": "string", "description": "Required when no JWT is presented"}, "email": {"type": "string", "description": "Required when no JWT is presented"}, "bundle_id": {"type": "string", "description": "Optional support bundle ULID to attach. Must be accessible to the current user."}}, "type": "object"}}, "responses": {"ParseError": {"description": "When a mask can't be parsed"}, "MaskError": {"description": "When any error occurs on mask"}, "CSRFError": {}, "DecodeError": {}, "ExpiredSignatureError": {}, "FreshTokenRequired": {}, "MissingRequiredClaimError": {}, "InvalidAudienceError": {}, "InvalidIssuerError": {}, "InvalidHeaderError": {}, "InvalidTokenError": {}, "JWTDecodeError": {}, "NoAuthorizationError": {}, "InvalidQueryParamError": {}, "RevokedTokenError": {}, "UserClaimsVerificationError": {}, "UserLookupError": {}, "WrongTokenError": {}}}
